Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5384893rwb; Mon, 21 Nov 2022 22:11:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf4qr3XuYJDeCULFnW/wDER5Tj7Vg0i+wkkC7fz9oZC+FnUOLWPm0+7bcmLmE92wOXwqubES X-Received: by 2002:a17:906:ce35:b0:7ae:215:2dd5 with SMTP id sd21-20020a170906ce3500b007ae02152dd5mr2689262ejb.208.1669097504337; Mon, 21 Nov 2022 22:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669097504; cv=none; d=google.com; s=arc-20160816; b=oSUao8ByY4UWPK9H0grYQ1Qz0zLyj6kifitAa29pXFqPtvwSN7rxhFR7th7IbxhBky jk29qT3KtxayQe3OtpXoHOTBvmiefPJPBmU1nQLU1xgaSabs3+HbVe49IQpbHElEO6I8 FQ2OmBvWYjFF3HKp6F9gS/mAD8zph9dRkVP4GINqvCAIOKUJ4gH+WA5rdvciPmE5sxci IB6k0xKGBT1AYd5/DkUtC4gzmxEcHHfjswNwxVLk3yn+hHVM/r/dydjs9KK6TPTcPV/t IDB1NEN/xcR3eFftIbqbLdps9e69qPKCsgebnPhP/CsAsdbvm03pRxeaUnZ+Bd5rG0DC 7mCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=PyZIW+rJXpJC9QFi7cRxeAWYBzbIAT6tmqqq7AILiPo=; b=Ca3XBQ9xZPfSIXdbJ5SSeblyH08B3Kh6eFYHSZhpj4MtiHy3KdkT5NX7WhDcY9WgL1 HtSTYeBo5L5wIPqpHc81XLEY1JwvbK8zai1ITKDeptosbxhVhXTF3jf/CYNF/sjBA6Bi 28Wq5t8xPSF7dwOT1/aZCEEN9o92IXg0qH1b5xN0iZyOO26nf9tLQhNE7lG2siCEsycb X47ulOES2p2vDmIGZvaE+d1NcjZ0mqkWMYHAhHdE+q/mGl6VxKihHMS/qmmcX0uby3Ix pweTGQ0iKEjvYqRdzT0V5BohjOGloDZ4QjMGneDWaWdRgrcsme53gXshVyn3EpG79nmN 3wjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Ih4tke9Q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020a1709064fd300b007a087ccd275si12114093ejw.384.2022.11.21.22.11.20; Mon, 21 Nov 2022 22:11:44 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=Ih4tke9Q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230442AbiKVGAb (ORCPT + 91 others); Tue, 22 Nov 2022 01:00:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbiKVGA3 (ORCPT ); Tue, 22 Nov 2022 01:00:29 -0500 Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66DE31E8; Mon, 21 Nov 2022 22:00:27 -0800 (PST) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 2AM605e4031335; Tue, 22 Nov 2022 15:00:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 2AM605e4031335 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1669096806; bh=PyZIW+rJXpJC9QFi7cRxeAWYBzbIAT6tmqqq7AILiPo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Ih4tke9QNgKCzXLdo2rmvAun8YSAQsePR7nVPxV+9M8W24yBZ2MHEjhslYv0pSRGI VC/KD8AbYCjwfIO7oDnrDEhXrIy039LPJHiWrljq7xAlX2CSVj0+ZMqs3dcv4oiW4Q aL5RIrwp/9qm4kLjsC3wGTyjUHLBtzjzs3B0Pv3AVDGnqQ2L77TMHGsVAxEGhNRS5E IqeJA496c7H0RdmmM831RkLUBGa6OMGNiNfnUFdb8WbvqdzNU/NhDELQDacW03qWse 7EDQmayxda/K/MDmzjTY/K/WxD/1XTGTM6rX2QMrtA1/VkRjcpV9Rj9P8vC5bS6OFl 3jMcvsQLYC7PQ== X-Nifty-SrcIP: [209.85.167.171] Received: by mail-oi1-f171.google.com with SMTP id n205so14867143oib.1; Mon, 21 Nov 2022 22:00:06 -0800 (PST) X-Gm-Message-State: ANoB5pmnVolBjRNtpxFV3L8yZHq/ucFkROPFlUzxVdmHm7D865sd6jS5 wtgGMvXp4ejBYJ6EMe67rz89AeYMsN0IGKYZjVU= X-Received: by 2002:a05:6808:3009:b0:354:94a6:a721 with SMTP id ay9-20020a056808300900b0035494a6a721mr2132007oib.194.1669096804938; Mon, 21 Nov 2022 22:00:04 -0800 (PST) MIME-Version: 1.0 References: <20221119225650.1044591-1-alobakin@pm.me> <20221119225650.1044591-2-alobakin@pm.me> <68ceddec-7af9-983d-c8be-7e0dc109df88@ti.com> In-Reply-To: <68ceddec-7af9-983d-c8be-7e0dc109df88@ti.com> From: Masahiro Yamada Date: Tue, 22 Nov 2022 14:59:28 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 01/18] block/rnbd: fix mixed module-builtin object To: Andrew Davis Cc: Alexander Lobakin , linux-kbuild@vger.kernel.org, Nicolas Schier , Jens Axboe , Boris Brezillon , Borislav Petkov , Tony Luck , Miquel Raynal , Vladimir Oltean , Alexandre Belloni , Derek Chickles , Ioana Ciornei , Salil Mehta , Sunil Goutham , Grygorii Strashko , Daniel Scally , Hans de Goede , Mark Brown , Andy Shevchenko , NXP Linux Team , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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 On Tue, Nov 22, 2022 at 6:18 AM Andrew Davis wrote: > > On 11/19/22 5:04 PM, Alexander Lobakin wrote: > > From: Masahiro Yamada > > > > With CONFIG_BLK_DEV_RNBD_CLIENT=m and CONFIG_BLK_DEV_RNBD_SERVER=y > > (or vice versa), rnbd-common.o is linked to a module and also to > > vmlinux even though CFLAGS are different between builtins and modules. > > > > This is the same situation as fixed by commit 637a642f5ca5 ("zstd: > > Fixing mixed module-builtin objects"). > > > > Turn rnbd_access_mode_str() into an inline function. > > > > Why inline? All you should need is "static" to keep these internal to > each compilation unit. Inline also bloats the object files when the > function is called from multiple places. Let the compiler decide when > to inline. > > Andrew Since it is a header file. In header files, "static inline" should be always used. Never "static". If a header is included from a C file and there is a function that is not used from that C file, "static" would emit -Wunused-function warning (-Wunused-function is enabled by -Wall, which is the case for the kernel build). -- Best Regards Masahiro Yamada