From patchwork Thu Nov 26 13:31:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 333438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38B6DC8300F for ; Thu, 26 Nov 2020 13:33:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0652F206F7 for ; Thu, 26 Nov 2020 13:33:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IJKrKLXl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389775AbgKZNc2 (ORCPT ); Thu, 26 Nov 2020 08:32:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390345AbgKZNcU (ORCPT ); Thu, 26 Nov 2020 08:32:20 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67800C0613D4 for ; Thu, 26 Nov 2020 05:32:19 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id e7so2160181wrv.6 for ; Thu, 26 Nov 2020 05:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WOPpp6HIgOcad1W0yfFfa1/Wy9WX17Rmpe1tMayS4HI=; b=IJKrKLXlEdbjjcRCFvRL1iTnWYhhIqcjEsenkEgZGOdVW7caoAQZPdSzf9q+0TDL1R Rv54vzF/hbcPiBYkShfjFH+xCa/L24Iq5UV3X7aMzmfSmnl2NZ+Hfy0SAlQbpzRDhAVR 6TCbs6gTAUplQFlusL7f/X2ITdQ33zUI+qVN5ngvGv6NSNR8vpN1QYy9KV/rufaGf69O 331G6hx/qanbzDNjYqHtmsPDTPtzVPSH/Gl/X/Dnw1baucosDCBK3CrHKXzBYnvTkGdA D01pqh/BUgXlQsfdMoyDGnRHPDSJ/tHaysYsqYlxraLeHDEfUF+lTQ+vdkrSfjrc5T2c AP6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WOPpp6HIgOcad1W0yfFfa1/Wy9WX17Rmpe1tMayS4HI=; b=XmkrLbzmY1AR3O7vW5X214XXBCat4Xk8Upm1+5hnDujLgS8z+tN+2bgZDhk7d/eqy7 0FtWd7icBNQUau07zqH0awZvrKjnjPa1F2Ur1qaCf52T/N8PdS1qhkxwUjtdt3cBGHmt xi5YFCX6hstrxAj8/fugAfkmSe2WvIQF8wlAzJ3aGCrwKLkHpk8shw9vivjH/RPtfz7O STNOMdy4G0qZBHq2WTxRXzcOjeH2AGKpt+85CYg0zzPiBxiK4VT3TMDkiZZEkU/s0L3j hjb6Irz5pqkD2XgjvvLla3Td8B8hWWA5THx9GZUmZDZZiEcZZ6nRLmD4NGMr+7PjdZI/ CQVQ== X-Gm-Message-State: AOAM5319/LwDhc/oOBdZAXNBLby5P0TWK5mpRjSPJTt+4UuXNefABlbO HZBdQHosE6RaU6COBKWiY9eslA== X-Google-Smtp-Source: ABdhPJz5JanrQA5T2e5MhcTaKmi3Rr5awkz/j5dYdTosg06LwfkbLMK27zcgfXcL/8U30DN6fFHbeQ== X-Received: by 2002:a5d:4cca:: with SMTP id c10mr3890245wrt.176.1606397538176; Thu, 26 Nov 2020 05:32:18 -0800 (PST) Received: from dell.default ([91.110.221.235]) by smtp.gmail.com with ESMTPSA id n10sm8701001wrv.77.2020.11.26.05.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 05:32:17 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org, kvalo@codeaurora.org Cc: linux-kernel@vger.kernel.org, Yan-Hsuan Chuang , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 17/17] realtek: rtw88: pci: Add prototypes for .probe, .remove and .shutdown Date: Thu, 26 Nov 2020 13:31:52 +0000 Message-Id: <20201126133152.3211309-18-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201126133152.3211309-1-lee.jones@linaro.org> References: <20201126133152.3211309-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Also strip out other duplicates from driver specific headers. Ensure 'main.h' is explicitly included in 'pci.h' since the latter uses some defines from the former. It avoids issues like: from drivers/net/wireless/realtek/rtw88/rtw8822be.c:5: drivers/net/wireless/realtek/rtw88/pci.h:209:28: error: ‘RTK_MAX_TX_QUEUE_NUM’ undeclared here (not in a function); did you mean ‘RTK_MAX_RX_DESC_NUM’? 209 | DECLARE_BITMAP(tx_queued, RTK_MAX_TX_QUEUE_NUM); | ^~~~~~~~~~~~~~~~~~~~ Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtw88/pci.c:1488:5: warning: no previous prototype for ‘rtw_pci_probe’ [-Wmissing-prototypes] 1488 | int rtw_pci_probe(struct pci_dev *pdev, | ^~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/pci.c:1568:6: warning: no previous prototype for ‘rtw_pci_remove’ [-Wmissing-prototypes] 1568 | void rtw_pci_remove(struct pci_dev *pdev) | ^~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw88/pci.c:1590:6: warning: no previous prototype for ‘rtw_pci_shutdown’ [-Wmissing-prototypes] 1590 | void rtw_pci_shutdown(struct pci_dev *pdev) | ^~~~~~~~~~~~~~~~ Cc: Yan-Hsuan Chuang Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones --- drivers/net/wireless/realtek/rtw88/pci.h | 8 ++++++++ drivers/net/wireless/realtek/rtw88/rtw8723de.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8723de.h | 4 ---- drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8821ce.h | 4 ---- drivers/net/wireless/realtek/rtw88/rtw8822be.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8822be.h | 4 ---- drivers/net/wireless/realtek/rtw88/rtw8822ce.c | 1 + drivers/net/wireless/realtek/rtw88/rtw8822ce.h | 4 ---- 9 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/pci.h b/drivers/net/wireless/realtek/rtw88/pci.h index ca17aa9cf7dc7..cda56919a5f0f 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.h +++ b/drivers/net/wireless/realtek/rtw88/pci.h @@ -5,6 +5,8 @@ #ifndef __RTK_PCI_H_ #define __RTK_PCI_H_ +#include "main.h" + #define RTK_DEFAULT_TX_DESC_NUM 128 #define RTK_BEQ_TX_DESC_NUM 256 @@ -212,6 +214,12 @@ struct rtw_pci { void __iomem *mmap; }; +const struct dev_pm_ops rtw_pm_ops; + +int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); +void rtw_pci_remove(struct pci_dev *pdev); +void rtw_pci_shutdown(struct pci_dev *pdev); + static inline u32 max_num_of_tx_queue(u8 queue) { u32 max_num; diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723de.c b/drivers/net/wireless/realtek/rtw88/rtw8723de.c index c81eb4c336425..2dd689441e8dc 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8723de.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8723de.c @@ -4,6 +4,7 @@ #include #include +#include "pci.h" #include "rtw8723de.h" static const struct pci_device_id rtw_8723de_id_table[] = { diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723de.h b/drivers/net/wireless/realtek/rtw88/rtw8723de.h index ba3842360c20a..2b4894846a07f 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8723de.h +++ b/drivers/net/wireless/realtek/rtw88/rtw8723de.h @@ -5,10 +5,6 @@ #ifndef __RTW_8723DE_H_ #define __RTW_8723DE_H_ -extern const struct dev_pm_ops rtw_pm_ops; extern struct rtw_chip_info rtw8723d_hw_spec; -int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); -void rtw_pci_remove(struct pci_dev *pdev); -void rtw_pci_shutdown(struct pci_dev *pdev); #endif diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c index 616fdcfd62c98..f34de115e4bc4 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c @@ -4,6 +4,7 @@ #include #include +#include "pci.h" #include "rtw8821ce.h" static const struct pci_device_id rtw_8821ce_id_table[] = { diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821ce.h b/drivers/net/wireless/realtek/rtw88/rtw8821ce.h index 8d3eb77a876be..54142acca5344 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.h +++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.h @@ -5,10 +5,6 @@ #ifndef __RTW_8821CE_H_ #define __RTW_8821CE_H_ -extern const struct dev_pm_ops rtw_pm_ops; extern struct rtw_chip_info rtw8821c_hw_spec; -int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); -void rtw_pci_remove(struct pci_dev *pdev); -void rtw_pci_shutdown(struct pci_dev *pdev); #endif diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822be.c b/drivers/net/wireless/realtek/rtw88/rtw8822be.c index 921916ae15cab..62ee7e62cac02 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822be.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822be.c @@ -4,6 +4,7 @@ #include #include +#include "pci.h" #include "rtw8822be.h" static const struct pci_device_id rtw_8822be_id_table[] = { diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822be.h b/drivers/net/wireless/realtek/rtw88/rtw8822be.h index d823ca059f5c9..6668460d664da 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822be.h +++ b/drivers/net/wireless/realtek/rtw88/rtw8822be.h @@ -5,10 +5,6 @@ #ifndef __RTW_8822BE_H_ #define __RTW_8822BE_H_ -extern const struct dev_pm_ops rtw_pm_ops; extern struct rtw_chip_info rtw8822b_hw_spec; -int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); -void rtw_pci_remove(struct pci_dev *pdev); -void rtw_pci_shutdown(struct pci_dev *pdev); #endif diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c index 026ac49ce6e3c..3845b1333dc39 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.c @@ -4,6 +4,7 @@ #include #include +#include "pci.h" #include "rtw8822ce.h" static const struct pci_device_id rtw_8822ce_id_table[] = { diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822ce.h b/drivers/net/wireless/realtek/rtw88/rtw8822ce.h index c2c0e8675d742..fee32d7a45047 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822ce.h +++ b/drivers/net/wireless/realtek/rtw88/rtw8822ce.h @@ -5,10 +5,6 @@ #ifndef __RTW_8822CE_H_ #define __RTW_8822CE_H_ -extern const struct dev_pm_ops rtw_pm_ops; extern struct rtw_chip_info rtw8822c_hw_spec; -int rtw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id); -void rtw_pci_remove(struct pci_dev *pdev); -void rtw_pci_shutdown(struct pci_dev *pdev); #endif