Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1227173rwd; Wed, 31 May 2023 11:01:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UnABw1zjwL4Lcm5Q0/0+BYBNG9Ptg9nq2Hyj1Pusn1PsjPsiuOK5cTqKUcWsDAovgkouR X-Received: by 2002:a17:903:26c4:b0:1ae:513a:9439 with SMTP id jg4-20020a17090326c400b001ae513a9439mr5110355plb.23.1685556111531; Wed, 31 May 2023 11:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685556111; cv=none; d=google.com; s=arc-20160816; b=CG5l88bnvo6a+AbdUmAjHSLi+aFMtPi9q1qiI62dp+nuEBVR1xQ+Vww1YKavu/ldec Oy7nyEWlvB7lDMy91N4vgJoJeAWG9qjUIY/XgxyJT8noK7dPnmSNqwoTA9joWhP/jUZn rskfnPWTkp+9YLiRWN/qyn22UU94EZGWKQ/oPyo0vyG2eZDkPuLXD35Fg8yhr/1WeCBU JgiPMb2nlwE1oJA9KKT8UDe2U7qnijC9JxHqJiLps1ne97M90Y6ivOVl6zCVZfU4N2uh 4/q0He4Hb1DGMaIZ7Ia6je6LCQUQ6qFUjQVOhJCilsRvcGYQy47u1qRIxziuaA6cMYah Y6Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=UqC5lYESdFt137MnAnoPkGT6M1FQ/zf+tD7X1vZYJBw=; b=Gs/XNx15RJgDihGycjiOgeyEdbSjxKaRKlpswZHA+O2ppfShA/GCiGh0bNjzXhM9NY mQenn9DWGE/WZ4BO3EfYzm3QNS/gmw8uuT6rpH0Jn0cTToX2WAHO2dledkoP4GTBKhHF hIdtRR08RSFbbpE+OwBXYZEHIg/SrU4fVAPAbOcXCiNMDHBgowTRIe7hp72vbfZuWM6H jWbGyIrTXiPPqgLZlNoAVciMsnelxfT2ExY9pFZv4ys55xMpxaGSHGgowgEx8pIdqLrS kUZr6c+lDA7v4q1DGF7Ra/6iOZpIzB0AlC9CC11zqK34+qQprlbH+I0TyyuJGuUO6eEa R7Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OmJ1ssTz; 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 l16-20020a170902f69000b001b04c92cb42si1313879plg.357.2023.05.31.11.01.32; Wed, 31 May 2023 11:01:51 -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=@kernel.org header.s=k20201202 header.b=OmJ1ssTz; 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 S229851AbjEaR2M (ORCPT + 99 others); Wed, 31 May 2023 13:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbjEaR2K (ORCPT ); Wed, 31 May 2023 13:28:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0B53BE; Wed, 31 May 2023 10:28:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7B94261199; Wed, 31 May 2023 17:28:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFF8DC433EF; Wed, 31 May 2023 17:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685554086; bh=QUys/yTxIdSYTpQugTpVBvBDboSkoG+k/FTxlWRW0II=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OmJ1ssTzhjT6CCXPr0dF/pbWm9TbHyxrH7iMFETRLmMIJZSDRpmCETKbi+hba0C2b dm9pVYYD6SmaWnkWw5LP9lbH0qS8UfWA6av3tKFTO0PLeoaPW907E335Cwn2rMgFLT GyuorTUazfiqACcAdF3OOoYOeCqdUHxrI3J1zmBXSRkglmr3kToLgIna8DzC3Vo1O4 0hac1ipWWdsgPqZRCxsW7GOxnUr4URhdidQh0JNcy63x8T8LZrGixjOTRfP2z/raAj GCMf8clZ8F2nCj9zcEBdlmjLocOeYW6mqMIZ3+vstSTOgJKc4NQkyqTz03Hs6WhfdK +euCGNig9Eufw== Date: Wed, 31 May 2023 12:28:05 -0500 From: Bjorn Helgaas To: Sui Jingfeng Cc: Bjorn Helgaas , Matthew Wilcox , Ben Hutchings , Jesse Barnes , kernel test robot , Li Yi , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, loongson-kernel@lists.loongnix.cn, Geert Uytterhoeven , linux-pci@vger.kernel.org Subject: Re: [PATCH v2] PCI: Add dummy implement for pci_clear_master() function Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230531102744.2354313-1-suijingfeng@loongson.cn> X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 On Wed, May 31, 2023 at 06:27:44PM +0800, Sui Jingfeng wrote: > As some arch(m68k for example) doesn't have config_pci enabled, drivers[1] > call pci_clear_master() without config_pci guard can not pass compile test. > > drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c: > In function 'etnaviv_gpu_pci_fini': > >> drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c:32:9: > error: implicit declaration of function 'pci_clear_master'; > did you mean 'pci_set_master'? [-Werror=implicit-function-declaration] > 32 | pci_clear_master(pdev); > | ^~~~~~~~~~~~~~~~ > | pci_set_master > cc1: some warnings being treated as errors > > [1] https://patchwork.freedesktop.org/patch/539977/?series=118522&rev=1 > > V2: > * Adjust commit log style to meet the convention and add Fixes tag > > Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202305301659.4guSLavL-lkp@intel.com/ > Reviewed-by: Geert Uytterhoeven > Signed-off-by: Sui Jingfeng Applied to pci/misc for v6.5 as follows: Author: Sui Jingfeng Date: Wed May 31 18:27:44 2023 +0800 PCI: Add pci_clear_master() stub for non-CONFIG_PCI Add a pci_clear_master() stub when CONFIG_PCI is not set so drivers that support both PCI and platform devices don't need #ifdefs or extra Kconfig symbols for the PCI parts. [bhelgaas: commit log] Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") Link: https://lore.kernel.org/r/20230531102744.2354313-1-suijingfeng@loongson.cn Signed-off-by: Sui Jingfeng Signed-off-by: Bjorn Helgaas Reviewed-by: Geert Uytterhoeven > --- > include/linux/pci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index d0c19ff0c958..71c85380676c 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1904,6 +1904,7 @@ static inline int pci_dev_present(const struct pci_device_id *ids) > #define pci_dev_put(dev) do { } while (0) > > static inline void pci_set_master(struct pci_dev *dev) { } > +static inline void pci_clear_master(struct pci_dev *dev) { } > static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } > static inline void pci_disable_device(struct pci_dev *dev) { } > static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; } > -- > 2.25.1 >