From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DATE_IN_PAST_06_12, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97FFEC63697 for ; Wed, 18 Nov 2020 21:34:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C8DF246CE for ; Wed, 18 Nov 2020 21:34:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C8DF246CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DEF846B005C; Wed, 18 Nov 2020 16:34:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D6A766B0036; Wed, 18 Nov 2020 16:34:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C3D356B006E; Wed, 18 Nov 2020 16:34:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 8A4B46B0036 for ; Wed, 18 Nov 2020 16:34:26 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 351263631 for ; Wed, 18 Nov 2020 21:34:26 +0000 (UTC) X-FDA: 77498842932.27.art29_180ef982733d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 24FA43D669 for ; Wed, 18 Nov 2020 21:34:26 +0000 (UTC) X-HE-Tag: art29_180ef982733d X-Filterd-Recvd-Size: 2809 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 18 Nov 2020 21:34:25 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 05AD8B004; Wed, 18 Nov 2020 21:34:23 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 4F52B1E1325; Wed, 18 Nov 2020 15:37:47 +0100 (CET) Date: Wed, 18 Nov 2020 15:37:47 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jens Axboe , Tejun Heo , Josef Bacik , Konrad Rzeszutek Wilk , Coly Li , Mike Snitzer , dm-devel@redhat.com, Richard Weinberger , Jan Kara , linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 07/20] init: refactor name_to_dev_t Message-ID: <20201118143747.GL1981@quack2.suse.cz> References: <20201118084800.2339180-1-hch@lst.de> <20201118084800.2339180-8-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118084800.2339180-8-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 18-11-20 09:47:47, Christoph Hellwig wrote: > Split each case into a self-contained helper. > > Signed-off-by: Christoph Hellwig > --- > include/linux/genhd.h | 7 +- > init/do_mounts.c | 183 +++++++++++++++++++++--------------------- > 2 files changed, 91 insertions(+), 99 deletions(-) > > diff --git a/include/linux/genhd.h b/include/linux/genhd.h > index 22f5b9fd96f8bf..ca5e356084c353 100644 > --- a/include/linux/genhd.h > +++ b/include/linux/genhd.h > @@ -388,18 +388,13 @@ static inline void bd_unlink_disk_holder(struct block_device *bdev, > } > #endif /* CONFIG_SYSFS */ > > +dev_t blk_lookup_devt(const char *name, int partno); > #ifdef CONFIG_BLOCK > void printk_all_partitions(void); > -dev_t blk_lookup_devt(const char *name, int partno); > #else /* CONFIG_BLOCK */ > static inline void printk_all_partitions(void) > { > } > -static inline dev_t blk_lookup_devt(const char *name, int partno) > -{ > - dev_t devt = MKDEV(0, 0); > - return devt; > -} > #endif /* CONFIG_BLOCK */ This hunk looks unrelated to the change? Also why you move the declaration outside the CONFIG_BLOCK ifdef? AFAICS blk_lookup_devt() still exists only when CONFIG_BLOCK is defined? Otherwise the patch looks good to me. Honza -- Jan Kara SUSE Labs, CR