From patchwork Wed May 31 12:55:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 101450 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2870050vqr; Wed, 31 May 2023 06:13:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4T01nhJ+9uWjnJWD2Rd/JlF6lmTcdUb8f3WkEPqbApdml3Y7AVtgL9T/poE9Hke5ADsTvP X-Received: by 2002:a05:6a21:980e:b0:104:ad71:f080 with SMTP id ue14-20020a056a21980e00b00104ad71f080mr3705547pzb.34.1685538823313; Wed, 31 May 2023 06:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685538823; cv=none; d=google.com; s=arc-20160816; b=HBDcc9JUKoNlCZbthyYL/mNR9VQ1JaRyBRoEnTce+9Bbu/k0t5tqNdYhIvtzbqggSk uZ57t9JehmEZALuLdiq/9lpFzuxsTW4snsGNYaLThPuOyWea1CpoLR4799L3EGnZ8+mi Erm1l2N1PO1iKlHfavR7O5NEqXPszn9aFpNRTLodRA/5BbtY9NunwvI96+W1zj3BO1qF +9EFJ4mxslk7As+S1gr2Vpp2GdKn0SXrKwDXei2mH419RfaBnbqBJHNhA/65Ev13183O Y3vYpa18hOJ2gUro6SJNNZYajmDo0N1VwYskR8pMgc0LKd7oR0LHaU8sk5O5M1lAIlLp /hzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t4DbCsU93yqw2l92hyXdL/NkNXQC1XmPMvPbdo/l4Xc=; b=kvcIAo4vr94wi9otG83veFqJHPcn3wbnDbVBrWEY3BdNAUK5qQ6Dl6mtSAkZBROnp/ KCPJImW1nUqKMQ6pgBSDhIZ+NsJlzKBqCwUCr7MdADUUTJ2DoxgL8rWoZwRsBpV7OLGC lTaQWL0oRAJl3uVQBg/rF0tX7qBOqu18DldyUIh0BHUexCGf4wHJ+ENIBc7yXciNVcDj oJBUwGRRm61FhSWuTYg/HWLYXhzA/trcXNuzNFNFnFymrvZIW69ebviJrZl+z0sSVhJR m9zyYVdiqTPMC+Z/zr8iB85jxT2C3VuaHwc+6crVh3nKMUS9Kc47tcYWMJtVLwou2z4g rwuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hLpr0fVe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x28-20020aa7957c000000b0064d425629dfsi3652902pfq.51.2023.05.31.06.13.30; Wed, 31 May 2023 06:13:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hLpr0fVe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236150AbjEaM45 (ORCPT + 99 others); Wed, 31 May 2023 08:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236141AbjEaM4m (ORCPT ); Wed, 31 May 2023 08:56:42 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E2F5124; Wed, 31 May 2023 05:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=t4DbCsU93yqw2l92hyXdL/NkNXQC1XmPMvPbdo/l4Xc=; b=hLpr0fVeO7tYs5NGVmD87/3xdb vhAOiHFCtPjkZXXoo0Qf0JyBHqg3xJIiUoIzcWvyWUGG8/cxBOSftIwlsIWDzT9XWwaE8ODCDdzDa 6dxP2ERifsDaD3ido9ea1MJkKVohJ/XenQcd9cQVAIdZI+x7nFsdJxDO0T5rB7UGIn2I4/vduRqhx k/WRAZHv+bJY7OAKReqAShEnvuek5pzq5bv7ASlSDEXMoBhGbFP1mq67I+WbGlFIVtYt7r/Kqtp3W 06NEpr30uW+fkddRlMCp4uBgy2a+re/6y4cO6P9wXcMvhR1Av6jUqwqcFERplk5jJuVd674761+Jx irZ3qqhw==; Received: from [2001:4bb8:182:6d06:2e49:a56:513a:92ee] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q4LN0-00HR49-2P; Wed, 31 May 2023 12:56:07 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Mike Snitzer , Joern Engel , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Pavel Machek , Loic Poulain , dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 05/24] init: remove pointless Root_* values Date: Wed, 31 May 2023 14:55:16 +0200 Message-Id: <20230531125535.676098-6-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531125535.676098-1-hch@lst.de> References: <20230531125535.676098-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767415557044605604?= X-GMAIL-MSGID: =?utf-8?q?1767415557044605604?= Remove all unused defines, and just use the expanded versions for the SCSI disk majors. I've decided to keep Root_RAM0 even if it could be expanded as there is a lot of special casing for it in the init code. Signed-off-by: Christoph Hellwig --- arch/alpha/kernel/setup.c | 2 +- arch/ia64/kernel/setup.c | 2 +- arch/powerpc/platforms/powermac/setup.c | 3 ++- include/linux/root_dev.h | 8 -------- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index 33bf3a62700270..b650ff1cb022ee 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -658,7 +658,7 @@ setup_arch(char **cmdline_p) #endif /* Default root filesystem to sda2. */ - ROOT_DEV = Root_SDA2; + ROOT_DEV = MKDEV(SCSI_DISK0_MAJOR, 2); #ifdef CONFIG_EISA /* FIXME: only set this when we actually have EISA in this box? */ diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index c0572804427275..becdb4f33c2195 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -627,7 +627,7 @@ setup_arch (char **cmdline_p) * is physical disk 1 partition 1 and the Linux root disk is * physical disk 1 partition 2. */ - ROOT_DEV = Root_SDA2; /* default to second partition on first drive */ + ROOT_DEV = MKDEV(SCSI_DISK0_MAJOR, 2); if (is_uv_system()) uv_setup(cmdline_p); diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 193cc9c394221b..0c41f4b005bcf3 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -76,7 +76,8 @@ int pmac_newworld; static int current_root_goodness = -1; -#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ +/* sda1 - slightly silly choice */ +#define DEFAULT_ROOT_DEVICE MKDEV(SCSI_DISK0_MAJOR, 1) sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN; EXPORT_SYMBOL(sys_ctrler); diff --git a/include/linux/root_dev.h b/include/linux/root_dev.h index 4e78651371ba92..ed3ea8da642972 100644 --- a/include/linux/root_dev.h +++ b/include/linux/root_dev.h @@ -10,14 +10,6 @@ enum { Root_NFS = MKDEV(UNNAMED_MAJOR, 255), Root_CIFS = MKDEV(UNNAMED_MAJOR, 254), Root_RAM0 = MKDEV(RAMDISK_MAJOR, 0), - Root_RAM1 = MKDEV(RAMDISK_MAJOR, 1), - Root_FD0 = MKDEV(FLOPPY_MAJOR, 0), - Root_HDA1 = MKDEV(IDE0_MAJOR, 1), - Root_HDA2 = MKDEV(IDE0_MAJOR, 2), - Root_SDA1 = MKDEV(SCSI_DISK0_MAJOR, 1), - Root_SDA2 = MKDEV(SCSI_DISK0_MAJOR, 2), - Root_HDC1 = MKDEV(IDE1_MAJOR, 1), - Root_SR0 = MKDEV(SCSI_CDROM_MAJOR, 0), }; extern dev_t ROOT_DEV;