Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1105260lqa; Sun, 28 Apr 2024 19:47:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRxajmhmSwbiiprYAuPHvajgfrOhbI7R4PDT0oGJ1IyJcUme6aO6hhvwWdi1abQB9vxrLjLDdbqXzNTOFxo69WrnzAmBd08AOWgmsv1g== X-Google-Smtp-Source: AGHT+IGGjOAW3fC5mR9q5kBy5C1AemWy8IxWOXkzm8lOeDW+qiG2Hbb1gvkqEj8/Ik90XidpdOR7 X-Received: by 2002:a05:6a20:daa7:b0:1ad:7e4d:2ea6 with SMTP id iy39-20020a056a20daa700b001ad7e4d2ea6mr11245769pzb.20.1714358864612; Sun, 28 Apr 2024 19:47:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714358864; cv=pass; d=google.com; s=arc-20160816; b=YU7LhIsNm4BHmd3EOnIwRTb8GcdhLkEqScEFhGgZrUlMx6bbmCPHG9OXMkBigSqO61 IXOqdsSfbA1P/bp3e8iZpCrvobzYTZNaTFHagUX4mqey1wS8cSFMlZT4GIGYU+qhaqxi 5MwdW7fZZrlaGvY202ZvzyoBruYEQlnlO0jF43PMCJZrsT/FLS+feRyIQyUGUQwwBOzs GufvR+xs4zuVu0gDUo7OoPbOg6GGKJYfiW5oVofN6mesyTxCcyzxqI9ESflnrnbNDhaY 2Y9RBO57GooHufo/4cug39sVctxNkljVM0ge6vHUcPIswvU1P3fpLhix5OQ/VnNH3AHN rt6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=64ubFwklvb+o5tmFTMPMB2+JHWQ0LvtT9B0qIszcOk0=; fh=JJNCVMnNp4gfi546qemne+BRA5t+kgMwYU38NPAxpVo=; b=jO1MvrkJm6rtrKhX5X0I7nErz91H4cU598Q4UhoLgYfpAkd8BIoCYRidgkT/BVEsoT 0ALAjGrpjGas3CqjzDfPIgmMyoWTQmZZiq2Qq0wPeim35xQBxw/cb2h7ougp23lNGTFl +uV9LX1tzQ50dUnUgVEZPdKk7TKniNDrp+6R0ER0DMD8dDz/dQ935K88hNq/GktcRABS 96HGOQfmYQyW+1gQ9bQrFRuFE3xufsOi8vccD/t3Wo74b3fNKZNj497lbu5ph/91IA0p I6zlk69cqjsLpZ4USha1OPwlY9cGjN9KbNK1aQiqMwDDj5BrXkVdf88J/0H+e/LuxdUY KmGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-6957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6957-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u137-20020a63798f000000b005dc81a6b2c9si18802873pgc.666.2024.04.28.19.47.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 19:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-6957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6957-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 22C3BB211EE for ; Mon, 29 Apr 2024 02:47:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBC2179F5; Mon, 29 Apr 2024 02:47:37 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13DFAC147 for ; Mon, 29 Apr 2024 02:47:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714358857; cv=none; b=UldgyAccs2AtBDPDrrhWHEDG0q1Rxq/tWI0UFPf8nKySUAW9jASFAosj/SHv5hfIqm3i/NgbdTb0IxANZdDl5ze42EG4f/Sl3gEgVKnGh4/medqXRYb9q6bpVdY+7BXagULu7QzyjwvssrWMKOZdLrPeW7PyHcCZdOM3u5GA5jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714358857; c=relaxed/simple; bh=5xlFTz3JGd4LQyG9sG3EK0OWsVd6Mf8Q22RkQMjIa2Y=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SrYkgZTEE7EYHKBL6+SAnqrAbIkkt3dfB2YhXKwskR+Ds/juVU2qrpXVh360YmFnDLJd74t19Z/QhGHwKrrwbzszWO0gY011IKOw2Tms0DK8qNo51Jw5ufb1psMGpIfjBo+n+GPcp+wiww8O/Yh9M83NSgJizJjqdln+N/VXfoY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 43T2lP5w92980175, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 43T2lP5w92980175 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Apr 2024 10:47:25 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 29 Apr 2024 10:47:25 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 29 Apr 2024 10:47:24 +0800 From: Ping-Ke Shih To: , CC: Subject: [PATCH] wifi: rtl8xxxu: cleanup includes Date: Mon, 29 Apr 2024 10:47:11 +0800 Message-ID: <20240429024711.30992-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) Remove unnecessary includes from driver. The first step is to add necessary includes to driver's header files to make them can be included individually. Then, driver's C files include driver's header files first, and check if still missed header files of kernel. The results show that most C files only include driver's header files. Only core.c needs to include additional linux/firmware.h. Also sort includes in alphabetic order. Compile tested only. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8188f.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8192c.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8192e.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8192f.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8710b.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8723a.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/8723b.c | 14 +------------- drivers/net/wireless/realtek/rtl8xxxu/core.c | 13 +------------ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 3 ++- 10 files changed, 11 insertions(+), 117 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c index 60fb0bffd4ed..3d04df0f5bf4 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c @@ -13,20 +13,8 @@ * additional 8xxx chips like the 8192cu, 8188cus, etc. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static const struct rtl8xxxu_reg8val rtl8188e_mac_init_table[] = { {0x026, 0x41}, {0x027, 0x35}, {0x040, 0x00}, {0x421, 0x0f}, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188f.c b/drivers/net/wireless/realtek/rtl8xxxu/8188f.c index 296370414134..bd5a0603b4a2 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8188f.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8188f.c @@ -11,20 +11,8 @@ * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static const struct rtl8xxxu_reg8val rtl8188f_mac_init_table[] = { {0x024, 0xDF}, {0x025, 0x07}, {0x02B, 0x1C}, {0x283, 0x20}, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8192c.c b/drivers/net/wireless/realtek/rtl8xxxu/8192c.c index b1c5a9971617..0abb1b092bc2 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8192c.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8192c.c @@ -13,20 +13,8 @@ * additional 8xxx chips like the 8192cu, 8188cus, etc. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" #ifdef CONFIG_RTL8XXXU_UNTESTED static struct rtl8xxxu_power_base rtl8192c_power_base = { diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/8192e.c index 562173176c60..8e123bbfc665 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8192e.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8192e.c @@ -13,20 +13,8 @@ * additional 8xxx chips like the 8192cu, 8188cus, etc. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static const struct rtl8xxxu_reg8val rtl8192e_mac_init_table[] = { {0x011, 0xeb}, {0x012, 0x07}, {0x014, 0x75}, {0x303, 0xa7}, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8192f.c b/drivers/net/wireless/realtek/rtl8xxxu/8192f.c index 843ff0269b39..cd2156b7a57a 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8192f.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8192f.c @@ -11,20 +11,8 @@ * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static const struct rtl8xxxu_reg8val rtl8192f_mac_init_table[] = { {0x420, 0x00}, {0x422, 0x78}, {0x428, 0x0a}, {0x429, 0x10}, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8710b.c b/drivers/net/wireless/realtek/rtl8xxxu/8710b.c index ea1cb0d8554e..11c63c320eae 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8710b.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8710b.c @@ -11,20 +11,8 @@ * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static const struct rtl8xxxu_reg8val rtl8710b_mac_init_table[] = { {0x421, 0x0F}, {0x428, 0x0A}, {0x429, 0x10}, {0x430, 0x00}, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8723a.c b/drivers/net/wireless/realtek/rtl8xxxu/8723a.c index 9f03bf163c97..ecbc324e4609 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8723a.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8723a.c @@ -13,20 +13,8 @@ * additional 8xxx chips like the 8192cu, 8188cus, etc. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static struct rtl8xxxu_power_base rtl8723a_power_base = { .reg_0e00 = 0x0a0c0c0c, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8723b.c b/drivers/net/wireless/realtek/rtl8xxxu/8723b.c index 0880049373b0..cc2e60b06f64 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/8723b.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/8723b.c @@ -13,20 +13,8 @@ * additional 8xxx chips like the 8192cu, 8188cus, etc. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" static const struct rtl8xxxu_reg8val rtl8723b_mac_init_table[] = { {0x02f, 0x30}, {0x035, 0x00}, {0x039, 0x08}, {0x04e, 0xe0}, diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c index cda05a6e4772..89a841b4e8d5 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c @@ -13,20 +13,9 @@ * additional 8xxx chips like the 8192cu, 8188cus, etc. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include "rtl8xxxu.h" #include "regs.h" +#include "rtl8xxxu.h" #define DRIVER_NAME "rtl8xxxu" diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h index c28ff9dde625..f42463e595cc 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h @@ -5,8 +5,9 @@ * Register definitions taken from original Realtek rtl8723au driver */ -#include #include +#include +#include #define RTL8XXXU_DEBUG_REG_WRITE 0x01 #define RTL8XXXU_DEBUG_REG_READ 0x02 -- 2.25.1