Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp662048rwd; Wed, 31 May 2023 03:46:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5dLJi3txdYNrfk4l7ptse0dzFjVmmtIgKb+qPIAtK6ojXh9njjK07aTnxxeMEXsnTENbEm X-Received: by 2002:a05:6214:226a:b0:623:8510:8f8e with SMTP id gs10-20020a056214226a00b0062385108f8emr5594227qvb.33.1685530005340; Wed, 31 May 2023 03:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685530005; cv=none; d=google.com; s=arc-20160816; b=Sf3yeT/R8B5AvcyZ+0sUBufFokETKjnOEMekK1Ky4g7FD+3pF1LxYdwa3iXtVDQKaW 0fcT7cGYFr9C6VH/tV84crtSF7LOeDFgCTmp9xAqwLRRX2EFSDC46GfhY5ZxNhHPRwAn sMQWcJX6octcV7FmZRvla2Mvftql9pl8NuXEQCX6gb46NVJGoRvUr1wS+ZbbQukTO4HR DTNmYmP6QKbDtONciWuhduN7/vUDaE+VtWC/QrtD91oC0Ul9fue5M7NzG97JVcnLPAIL CBgqma5Y4dz/Q0MBU44zhWjFIkeffpI+pTX7QSBybtOC9hYhD3TeAYpg3zfky8+dbgsu ehwg== 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 :message-id:date:subject:cc:to:from; bh=kC/Lcat+syQ3bkfozwj0d95Epyle7BuN0SRmWWnTqqc=; b=IN6PFJwOih3tvPQxPa77FtSWNJh5wGZ9OT75aV2MAx2M/BY3V9kivL1aCovLOJeVdW xmxmrQCA7OZIpF6X4BhdbXUm/x0QKyIL0/vh2oCJIR5T0aSqkoIhkCYb2R2iODUNlRs5 em5h6VLO1B0MJdKXr/EiE4IRwpE3PQnwTgbDvt8hkTETZMh1ExGmhgECZe/7IJVoxlqK s0IjWl1FqN64pBXqRU4zN1SyvtJnTviOu2Klj8cHAHkul34OxTF375YM9g/HXY6/YULI ZKPfP4DVXXWsH9cp9OkyTtTMnwyT88utdAmGpkxMKRdtHYfkR6nUrStT8FBXHKRv0Fof 5jTQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f23-20020a633817000000b0053ef0f20fe3si733237pga.600.2023.05.31.03.46.33; Wed, 31 May 2023 03:46:45 -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; 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 S232241AbjEaK2F (ORCPT + 99 others); Wed, 31 May 2023 06:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbjEaK2D (ORCPT ); Wed, 31 May 2023 06:28:03 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E949FB3; Wed, 31 May 2023 03:28:01 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Dxd_EwIXdkE+8CAA--.6608S3; Wed, 31 May 2023 18:28:00 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx77MtIXdk+juCAA--.15700S2; Wed, 31 May 2023 18:27:57 +0800 (CST) From: Sui Jingfeng To: Bjorn Helgaas , Matthew Wilcox , Ben Hutchings , Jesse Barnes Cc: Li Yi , linux-pci@vger.kernel.org, loongson-kernel@lists.loongnix.cn, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel test robot , Geert Uytterhoeven Subject: [PATCH v2] PCI: Add dummy implement for pci_clear_master() function Date: Wed, 31 May 2023 18:27:44 +0800 Message-Id: <20230531102744.2354313-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Cx77MtIXdk+juCAA--.15700S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7CryUGr15Xw4UKr1xurWxZwb_yoW8Aw4rpa 98AFyrCrW8GFy8Gw4UJFyIvF1ag39xZ34Sy3y7Kwn09a9Fya4rtFnYkF17Arn3JrWvkFy3 Ww17Ka1DWw4YyFJanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bh8YFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2kK e7AKxVWUAVWUtwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z280 aVAFwI0_Gr1j6F4UJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVW8Jr0_Cr1UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr1j 6F4UJbIYCTnIWIevJa73UjIFyTuYvjxU2gyCDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 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 --- 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