Skip to contentSkip to conversation

staging: wfx: remove unused included header files

PATCH In review Muhammad Usama Anjum 3 participants 6 messages Feb 11, 2021 – Mar 9, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wfx: remove unused included header files

Many header files have been included, but never used. Those header files have been removed.

---
 drivers/staging/wfx/bh.c              | 1 -
 drivers/staging/wfx/bh.h              | 4 ----
 drivers/staging/wfx/bus.h             | 3 ---
 drivers/staging/wfx/bus_sdio.c        | 6 ------
 drivers/staging/wfx/bus_spi.c         | 7 -------
 drivers/staging/wfx/data_rx.c         | 5 -----
 drivers/staging/wfx/data_tx.c         | 5 -----
 drivers/staging/wfx/data_tx.h         | 3 ---
 drivers/staging/wfx/debug.c           | 6 ------
 drivers/staging/wfx/fwio.c            | 2 --
 drivers/staging/wfx/hif_api_cmd.h     | 4 ----
 drivers/staging/wfx/hif_api_general.h | 9 ---------
 drivers/staging/wfx/hif_tx.c          | 4 ----
 drivers/staging/wfx/hif_tx_mib.c      | 5 -----
 drivers/staging/wfx/hwio.c            | 3 ---
 drivers/staging/wfx/hwio.h            | 2 --
 drivers/staging/wfx/key.c             | 2 --
 drivers/staging/wfx/key.h             | 2 --
 drivers/staging/wfx/main.c            | 7 -------
 drivers/staging/wfx/main.h            | 3 ---
 drivers/staging/wfx/queue.c           | 4 ----
 drivers/staging/wfx/queue.h           | 3 ---
 drivers/staging/wfx/scan.h            | 2 --
 drivers/staging/wfx/sta.c             | 6 ------
 drivers/staging/wfx/sta.h             | 2 --
 drivers/staging/wfx/traces.h          | 3 ---
 drivers/staging/wfx/wfx.h             | 3 ---
 27 files changed, 106 deletions(-)
drivers/staging/wfx/bh.c +0 -1
index ed53d0b45592..cd6bcfdfbe9a 100644
@@ -5,7 +5,6 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/gpio/consumer.h>
 #include <net/mac80211.h>
 
 #include "bh.h"
drivers/staging/wfx/bh.h +0 -4
index 78c49329e22a..92ef3298d4ac 100644
@@ -8,10 +8,6 @@
 #ifndef WFX_BH_H
 #define WFX_BH_H
 
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-
 struct wfx_dev;
 
 struct wfx_hif {
drivers/staging/wfx/bus.h +0 -3
index ca04b3da6204..ea3911485307 100644
@@ -8,9 +8,6 @@
 #ifndef WFX_BUS_H
 #define WFX_BUS_H
 
-#include <linux/mmc/sdio_func.h>
-#include <linux/spi/spi.h>
-
 #define WFX_REG_CONFIG        0x0
 #define WFX_REG_CONTROL       0x1
 #define WFX_REG_IN_OUT_QUEUE  0x2
drivers/staging/wfx/bus_sdio.c +0 -6
index e06d7e1ebe9c..588edce44854 100644
@@ -5,19 +5,13 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/module.h>
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/card.h>
-#include <linux/interrupt.h>
 #include <linux/of_irq.h>
-#include <linux/irq.h>
 
 #include "bus.h"
 #include "wfx.h"
-#include "hwio.h"
-#include "main.h"
-#include "bh.h"
 
 static const struct wfx_platform_data wfx_sdio_pdata = {
 	.file_fw = "wfm_wf200",
drivers/staging/wfx/bus_spi.c +0 -7
index a99125d1a30d..f89855abe9f8 100644
@@ -6,19 +6,12 @@
  * Copyright (c) 2011, Sagrad Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/module.h>
-#include <linux/delay.h>
-#include <linux/gpio/consumer.h>
 #include <linux/spi/spi.h>
-#include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/of.h>
 
 #include "bus.h"
 #include "wfx.h"
-#include "hwio.h"
-#include "main.h"
-#include "bh.h"
 
 #define SET_WRITE 0x7FFF        /* usage: and operation */
 #define SET_READ 0x8000         /* usage: or operation */
drivers/staging/wfx/data_rx.c +0 -5
index 385f2d42a0e2..2cfa16279220 100644
@@ -5,13 +5,8 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/etherdevice.h>
-#include <net/mac80211.h>
-
 #include "data_rx.h"
 #include "wfx.h"
-#include "bh.h"
-#include "sta.h"
 
 static void wfx_rx_handle_ba(struct wfx_vif *wvif, struct ieee80211_mgmt *mgmt)
 {
drivers/staging/wfx/data_tx.c +0 -5
index 77fb104efdec..76f26e3c4381 100644
@@ -6,14 +6,9 @@
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <net/mac80211.h>
-#include <linux/etherdevice.h>
 
-#include "data_tx.h"
 #include "wfx.h"
-#include "bh.h"
 #include "sta.h"
-#include "queue.h"
-#include "debug.h"
 #include "traces.h"
 #include "hif_tx_mib.h"
 
drivers/staging/wfx/data_tx.h +0 -3
index 401363d6b563..6b3020097efa 100644
@@ -8,9 +8,6 @@
 #ifndef WFX_DATA_TX_H
 #define WFX_DATA_TX_H
 
-#include <linux/list.h>
-#include <net/mac80211.h>
-
 #include "hif_api_cmd.h"
 #include "hif_api_mib.h"
 
drivers/staging/wfx/debug.c +0 -6
index eedada78c25f..3e87d13eb358 100644
@@ -5,15 +5,9 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/debugfs.h>
-#include <linux/seq_file.h>
-#include <linux/crc32.h>
-
 #include "debug.h"
 #include "wfx.h"
 #include "sta.h"
-#include "main.h"
-#include "hif_tx.h"
 #include "hif_tx_mib.h"
 
 #define CREATE_TRACE_POINTS
drivers/staging/wfx/fwio.c +0 -2
index 1b8aec02d169..1bb9054871c4 100644
@@ -6,8 +6,6 @@
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/firmware.h>
-#include <linux/slab.h>
-#include <linux/mm.h>
 #include <linux/bitfield.h>
 
 #include "fwio.h"
drivers/staging/wfx/hif_api_cmd.h +0 -4
index 11bc1a58edae..d6b961092606 100644
@@ -8,10 +8,6 @@
 #ifndef WFX_HIF_API_CMD_H
 #define WFX_HIF_API_CMD_H
 
-#include <linux/ieee80211.h>
-
-#include "hif_api_general.h"
-
 enum hif_requests_ids {
 	HIF_REQ_ID_RESET                = 0x0a,
 	HIF_REQ_ID_READ_MIB             = 0x05,
drivers/staging/wfx/hif_api_general.h +0 -9
index 24188945718d..70b253d0265d 100644
@@ -8,15 +8,6 @@
 #ifndef WFX_HIF_API_GENERAL_H
 #define WFX_HIF_API_GENERAL_H
 
-#ifdef __KERNEL__
-#include <linux/types.h>
-#include <linux/if_ether.h>
-#else
-#include <net/ethernet.h>
-#include <stdint.h>
-#define __packed __attribute__((__packed__))
-#endif
-
 #define HIF_ID_IS_INDICATION      0x80
 #define HIF_COUNTER_MAX           7
 
drivers/staging/wfx/hif_tx.c +0 -4
index 63b437261eb7..17dc13321978 100644
@@ -6,11 +6,7 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/etherdevice.h>
-
-#include "hif_tx.h"
 #include "wfx.h"
-#include "bh.h"
 #include "hwio.h"
 #include "debug.h"
 #include "sta.h"
drivers/staging/wfx/hif_tx_mib.c +0 -5
index 1926cf1b62be..6432ed86505c 100644
@@ -6,13 +6,8 @@
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (C) 2010, ST-Ericsson SA
  */
-
-#include <linux/etherdevice.h>
-
 #include "wfx.h"
-#include "hif_tx.h"
 #include "hif_tx_mib.h"
-#include "hif_api_mib.h"
 
 int hif_set_output_power(struct wfx_vif *wvif, int val)
 {
drivers/staging/wfx/hwio.c +0 -3
index 36fbc5b5d64c..089bb41be149 100644
@@ -5,13 +5,10 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/kernel.h>
-#include <linux/delay.h>
 #include <linux/slab.h>
 
 #include "hwio.h"
 #include "wfx.h"
-#include "bus.h"
 #include "traces.h"
 
 /*
drivers/staging/wfx/hwio.h +0 -2
index 0b8e4f7157df..8bb9bcfc3182 100644
@@ -8,8 +8,6 @@
 #ifndef WFX_HWIO_H
 #define WFX_HWIO_H
 
-#include <linux/types.h>
-
 struct wfx_dev;
 
 int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t buf_len);
drivers/staging/wfx/key.c +0 -2
index 2ab82bed4c1b..c93d07dcdc10 100644
@@ -5,12 +5,10 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/etherdevice.h>
 #include <net/mac80211.h>
 
 #include "key.h"
 #include "wfx.h"
-#include "hif_tx_mib.h"
 
 static int wfx_alloc_key(struct wfx_dev *wdev)
 {
drivers/staging/wfx/key.h +0 -2
index 70a44d0ca35e..4dc9feadaba2 100644
@@ -8,8 +8,6 @@
 #ifndef WFX_KEY_H
 #define WFX_KEY_H
 
-#include <net/mac80211.h>
-
 struct wfx_dev;
 struct wfx_vif;
 
drivers/staging/wfx/main.c +0 -7
index e7bc1988124a..b9ea9a93fe1a 100644
@@ -10,28 +10,21 @@
  * Copyright (c) 2006, Michael Wu <[email protected]>
  * Copyright (c) 2004-2006 Jean-Baptiste Note <[email protected]>, et al.
  */
-#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_net.h>
-#include <linux/gpio/consumer.h>
 #include <linux/mmc/sdio_func.h>
 #include <linux/spi/spi.h>
-#include <linux/etherdevice.h>
 #include <linux/firmware.h>
 
-#include "main.h"
 #include "wfx.h"
 #include "fwio.h"
 #include "hwio.h"
 #include "bus.h"
-#include "bh.h"
 #include "sta.h"
 #include "key.h"
 #include "scan.h"
 #include "debug.h"
-#include "data_tx.h"
 #include "hif_tx_mib.h"
-#include "hif_api_cmd.h"
 
 #define WFX_PDS_MAX_SIZE 1500
 
drivers/staging/wfx/main.h +0 -3
index a0db322383a3..086bcc041b90 100644
@@ -10,11 +10,8 @@
 #ifndef WFX_MAIN_H
 #define WFX_MAIN_H
 
-#include <linux/device.h>
 #include <linux/gpio/consumer.h>
 
-#include "hif_api_general.h"
-
 struct wfx_dev;
 struct hwbus_ops;
 
drivers/staging/wfx/queue.c +0 -4
index 31c37f69c295..3bddf282a4ce 100644
@@ -5,13 +5,9 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/sched.h>
 #include <net/mac80211.h>
 
-#include "queue.h"
 #include "wfx.h"
-#include "sta.h"
-#include "data_tx.h"
 #include "traces.h"
 
 void wfx_tx_lock(struct wfx_dev *wdev)
drivers/staging/wfx/queue.h +0 -3
index 80ba19455ef3..e43aa9dfbc45 100644
@@ -8,9 +8,6 @@
 #ifndef WFX_QUEUE_H
 #define WFX_QUEUE_H
 
-#include <linux/skbuff.h>
-#include <linux/atomic.h>
-
 struct wfx_dev;
 struct wfx_vif;
 
drivers/staging/wfx/scan.h +0 -2
index c7496a766478..e5b7eef78858 100644
@@ -8,8 +8,6 @@
 #ifndef WFX_SCAN_H
 #define WFX_SCAN_H
 
-#include <net/mac80211.h>
-
 struct wfx_dev;
 struct wfx_vif;
 
drivers/staging/wfx/sta.c +0 -6
index 196779a1b89a..5585f9e876e1 100644
@@ -5,17 +5,11 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/etherdevice.h>
 #include <net/mac80211.h>
 
 #include "sta.h"
 #include "wfx.h"
-#include "fwio.h"
-#include "bh.h"
-#include "key.h"
 #include "scan.h"
-#include "debug.h"
-#include "hif_tx.h"
 #include "hif_tx_mib.h"
 
 #define HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES 2
drivers/staging/wfx/sta.h +0 -2
index d7b5df5ea4e6..a3fb9fc93fa4 100644
@@ -8,8 +8,6 @@
 #ifndef WFX_STA_H
 #define WFX_STA_H
 
-#include <net/mac80211.h>
-
 struct wfx_dev;
 struct wfx_vif;
 
drivers/staging/wfx/traces.h +0 -3
index e34c7a538c65..afe1074e09b3 100644
@@ -12,11 +12,8 @@
 #define _WFX_TRACE_H
 
 #include <linux/tracepoint.h>
-#include <net/mac80211.h>
 
 #include "bus.h"
-#include "hif_api_cmd.h"
-#include "hif_api_mib.h"
 
 /* The hell below need some explanations. For each symbolic number, we need to
  * define it with TRACE_DEFINE_ENUM() and in a list for __print_symbolic.
drivers/staging/wfx/wfx.h +0 -3
index 94898680ccde..a185b82795c4 100644
@@ -10,9 +10,6 @@
 #ifndef WFX_H
 #define WFX_H
 
-#include <linux/completion.h>
-#include <linux/workqueue.h>
-#include <linux/mutex.h>
 #include <linux/nospec.h>
 #include <net/mac80211.h>
 
Signature · 1 line
2.25.1
#1 lore raw

Hello Muhammad,

Sorry, I am a bit late for the review of this patch. Thank you for your contribution.

Quoted 40 lines · On Thursday 11 February 2021 15:36:37 CET Muhammad Usama Anjum wrote:

Many header files have been included, but never used. Those header files have been removed.

---
 drivers/staging/wfx/bh.c              | 1 -
 drivers/staging/wfx/bh.h              | 4 ----
 drivers/staging/wfx/bus.h             | 3 ---
 drivers/staging/wfx/bus_sdio.c        | 6 ------
 drivers/staging/wfx/bus_spi.c         | 7 -------
 drivers/staging/wfx/data_rx.c         | 5 -----
 drivers/staging/wfx/data_tx.c         | 5 -----
 drivers/staging/wfx/data_tx.h         | 3 ---
 drivers/staging/wfx/debug.c           | 6 ------
 drivers/staging/wfx/fwio.c            | 2 --
 drivers/staging/wfx/hif_api_cmd.h     | 4 ----
 drivers/staging/wfx/hif_api_general.h | 9 ---------
 drivers/staging/wfx/hif_tx.c          | 4 ----
 drivers/staging/wfx/hif_tx_mib.c      | 5 -----
 drivers/staging/wfx/hwio.c            | 3 ---
 drivers/staging/wfx/hwio.h            | 2 --
 drivers/staging/wfx/key.c             | 2 --
 drivers/staging/wfx/key.h             | 2 --
 drivers/staging/wfx/main.c            | 7 -------
 drivers/staging/wfx/main.h            | 3 ---
 drivers/staging/wfx/queue.c           | 4 ----
 drivers/staging/wfx/queue.h           | 3 ---
 drivers/staging/wfx/scan.h            | 2 --
 drivers/staging/wfx/sta.c             | 6 ------
 drivers/staging/wfx/sta.h             | 2 --
 drivers/staging/wfx/traces.h          | 3 ---
 drivers/staging/wfx/wfx.h             | 3 ---
 27 files changed, 106 deletions(-)
drivers/staging/wfx/bh.c +0 -0
index ed53d0b45592..cd6bcfdfbe9a 100644

drivers/staging/wfx/bh.c line 8

Quoted 5 lines
drivers/staging/wfx/bh.c +0 -1
@@ -5,7 +5,6 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/gpio/consumer.h>
 #include <net/mac80211.h>

Though bh.c refers to gpiod_set_value_cansleep()

Quoted 6 lines
drivers/staging/wfx/bh.c +0 -0
 #include "bh.h"
drivers/staging/wfx/bh.h +0 -0
index 78c49329e22a..92ef3298d4ac 100644

drivers/staging/wfx/bh.h line 13

Quoted 10 lines
drivers/staging/wfx/bh.h +0 -4
@@ -8,10 +8,6 @@
 #ifndef WFX_BH_H
 #define WFX_BH_H
 
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-
 struct wfx_dev;
 
 struct wfx_hif {

Ditto, bh.h refers to atomic_t, struct work_struct and struct completion. If you try to compile bh.h alone (with something like gcc -xc .../bh.h) it won't work.

Maybe it works now because we are lucky in the order the headers are included, but I think it is not sufficient.

[... same problem repeats multiple times in the following ...]

Signature · 1 line
Jérôme Pouiller
#2 lore raw

Hello Greg,

Quoted 76 lines · On Tuesday 2 March 2021 16:01:25 CET Jérôme Pouiller wrote:

Hello Muhammad,

Sorry, I am a bit late for the review of this patch. Thank you for your contribution.

Quoted 40 lines · On Thursday 11 February 2021 15:36:37 CET Muhammad Usama Anjum wrote:

Many header files have been included, but never used. Those header files have been removed.

---
 drivers/staging/wfx/bh.c              | 1 -
 drivers/staging/wfx/bh.h              | 4 ----
 drivers/staging/wfx/bus.h             | 3 ---
 drivers/staging/wfx/bus_sdio.c        | 6 ------
 drivers/staging/wfx/bus_spi.c         | 7 -------
 drivers/staging/wfx/data_rx.c         | 5 -----
 drivers/staging/wfx/data_tx.c         | 5 -----
 drivers/staging/wfx/data_tx.h         | 3 ---
 drivers/staging/wfx/debug.c           | 6 ------
 drivers/staging/wfx/fwio.c            | 2 --
 drivers/staging/wfx/hif_api_cmd.h     | 4 ----
 drivers/staging/wfx/hif_api_general.h | 9 ---------
 drivers/staging/wfx/hif_tx.c          | 4 ----
 drivers/staging/wfx/hif_tx_mib.c      | 5 -----
 drivers/staging/wfx/hwio.c            | 3 ---
 drivers/staging/wfx/hwio.h            | 2 --
 drivers/staging/wfx/key.c             | 2 --
 drivers/staging/wfx/key.h             | 2 --
 drivers/staging/wfx/main.c            | 7 -------
 drivers/staging/wfx/main.h            | 3 ---
 drivers/staging/wfx/queue.c           | 4 ----
 drivers/staging/wfx/queue.h           | 3 ---
 drivers/staging/wfx/scan.h            | 2 --
 drivers/staging/wfx/sta.c             | 6 ------
 drivers/staging/wfx/sta.h             | 2 --
 drivers/staging/wfx/traces.h          | 3 ---
 drivers/staging/wfx/wfx.h             | 3 ---
 27 files changed, 106 deletions(-)
drivers/staging/wfx/bh.c +0 -0
index ed53d0b45592..cd6bcfdfbe9a 100644

drivers/staging/wfx/bh.c line 8

Quoted 5 lines
drivers/staging/wfx/bh.c +0 -1
@@ -5,7 +5,6 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/gpio/consumer.h>
 #include <net/mac80211.h>

Though bh.c refers to gpiod_set_value_cansleep()

Quoted 6 lines
drivers/staging/wfx/bh.c +0 -0
 #include "bh.h"
drivers/staging/wfx/bh.h +0 -0
index 78c49329e22a..92ef3298d4ac 100644

drivers/staging/wfx/bh.h line 13

Quoted 10 lines
drivers/staging/wfx/bh.h +0 -4
@@ -8,10 +8,6 @@
 #ifndef WFX_BH_H
 #define WFX_BH_H
 
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-
 struct wfx_dev;
 
 struct wfx_hif {

Ditto, bh.h refers to atomic_t, struct work_struct and struct completion. If you try to compile bh.h alone (with something like gcc -xc .../bh.h) it won't work.

Quoted 5 lines

Maybe it works now because we are lucky in the order the headers are included, but I think it is not sufficient.

[... same problem repeats multiple times in the following ...]

Greg, if nobody has any opinion on that, I think that this patch should be reverted.

Signature · 1 line
Jérôme Pouiller
maintainer
#3 lore raw
Quoted 79 lines · Jérôme Pouiller

Hello Greg,

Quoted 76 lines · On Tuesday 2 March 2021 16:01:25 CET Jérôme Pouiller wrote:

Hello Muhammad,

Sorry, I am a bit late for the review of this patch. Thank you for your contribution.

Quoted 40 lines · On Thursday 11 February 2021 15:36:37 CET Muhammad Usama Anjum wrote:

Many header files have been included, but never used. Those header files have been removed.

---
 drivers/staging/wfx/bh.c              | 1 -
 drivers/staging/wfx/bh.h              | 4 ----
 drivers/staging/wfx/bus.h             | 3 ---
 drivers/staging/wfx/bus_sdio.c        | 6 ------
 drivers/staging/wfx/bus_spi.c         | 7 -------
 drivers/staging/wfx/data_rx.c         | 5 -----
 drivers/staging/wfx/data_tx.c         | 5 -----
 drivers/staging/wfx/data_tx.h         | 3 ---
 drivers/staging/wfx/debug.c           | 6 ------
 drivers/staging/wfx/fwio.c            | 2 --
 drivers/staging/wfx/hif_api_cmd.h     | 4 ----
 drivers/staging/wfx/hif_api_general.h | 9 ---------
 drivers/staging/wfx/hif_tx.c          | 4 ----
 drivers/staging/wfx/hif_tx_mib.c      | 5 -----
 drivers/staging/wfx/hwio.c            | 3 ---
 drivers/staging/wfx/hwio.h            | 2 --
 drivers/staging/wfx/key.c             | 2 --
 drivers/staging/wfx/key.h             | 2 --
 drivers/staging/wfx/main.c            | 7 -------
 drivers/staging/wfx/main.h            | 3 ---
 drivers/staging/wfx/queue.c           | 4 ----
 drivers/staging/wfx/queue.h           | 3 ---
 drivers/staging/wfx/scan.h            | 2 --
 drivers/staging/wfx/sta.c             | 6 ------
 drivers/staging/wfx/sta.h             | 2 --
 drivers/staging/wfx/traces.h          | 3 ---
 drivers/staging/wfx/wfx.h             | 3 ---
 27 files changed, 106 deletions(-)
drivers/staging/wfx/bh.c +0 -0
index ed53d0b45592..cd6bcfdfbe9a 100644

drivers/staging/wfx/bh.c line 8

Quoted 5 lines
drivers/staging/wfx/bh.c +0 -1
@@ -5,7 +5,6 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/gpio/consumer.h>
 #include <net/mac80211.h>

Though bh.c refers to gpiod_set_value_cansleep()

Quoted 6 lines
drivers/staging/wfx/bh.c +0 -0
 #include "bh.h"
drivers/staging/wfx/bh.h +0 -0
index 78c49329e22a..92ef3298d4ac 100644

drivers/staging/wfx/bh.h line 13

Quoted 10 lines
drivers/staging/wfx/bh.h +0 -4
@@ -8,10 +8,6 @@
 #ifndef WFX_BH_H
 #define WFX_BH_H
 
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-
 struct wfx_dev;
 
 struct wfx_hif {

Ditto, bh.h refers to atomic_t, struct work_struct and struct completion. If you try to compile bh.h alone (with something like gcc -xc .../bh.h) it won't work.

Quoted 8 lines
Quoted 5 lines

Maybe it works now because we are lucky in the order the headers are included, but I think it is not sufficient.

[... same problem repeats multiple times in the following ...]

Greg, if nobody has any opinion on that, I think that this patch should be reverted.

Nothing is breaking, why should it be reverted?

You never build a .h file alone :)

Anyway, sure, I'll revert it, what is the commit id?

thanks,

greg k-h

#4 lore raw
Quoted 7 lines · On Tuesday 9 March 2021 14:07:43 CET Greg KH wrote:
Quoted 6 lines · Jérôme Pouiller

Hello Greg,

Quoted 3 lines · On Tuesday 2 March 2021 16:01:25 CET Jérôme Pouiller wrote:

Hello Muhammad,

Sorry, I am a bit late for the review of this patch. Thank you for

your

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

contribution.

On Thursday 11 February 2021 15:36:37 CET Muhammad Usama Anjum

Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Many header files have been included, but never used. Those

header

Quoted 62 lines
Quoted 62 lines
Quoted 62 lines
Quoted 38 lines

files have been removed.

---
 drivers/staging/wfx/bh.c              | 1 -
 drivers/staging/wfx/bh.h              | 4 ----
 drivers/staging/wfx/bus.h             | 3 ---
 drivers/staging/wfx/bus_sdio.c        | 6 ------
 drivers/staging/wfx/bus_spi.c         | 7 -------
 drivers/staging/wfx/data_rx.c         | 5 -----
 drivers/staging/wfx/data_tx.c         | 5 -----
 drivers/staging/wfx/data_tx.h         | 3 ---
 drivers/staging/wfx/debug.c           | 6 ------
 drivers/staging/wfx/fwio.c            | 2 --
 drivers/staging/wfx/hif_api_cmd.h     | 4 ----
 drivers/staging/wfx/hif_api_general.h | 9 ---------
 drivers/staging/wfx/hif_tx.c          | 4 ----
 drivers/staging/wfx/hif_tx_mib.c      | 5 -----
 drivers/staging/wfx/hwio.c            | 3 ---
 drivers/staging/wfx/hwio.h            | 2 --
 drivers/staging/wfx/key.c             | 2 --
 drivers/staging/wfx/key.h             | 2 --
 drivers/staging/wfx/main.c            | 7 -------
 drivers/staging/wfx/main.h            | 3 ---
 drivers/staging/wfx/queue.c           | 4 ----
 drivers/staging/wfx/queue.h           | 3 ---
 drivers/staging/wfx/scan.h            | 2 --
 drivers/staging/wfx/sta.c             | 6 ------
 drivers/staging/wfx/sta.h             | 2 --
 drivers/staging/wfx/traces.h          | 3 ---
 drivers/staging/wfx/wfx.h             | 3 ---
 27 files changed, 106 deletions(-)
drivers/staging/wfx/bh.c +0 -0
index ed53d0b45592..cd6bcfdfbe9a 100644

drivers/staging/wfx/bh.c line 8

Quoted 5 lines
drivers/staging/wfx/bh.c +0 -1
@@ -5,7 +5,6 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/gpio/consumer.h>
 #include <net/mac80211.h>

Though bh.c refers to gpiod_set_value_cansleep()

Quoted 15 lines
drivers/staging/wfx/bh.c +0 -0
 #include "bh.h"
drivers/staging/wfx/bh.h +0 -4
index 78c49329e22a..92ef3298d4ac 100644
@@ -8,10 +8,6 @@
 #ifndef WFX_BH_H
 #define WFX_BH_H
 
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-
 struct wfx_dev;
 
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/staging/wfx/bh.h line 13

Quoted 1 line
drivers/staging/wfx/bh.h +0 -0
 struct wfx_hif {

Ditto, bh.h refers to atomic_t, struct work_struct and struct completion. If you try to compile bh.h alone (with something like gcc -xc .../bh.h) it won't work.

Maybe it works now because we are lucky in the order the headers

are

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

included, but I think it is not sufficient.

[... same problem repeats multiple times in the following ...]

Greg, if nobody has any opinion on that, I think that this patch

should

Quoted 3 lines
Quoted 1 line

be reverted.

Nothing is breaking, why should it be reverted?

Because it is less maintainable?

Quoted 1 line

You never build a .h file alone :)

hmmm... notwithstanding, I thing that the code should not depend on the order the headers are included. You don't?

Quoted 1 line

Anyway, sure, I'll revert it, what is the commit id?

commit 314fd52f01ea "staging: wfx: remove unused included header files"

Thank you!

Signature · 1 line
Jérôme Pouiller
maintainer
#5 lore raw
Quoted 99 lines · Jérôme Pouiller
Quoted 7 lines · On Tuesday 9 March 2021 14:07:43 CET Greg KH wrote:
Quoted 6 lines · Jérôme Pouiller

Hello Greg,

Quoted 3 lines · On Tuesday 2 March 2021 16:01:25 CET Jérôme Pouiller wrote:

Hello Muhammad,

Sorry, I am a bit late for the review of this patch. Thank you for

your

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

contribution.

On Thursday 11 February 2021 15:36:37 CET Muhammad Usama Anjum

Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Many header files have been included, but never used. Those

header

Quoted 62 lines
Quoted 62 lines
Quoted 62 lines
Quoted 38 lines

files have been removed.

---
 drivers/staging/wfx/bh.c              | 1 -
 drivers/staging/wfx/bh.h              | 4 ----
 drivers/staging/wfx/bus.h             | 3 ---
 drivers/staging/wfx/bus_sdio.c        | 6 ------
 drivers/staging/wfx/bus_spi.c         | 7 -------
 drivers/staging/wfx/data_rx.c         | 5 -----
 drivers/staging/wfx/data_tx.c         | 5 -----
 drivers/staging/wfx/data_tx.h         | 3 ---
 drivers/staging/wfx/debug.c           | 6 ------
 drivers/staging/wfx/fwio.c            | 2 --
 drivers/staging/wfx/hif_api_cmd.h     | 4 ----
 drivers/staging/wfx/hif_api_general.h | 9 ---------
 drivers/staging/wfx/hif_tx.c          | 4 ----
 drivers/staging/wfx/hif_tx_mib.c      | 5 -----
 drivers/staging/wfx/hwio.c            | 3 ---
 drivers/staging/wfx/hwio.h            | 2 --
 drivers/staging/wfx/key.c             | 2 --
 drivers/staging/wfx/key.h             | 2 --
 drivers/staging/wfx/main.c            | 7 -------
 drivers/staging/wfx/main.h            | 3 ---
 drivers/staging/wfx/queue.c           | 4 ----
 drivers/staging/wfx/queue.h           | 3 ---
 drivers/staging/wfx/scan.h            | 2 --
 drivers/staging/wfx/sta.c             | 6 ------
 drivers/staging/wfx/sta.h             | 2 --
 drivers/staging/wfx/traces.h          | 3 ---
 drivers/staging/wfx/wfx.h             | 3 ---
 27 files changed, 106 deletions(-)
drivers/staging/wfx/bh.c +0 -0
index ed53d0b45592..cd6bcfdfbe9a 100644

drivers/staging/wfx/bh.c line 8

Quoted 5 lines
drivers/staging/wfx/bh.c +0 -1
@@ -5,7 +5,6 @@
  * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
-#include <linux/gpio/consumer.h>
 #include <net/mac80211.h>

Though bh.c refers to gpiod_set_value_cansleep()

Quoted 15 lines
drivers/staging/wfx/bh.c +0 -0
 #include "bh.h"
drivers/staging/wfx/bh.h +0 -4
index 78c49329e22a..92ef3298d4ac 100644
@@ -8,10 +8,6 @@
 #ifndef WFX_BH_H
 #define WFX_BH_H
 
-#include <linux/atomic.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-
 struct wfx_dev;
 
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/staging/wfx/bh.h line 13

Quoted 1 line
drivers/staging/wfx/bh.h +0 -0
 struct wfx_hif {

Ditto, bh.h refers to atomic_t, struct work_struct and struct completion. If you try to compile bh.h alone (with something like gcc -xc .../bh.h) it won't work.

Maybe it works now because we are lucky in the order the headers

are

Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

included, but I think it is not sufficient.

[... same problem repeats multiple times in the following ...]

Greg, if nobody has any opinion on that, I think that this patch

should

Quoted 3 lines
Quoted 1 line

be reverted.

Nothing is breaking, why should it be reverted?

Because it is less maintainable?

Quoted 8 lines
Quoted 1 line

You never build a .h file alone :)

hmmm... notwithstanding, I thing that the code should not depend on the order the headers are included. You don't?

Quoted 1 line

Anyway, sure, I'll revert it, what is the commit id?

commit 314fd52f01ea "staging: wfx: remove unused included header files"

Now reverted, thanks.

greg k-h