From patchwork Tue May 30 10:16:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13259650 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96FF7C77B73 for ; Tue, 30 May 2023 10:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbjE3KRK (ORCPT ); Tue, 30 May 2023 06:17:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjE3KRJ (ORCPT ); Tue, 30 May 2023 06:17:09 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 156D593; Tue, 30 May 2023 03:17:07 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8BxV_EjzXVkh4YCAA--.5742S3; Tue, 30 May 2023 18:17:07 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axmr0gzXVkumyAAA--.11670S2; Tue, 30 May 2023 18:17:04 +0800 (CST) From: Sui Jingfeng To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, kernel test robot Subject: [PATCH] linux/pci.h: add a dummy implement for pci_clear_master() Date: Tue, 30 May 2023 18:16:55 +0800 Message-Id: <20230530101655.2275731-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Axmr0gzXVkumyAA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Jr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr 0_Cr1UYxBIdaVFxhVjvjDU0xZFpf9x07UEYLkUUUUU= Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org As some arch(m68k for example) doesn't have config_pci enabled, drivers[1] call pci_clear_master() without config_pci guard can not built. 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 Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305301659.4guSLavL-lkp@intel.com/ Signed-off-by: Sui Jingfeng Reviewed-by: Geert Uytterhoeven Acked-by: Bjorn Helgaas --- 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; }