From patchwork Wed May 31 10:27:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 101349 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2779504vqr; Wed, 31 May 2023 03:41:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57Q3xrWsN95XzIVAOqpKPLSih1jsaZJsgoSMc1oK661WZg1BaX95lAKfH93214+RzzMb63 X-Received: by 2002:a17:90a:889:b0:256:70d3:b4c0 with SMTP id v9-20020a17090a088900b0025670d3b4c0mr4487451pjc.21.1685529702180; Wed, 31 May 2023 03:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685529702; cv=none; d=google.com; s=arc-20160816; b=a4W3N7s4HtIG8pxbS8W8h+uvYfkxyuOGKv37nQolnbbCK6ktablglt7Lr9BBWDTTRm gwtwWqrTRuV2QK4rz1x69xf5vHT8ViCdf76AWfD6a6N0AIihh2utx5XJGIDhFLHFX7Ft cFgZNyD0rr6A2HhP++MNkMZ1N+TIs1Yt/o7A3h4KdsTqg/P/8EP0LCu3eFZpMwhcq3Ke 5NJm4dBO7DuwRhQXmnnMIgqCMphkx7p/Xp/qVOJYlapXVqC2sKG1AanhrjLx1BSLfM+S Dgkubc8ltliRK1nd4lNUYNDB+KFjAV1DkTg77YeYmYxWrklXH7t3KKRCieLNLyFqCmyH /wQQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j72-20020a638b4b000000b00524ea62bcbcsi799535pge.209.2023.05.31.03.41.29; Wed, 31 May 2023 03:41:42 -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 S232560AbjEaK2F (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767405992986479533?= X-GMAIL-MSGID: =?utf-8?q?1767405992986479533?= 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; }