[PATCH] linux/fs.h: Remove repeated struct declaration

2021-04-19 Thread Wan Jiabing
struct iov_iter is declared at 66th line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 include/linux/fs.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index ec8f3ddf4a6a..8d11ecd767d2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1883,8 +1883,6 @@ struct dir_context {
  */
 #define REMAP_FILE_ADVISORY(REMAP_FILE_CAN_SHORTEN)
 
-struct iov_iter;
-
 struct file_operations {
struct module *owner;
loff_t (*llseek) (struct file *, loff_t, int);
-- 
2.25.1



[PATCH] linux/mount.h: Remove duplicate struct declaration

2021-04-19 Thread Wan Jiabing
struct path is declared at 85th line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 include/linux/mount.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index 5d92a7e1a742..9ebf8af88bff 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -93,8 +93,6 @@ extern struct vfsmount *mntget(struct vfsmount *mnt);
 extern struct vfsmount *mnt_clone_internal(const struct path *path);
 extern bool __mnt_is_readonly(struct vfsmount *mnt);
 extern bool mnt_may_suid(struct vfsmount *mnt);
-
-struct path;
 extern struct vfsmount *clone_private_mount(const struct path *path);
 extern int __mnt_want_write(struct vfsmount *);
 extern void __mnt_drop_write(struct vfsmount *);
-- 
2.25.1



[PATCH] libnvdimm.h: Remove duplicate struct declaration

2021-04-19 Thread Wan Jiabing
struct device is declared at 133rd line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 include/linux/libnvdimm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
index 01f251b6e36c..89b69e645ac7 100644
--- a/include/linux/libnvdimm.h
+++ b/include/linux/libnvdimm.h
@@ -141,7 +141,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct 
device *dev,
 
 struct nvdimm_bus;
 struct module;
-struct device;
 struct nd_blk_region;
 struct nd_blk_region_desc {
int (*enable)(struct nvdimm_bus *nvdimm_bus, struct device *dev);
-- 
2.25.1



[PATCH] drm/tegra: Remove duplicate struct declaration

2021-04-19 Thread Wan Jiabing
struct tegra_dc is declared at 13rd line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/tegra/hub.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/hub.h b/drivers/gpu/drm/tegra/hub.h
index 3efa1be07ff8..23c4b2115ed1 100644
--- a/drivers/gpu/drm/tegra/hub.h
+++ b/drivers/gpu/drm/tegra/hub.h
@@ -72,7 +72,6 @@ to_tegra_display_hub_state(struct drm_private_state *priv)
return container_of(priv, struct tegra_display_hub_state, base);
 }
 
-struct tegra_dc;
 struct tegra_plane;
 
 int tegra_display_hub_prepare(struct tegra_display_hub *hub);
-- 
2.25.1



[PATCH] fs: f2fs: Remove unnecessary struct declaration

2021-04-18 Thread Wan Jiabing
struct dnode_of_data is defined at 897th line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 fs/f2fs/f2fs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index e2d302ae3a46..0757f9e50fd2 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3299,7 +3299,6 @@ void f2fs_hash_filename(const struct inode *dir, struct 
f2fs_filename *fname);
 /*
  * node.c
  */
-struct dnode_of_data;
 struct node_info;
 
 int f2fs_check_nid_range(struct f2fs_sb_info *sbi, nid_t nid);
-- 
2.25.1



[PATCH] infiniband: ulp: Remove unnecessary struct declaration

2021-04-15 Thread Wan Jiabing
struct ipoib_cm_tx is defined at 245th line.
And the definition is independent on the MACRO.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 drivers/infiniband/ulp/ipoib/ipoib.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h 
b/drivers/infiniband/ulp/ipoib/ipoib.h
index 179ff1d068e5..d255aa69ba6d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -677,8 +677,6 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct 
ib_wc *wc);
 void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc);
 #else
 
-struct ipoib_cm_tx;
-
 #define ipoib_max_conn_qp 0
 
 static inline int ipoib_cm_admin_enabled(struct net_device *dev)
-- 
2.25.1



[PATCH] power: reset: Remove unneeded semicolon

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning:

./drivers/power/reset/vexpress-poweroff.c:136:2-3: Unneeded semicolon

Signed-off-by: Wan Jiabing 
---
 drivers/power/reset/vexpress-poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/vexpress-poweroff.c 
b/drivers/power/reset/vexpress-poweroff.c
index 1fdbcbd95fc2..447ffdacddf9 100644
--- a/drivers/power/reset/vexpress-poweroff.c
+++ b/drivers/power/reset/vexpress-poweroff.c
@@ -133,7 +133,7 @@ static int vexpress_reset_probe(struct platform_device 
*pdev)
case FUNC_REBOOT:
ret = _vexpress_register_restart_handler(>dev);
break;
-   };
+   }
 
return ret;
 }
-- 
2.25.1



[PATCH] m68k: Remove unneeded semicolon

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning:

./arch/m68k/include/asm/sun3xflop.h:109:2-3: Unneeded semicolon

Signed-off-by: Wan Jiabing 
---
 arch/m68k/include/asm/sun3xflop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/m68k/include/asm/sun3xflop.h 
b/arch/m68k/include/asm/sun3xflop.h
index 93f2a8431c0e..bce8aabb5380 100644
--- a/arch/m68k/include/asm/sun3xflop.h
+++ b/arch/m68k/include/asm/sun3xflop.h
@@ -106,7 +106,7 @@ static void sun3x_82072_fd_outb(unsigned char value, int 
port)
case 4: /* FD_STATUS */
*(sun3x_fdc.status_r) = value;
break;
-   };
+   }
return;
 }
 
-- 
2.25.1



[PATCH] scsi: qla4xxx: Simplify judgement condition

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning:

./drivers/scsi/qla4xxx/ql4_83xx.c:475:23-25: WARNING !A || A && B is
equivalent to !A || B

Signed-off-by: Wan Jiabing 
---
 drivers/scsi/qla4xxx/ql4_83xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_83xx.c b/drivers/scsi/qla4xxx/ql4_83xx.c
index 5f56122f6664..db41d90a5b6e 100644
--- a/drivers/scsi/qla4xxx/ql4_83xx.c
+++ b/drivers/scsi/qla4xxx/ql4_83xx.c
@@ -472,8 +472,7 @@ int qla4_83xx_can_perform_reset(struct scsi_qla_host *ha)
} else if (device_map[i].device_type == ISCSI_CLASS) {
if (drv_active & (1 << device_map[i].func_num)) {
if (!iscsi_present ||
-   (iscsi_present &&
-(iscsi_func_low > device_map[i].func_num)))
+   iscsi_func_low > device_map[i].func_num)
iscsi_func_low = device_map[i].func_num;
 
iscsi_present++;
-- 
2.25.1



[PATCH] crypto: ux500: cryp: Remove duplicate argument

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning:

./drivers/crypto/ux500/cryp/cryp_p.h:84:6-27:duplicated argument to |

Signed-off-by: Wan Jiabing 
---
 drivers/crypto/ux500/cryp/cryp_p.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/ux500/cryp/cryp_p.h 
b/drivers/crypto/ux500/cryp/cryp_p.h
index 0df84eaa8531..cbbca0020eb1 100644
--- a/drivers/crypto/ux500/cryp/cryp_p.h
+++ b/drivers/crypto/ux500/cryp/cryp_p.h
@@ -81,7 +81,6 @@
 CRYP_CR_PRLG_MASK |\
 CRYP_CR_ALGODIR_MASK |\
 CRYP_CR_ALGOMODE_MASK |\
-CRYP_CR_DATATYPE_MASK |\
 CRYP_CR_KEYSIZE_MASK |\
 CRYP_CR_KEYRDEN_MASK |\
 CRYP_CR_DATATYPE_MASK)
-- 
2.25.1



[PATCH] [net] cavium/liquidio: Fix duplicate argument

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning:

./drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h:413:6-28:
duplicated argument to & or |

The CN6XXX_INTR_M1UPB0_ERR here is duplicate.
Here should be CN6XXX_INTR_M1UNB0_ERR.

Signed-off-by: Wan Jiabing 
---
 drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h 
b/drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h
index b248966837b4..7aad40b2aa73 100644
--- a/drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h
+++ b/drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h
@@ -412,7 +412,7 @@
   | CN6XXX_INTR_M0UNWI_ERR \
   | CN6XXX_INTR_M1UPB0_ERR \
   | CN6XXX_INTR_M1UPWI_ERR \
-  | CN6XXX_INTR_M1UPB0_ERR \
+  | CN6XXX_INTR_M1UNB0_ERR \
   | CN6XXX_INTR_M1UNWI_ERR \
   | CN6XXX_INTR_INSTR_DB_OF_ERR\
   | CN6XXX_INTR_SLIST_DB_OF_ERR\
-- 
2.25.1



[PATCH] sfc: Remove duplicate argument

2021-04-14 Thread Wan Jiabing
Fix the following coccicheck warning:

./drivers/net/ethernet/sfc/enum.h:80:7-28: duplicated argument to |

Signed-off-by: Wan Jiabing 
---
 drivers/net/ethernet/sfc/enum.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/enum.h b/drivers/net/ethernet/sfc/enum.h
index 3332cdf2918a..cd590e0685e5 100644
--- a/drivers/net/ethernet/sfc/enum.h
+++ b/drivers/net/ethernet/sfc/enum.h
@@ -78,7 +78,6 @@ enum efx_loopback_mode {
(1 << LOOPBACK_XAUI) |  \
(1 << LOOPBACK_GMII) |  \
(1 << LOOPBACK_SGMII) | \
-   (1 << LOOPBACK_SGMII) | \
(1 << LOOPBACK_XGBR) |  \
(1 << LOOPBACK_XFI) |   \
(1 << LOOPBACK_XAUI_FAR) |  \
-- 
2.25.1



[PATCH] scsi: megraraid: Simplify judgement condition

2021-04-12 Thread Wan Jiabing
Fix the following coccicheck warning:

./drivers/scsi/megaraid/megaraid_sas_base.c:8644:30-32:
WARNING !A || A && B is equivalent to !A || B

Signed-off-by: Wan Jiabing 
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 63a4f48bdc75..5c17bbca95d0 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -8641,8 +8641,7 @@ int megasas_update_device_list(struct megasas_instance 
*instance,
 
if (event_type & SCAN_VD_CHANNEL) {
if (!instance->requestorId ||
-   (instance->requestorId &&
-megasas_get_ld_vf_affiliation(instance, 0))) {
+   megasas_get_ld_vf_affiliation(instance, 0)) {
dcmd_ret = megasas_ld_list_query(instance,

MR_LD_QUERY_TYPE_EXPOSED_TO_HOST);
if (dcmd_ret != DCMD_SUCCESS)
-- 
2.30.2



[PATCH] perf: util: Remove unneeded variable

2021-04-12 Thread Wan Jiabing
Fix coccicheck warning:

./tools/perf/util/evlist.c:1316:5-8: Unneeded variable: "err". Return "- 
ENOMEM" on line 1341

Signed-off-by: Wan Jiabing 
---
 tools/perf/util/evlist.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 882cd1f721d9..6c2a271605d5 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -1313,7 +1313,6 @@ static int evlist__create_syswide_maps(struct evlist 
*evlist)
 {
struct perf_cpu_map *cpus;
struct perf_thread_map *threads;
-   int err = -ENOMEM;
 
/*
 * Try reading /sys/devices/system/cpu/online to get
@@ -1338,7 +1337,7 @@ static int evlist__create_syswide_maps(struct evlist 
*evlist)
 out_put:
perf_cpu_map__put(cpus);
 out:
-   return err;
+   return -ENOMEM;
 }
 
 int evlist__open(struct evlist *evlist)
-- 
2.30.2



[PATCH] [v2] selftests: powerpc: Remove unneeded variables

2021-04-12 Thread Wan Jiabing
Fix coccicheck warning:

./tools/testing/selftests/powerpc/alignment/alignment_handler.c:539:5-7:
Unneeded variable: "rc". Return "0" on line 562
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:567:5-7:
Unneeded variable: "rc". Return "0" on line 580
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:585:5-7:
Unneeded variable: "rc". Return "0" on line 594
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:600:5-7:
Unneeded variable: "rc". Return "0" on line 611
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:416:5-7:
Unneeded variable: "rc". Return "0" on line 470
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:475:5-7:
Unneeded variable: "rc". Return "0" on line 485
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:490:5-7:
Unneeded variable: "rc". Return "0" on line 506
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:511:5-7:
Unneeded variable: "rc". Return "0" on line 534
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:331:5-7:
Unneeded variable: "rc". Return "0" on line 344
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:349:5-7:
Unneeded variable: "rc". Return "0" on line 360
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:365:5-7:
Unneeded variable: "rc". Return "0" on line 392
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:397:5-7:
Unneeded variable: "rc". Return "0" on line 411

Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Modify the subject line.
---
 .../powerpc/alignment/alignment_handler.c | 48 +--
 1 file changed, 12 insertions(+), 36 deletions(-)

diff --git a/tools/testing/selftests/powerpc/alignment/alignment_handler.c 
b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
index c25cf7cd45e9..48bfb7b36d84 100644
--- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c
+++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
@@ -328,8 +328,6 @@ static bool can_open_cifile(void)
 
 int test_alignment_handler_vsx_206(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06));
 
@@ -341,13 +339,11 @@ int test_alignment_handler_vsx_206(void)
STORE_VSX_XFORM_TEST(stxvd2x);
STORE_VSX_XFORM_TEST(stxvw4x);
STORE_VSX_XFORM_TEST(stxsdx);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vsx_207(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
 
@@ -357,13 +353,11 @@ int test_alignment_handler_vsx_207(void)
LOAD_VSX_XFORM_TEST(lxsiwzx);
STORE_VSX_XFORM_TEST(stxsspx);
STORE_VSX_XFORM_TEST(stxsiwx);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vsx_300(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
 
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_00));
@@ -389,13 +383,11 @@ int test_alignment_handler_vsx_300(void)
STORE_VSX_XFORM_TEST(stxvx);
STORE_VSX_XFORM_TEST(stxvl);
STORE_VSX_XFORM_TEST(stxvll);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vsx_prefix(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
 
@@ -408,13 +400,11 @@ int test_alignment_handler_vsx_prefix(void)
STORE_VSX_8LS_PREFIX_TEST(PSTXSSP, 0);
STORE_VSX_8LS_PREFIX_TEST(PSTXV0, 0);
STORE_VSX_8LS_PREFIX_TEST(PSTXV1, 1);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_integer(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
 
printf("Integer\n");
@@ -467,13 +457,11 @@ int test_alignment_handler_integer(void)
STORE_DFORM_TEST(stmw);
 #endif
 
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_integer_206(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06));
 
@@ -482,13 +470,11 @@ int test_alignment_handler_integer_206(void)
LOAD_XFORM_TEST(ldbrx);
STORE_XFORM_TEST(stdbrx);
 
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_integer_prefix(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
 
@@ -503,13 +489,11 @@ int test_alignment_handler_integer_prefix(void)
STORE_MLS_PREFIX_TEST(PSTH);
STORE_MLS_PREFIX_TEST(PSTW);
STORE_8LS_PREFIX_TEST(PSTD);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vmx(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwc

[PATCH] powerpc: alignment: Remove unneeded variables

2021-04-12 Thread Wan Jiabing
Fix coccicheck warning:

./tools/testing/selftests/powerpc/alignment/alignment_handler.c:539:5-7:
Unneeded variable: "rc". Return "0" on line 562
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:567:5-7:
Unneeded variable: "rc". Return "0" on line 580
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:585:5-7:
Unneeded variable: "rc". Return "0" on line 594
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:600:5-7:
Unneeded variable: "rc". Return "0" on line 611
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:416:5-7:
Unneeded variable: "rc". Return "0" on line 470
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:475:5-7:
Unneeded variable: "rc". Return "0" on line 485
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:490:5-7:
Unneeded variable: "rc". Return "0" on line 506
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:511:5-7:
Unneeded variable: "rc". Return "0" on line 534
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:331:5-7:
Unneeded variable: "rc". Return "0" on line 344
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:349:5-7:
Unneeded variable: "rc". Return "0" on line 360
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:365:5-7:
Unneeded variable: "rc". Return "0" on line 392
./tools/testing/selftests/powerpc/alignment/alignment_handler.c:397:5-7:
Unneeded variable: "rc". Return "0" on line 411

Signed-off-by: Wan Jiabing 
---
 .../powerpc/alignment/alignment_handler.c | 48 +--
 1 file changed, 12 insertions(+), 36 deletions(-)

diff --git a/tools/testing/selftests/powerpc/alignment/alignment_handler.c 
b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
index c25cf7cd45e9..48bfb7b36d84 100644
--- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c
+++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
@@ -328,8 +328,6 @@ static bool can_open_cifile(void)
 
 int test_alignment_handler_vsx_206(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06));
 
@@ -341,13 +339,11 @@ int test_alignment_handler_vsx_206(void)
STORE_VSX_XFORM_TEST(stxvd2x);
STORE_VSX_XFORM_TEST(stxvw4x);
STORE_VSX_XFORM_TEST(stxsdx);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vsx_207(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07));
 
@@ -357,13 +353,11 @@ int test_alignment_handler_vsx_207(void)
LOAD_VSX_XFORM_TEST(lxsiwzx);
STORE_VSX_XFORM_TEST(stxsspx);
STORE_VSX_XFORM_TEST(stxsiwx);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vsx_300(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
 
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_00));
@@ -389,13 +383,11 @@ int test_alignment_handler_vsx_300(void)
STORE_VSX_XFORM_TEST(stxvx);
STORE_VSX_XFORM_TEST(stxvl);
STORE_VSX_XFORM_TEST(stxvll);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vsx_prefix(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
 
@@ -408,13 +400,11 @@ int test_alignment_handler_vsx_prefix(void)
STORE_VSX_8LS_PREFIX_TEST(PSTXSSP, 0);
STORE_VSX_8LS_PREFIX_TEST(PSTXV0, 0);
STORE_VSX_8LS_PREFIX_TEST(PSTXV1, 1);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_integer(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
 
printf("Integer\n");
@@ -467,13 +457,11 @@ int test_alignment_handler_integer(void)
STORE_DFORM_TEST(stmw);
 #endif
 
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_integer_206(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06));
 
@@ -482,13 +470,11 @@ int test_alignment_handler_integer_206(void)
LOAD_XFORM_TEST(ldbrx);
STORE_XFORM_TEST(stdbrx);
 
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_integer_prefix(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
 
@@ -503,13 +489,11 @@ int test_alignment_handler_integer_prefix(void)
STORE_MLS_PREFIX_TEST(PSTH);
STORE_MLS_PREFIX_TEST(PSTW);
STORE_8LS_PREFIX_TEST(PSTD);
-   return rc;
+   return 0;
 }
 
 int test_alignment_handler_vmx(void)
 {
-   int rc = 0;
-
SKIP_IF(!can_open_cifile());
SKIP_IF(!have_hwcap(PPC_FEATURE_HAS_ALTIVEC));
 
@@ -531,13 +515,11 @@ 

[PATCH] thermal: tmon: Remove unneeded variable

2021-04-12 Thread Wan Jiabing
Fix coccicheck warning:

tools/thermal/tmon/pid.c:57:5-8:
Unneeded variable: ret. Return 0 on line 68

Signed-off-by: Wan Jiabing 
---
 tools/thermal/tmon/pid.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/thermal/tmon/pid.c b/tools/thermal/tmon/pid.c
index c54edb4f630c..cbacd3b438b2 100644
--- a/tools/thermal/tmon/pid.c
+++ b/tools/thermal/tmon/pid.c
@@ -54,8 +54,6 @@ static double xk_1, xk_2; /* input temperature x[k-#] */
  */
 int init_thermal_controller(void)
 {
-   int ret = 0;
-
/* init pid params */
p_param.ts = ticktime;
/* TODO: get it from TUI tuning tab */
@@ -65,7 +63,7 @@ int init_thermal_controller(void)
 
p_param.t_target = target_temp_user;
 
-   return ret;
+   return 0;
 }
 
 void controller_reset(void)
-- 
2.30.2



[PATCH] perf: bench: Remove unneeded variable

2021-04-12 Thread Wan Jiabing
Fix coccicheck warning:

tools/perf/bench/find-bit-bench.c:123:5-8:
Unneeded variable: "err". Return "0" on line 134

Signed-off-by: Wan Jiabing 
---
 tools/perf/bench/find-bit-bench.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/bench/find-bit-bench.c 
b/tools/perf/bench/find-bit-bench.c
index 73b5bcc5946a..7e748a56a8ba 100644
--- a/tools/perf/bench/find-bit-bench.c
+++ b/tools/perf/bench/find-bit-bench.c
@@ -120,7 +120,7 @@ static int do_for_each_set_bit(unsigned int num_bits)
 
 int bench_mem_find_bit(int argc, const char **argv)
 {
-   int err = 0, i;
+   int i;
 
argc = parse_options(argc, argv, options, bench_usage, 0);
if (argc) {
@@ -131,5 +131,5 @@ int bench_mem_find_bit(int argc, const char **argv)
for (i = 1; i <= 2048; i <<= 1)
do_for_each_set_bit(i);
 
-   return err;
+   return 0;
 }
-- 
2.30.2



[PATCH] drm/nouveau/nvkm: Remove unnecessary assignment

2021-04-10 Thread Wan Jiabing
The declaration with assignment here is confusing.
Remove the unnecessary assignment.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
index 96aca0edfa3c..c51bac76174c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c
@@ -313,7 +313,7 @@ nv50_instobj_dtor(struct nvkm_memory *memory)
struct nv50_instobj *iobj = nv50_instobj(memory);
struct nvkm_instmem *imem = >imem->base;
struct nvkm_vma *bar;
-   void *map = map;
+   void *map;
 
mutex_lock(>mutex);
if (likely(iobj->lru.next))
-- 
2.25.1



[PATCH] sh: boards: Remove unnecessary break

2021-04-09 Thread Wan Jiabing
There is a return above the break.
The break here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 arch/sh/boards/mach-landisk/gio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/sh/boards/mach-landisk/gio.c 
b/arch/sh/boards/mach-landisk/gio.c
index ff2200fec29a..fd7a3283942f 100644
--- a/arch/sh/boards/mach-landisk/gio.c
+++ b/arch/sh/boards/mach-landisk/gio.c
@@ -106,7 +106,6 @@ static long gio_ioctl(struct file *filp, unsigned int cmd, 
unsigned long arg)
break;
default:
return -EFAULT;
-   break;
}
 
if ((cmd & 0x01) == 0) {/* read */
-- 
2.25.1



[PATCH] arm: mach-s3c: Remove unnecessary break

2021-04-09 Thread Wan Jiabing
There is a return above the break.
The break here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 arch/arm/mach-s3c/mach-rx1950.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-s3c/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
index 6e19add158a9..9da94686001a 100644
--- a/arch/arm/mach-s3c/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -271,7 +271,6 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int 
state,
break;
default:
return -EINVAL;
-   break;
}
 
if (delay_on && delay_off && !*delay_on && !*delay_off)
-- 
2.25.1



[PATCH] fs: cifs: Remove repeated struct declaration

2021-04-08 Thread Wan Jiabing
struct cifs_writedata is declared twice.
One is declared at 209th line.
And struct cifs_writedata is defined blew.
The declaration hear is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 fs/cifs/cifsglob.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index ec824ab8c5ca..5ec60745034e 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1316,8 +1316,6 @@ struct cifs_readdata {
struct page **pages;
 };
 
-struct cifs_writedata;
-
 /* asynchronous write support */
 struct cifs_writedata {
struct kref refcount;
-- 
2.25.1



[PATCH] fs/namei.c: Clean up trailing whitespace

2021-04-07 Thread Wan Jiabing
Clean up trailing whitespace.

Signed-off-by: Wan Jiabing 
---
 fs/namei.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 216f16e74351..6c6cb46c0667 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -52,8 +52,8 @@
  * The new code replaces the old recursive symlink resolution with
  * an iterative one (in case of non-nested symlink chains).  It does
  * this with calls to _follow_link().
- * As a side effect, dir_namei(), _namei() and follow_link() are now 
- * replaced with a single function lookup_dentry() that can handle all 
+ * As a side effect, dir_namei(), _namei() and follow_link() are now
+ * replaced with a single function lookup_dentry() that can handle all
  * the special cases of the former code.
  *
  * With the new dcache, the pathname is stored at each inode, at least as
-- 
2.25.1



[PATCH] scsi: isci/phy.h: Remove unnecessary struct declaration

2021-04-06 Thread Wan Jiabing
struct sci_phy_proto is defined at 142nd line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 drivers/scsi/isci/phy.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/isci/phy.h b/drivers/scsi/isci/phy.h
index 45fecfa36a98..5aaf95b14b2e 100644
--- a/drivers/scsi/isci/phy.h
+++ b/drivers/scsi/isci/phy.h
@@ -447,7 +447,6 @@ void sci_phy_get_attached_sas_address(
struct isci_phy *iphy,
struct sci_sas_address *sas_address);
 
-struct sci_phy_proto;
 void sci_phy_get_protocols(
struct isci_phy *iphy,
struct sci_phy_proto *protocols);
-- 
2.25.1



[PATCH] perf: util/mem-events.h: Remove unnecessary struct declaration

2021-04-06 Thread Wan Jiabing
struct mem_info is defined at 22nd line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 tools/perf/util/mem-events.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
index 755cef7e0625..5ddbeaa057b0 100644
--- a/tools/perf/util/mem-events.h
+++ b/tools/perf/util/mem-events.h
@@ -44,7 +44,6 @@ bool is_mem_loads_aux_event(struct evsel *leader);
 
 void perf_mem_events__list(void);
 
-struct mem_info;
 int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
 int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
 int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
-- 
2.25.1



[PATCH] hfsplus/hfsplus_fs.h: Remove unnecessary struct declaration

2021-04-06 Thread Wan Jiabing
struct hfs_btree is defined at 73rd line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 fs/hfsplus/hfsplus_fs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index 12b20479ed2b..4da395c25f4a 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -139,7 +139,6 @@ struct hfs_bnode {
  */
 
 struct hfsplus_vh;
-struct hfs_btree;
 
 struct hfsplus_sb_info {
void *s_vhdr_buf;
-- 
2.25.1



[PATCH] em28xx/em28xx.h: Remove duplicate struct declaration

2021-04-06 Thread Wan Jiabing
struct em28xx is declared at 219th line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 drivers/media/usb/em28xx/em28xx.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx.h 
b/drivers/media/usb/em28xx/em28xx.h
index 6648e11f1271..43227111d410 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -628,8 +628,6 @@ struct em28xx_audio {
atomic_t   stream_started;  /* stream should be running if true */
 };
 
-struct em28xx;
-
 enum em28xx_i2c_algo_type {
EM28XX_I2C_ALGO_EM28XX = 0,
EM28XX_I2C_ALGO_EM2800,
-- 
2.25.1



[PATCH] cx231xx/cx231xx.h: Remove repeated struct declaration

2021-04-06 Thread Wan Jiabing
struct cx231xx is declared at 146th line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 drivers/media/usb/cx231xx/cx231xx.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx.h 
b/drivers/media/usb/cx231xx/cx231xx.h
index b32eab641793..6929e4d97067 100644
--- a/drivers/media/usb/cx231xx/cx231xx.h
+++ b/drivers/media/usb/cx231xx/cx231xx.h
@@ -425,8 +425,6 @@ struct cx231xx_audio {
u16 end_point_addr;
 };
 
-struct cx231xx;
-
 /*/
 /* set/get i2c */
 /* 00--1Mb/s, 01-400kb/s, 10--100kb/s, 11--5Mb/s */
-- 
2.25.1



[PATCH] [v2] ubi: Remove unnecessary struct declaration

2021-04-06 Thread Wan Jiabing
struct ubi_wl_entry is defined at 178th line.
The declaration here is unnecessary. Remove it.

Reviewed-by: Tudor Ambarus 
Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Add reviewer info and modify the subject line.
---
 drivers/mtd/ubi/ubi.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index c2da77163f94..7c083ad58274 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -388,8 +388,6 @@ struct ubi_volume_desc {
int mode;
 };
 
-struct ubi_wl_entry;
-
 /**
  * struct ubi_debug_info - debugging information for an UBI device.
  *
-- 
2.25.1



[PATCH] tools: perf: util: Remove unnecessary struct declaration

2021-04-06 Thread Wan Jiabing
struct feat_fd is defined at 93rd line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 tools/perf/util/header.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index 2aca71763ecf..3b1d284ee18c 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -149,8 +149,6 @@ bool is_perf_magic(u64 magic);
 
 #define NAME_ALIGN 64
 
-struct feat_fd;
-
 int do_write(struct feat_fd *fd, const void *buf, size_t size);
 
 int write_padded(struct feat_fd *fd, const void *bf,
-- 
2.25.1



[PATCH] drivers: mtd: ubi: Remove unnecessary struct declaration

2021-04-06 Thread Wan Jiabing
struct ubi_wl_entry is defined at 178th line.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 drivers/mtd/ubi/ubi.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index c2da77163f94..7c083ad58274 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -388,8 +388,6 @@ struct ubi_volume_desc {
int mode;
 };
 
-struct ubi_wl_entry;
-
 /**
  * struct ubi_debug_info - debugging information for an UBI device.
  *
-- 
2.25.1



[PATCH] kernel: sched: Remove unnecessary struct declaration"

2021-04-05 Thread Wan Jiabing
struct sg_lb_stats is defined at 8043rd line.
The declaration and the definition are all independent on the MACRO.
The declaration here is unnecessary. Remove it.

Signed-off-by: Wan Jiabing 
---
 kernel/sched/fair.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 794c2cb945f8..94e035da90c8 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8609,9 +8609,6 @@ static inline enum fbq_type fbq_classify_rq(struct rq *rq)
 }
 #endif /* CONFIG_NUMA_BALANCING */
 
-
-struct sg_lb_stats;
-
 /*
  * task_running_on_cpu - return 1 if @p is running on @cpu.
  */
-- 
2.30.2



[PATCH] scripts: A new script for checking duplicate struct declaration

2021-04-01 Thread Wan Jiabing
checkdeclares: find struct declared more than once.
Inspired by checkincludes.pl.
This script checks for duplicate struct declares.
Note that this will not take into consideration macros, so
you should run this only if you know you do have real dups
and do not have them under #ifdef's.
You could also just review the results.

Signed-off-by: Wan Jiabing 
---
 scripts/checkdeclares.pl | 53 
 1 file changed, 53 insertions(+)
 create mode 100755 scripts/checkdeclares.pl

diff --git a/scripts/checkdeclares.pl b/scripts/checkdeclares.pl
new file mode 100755
index ..d14a8cc39a4d
--- /dev/null
+++ b/scripts/checkdeclares.pl
@@ -0,0 +1,53 @@
+#!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
+#
+# checkdeclares: find struct declared more than once
+#
+# Copyright 2021 Wan Jiabing
+# Inspired by checkincludes.pl
+#
+# This script checks for duplicate struct declares.
+# Note that this will not take into consideration macros so
+# you should run this only if you know you do have real dups
+# and do not have them under #ifdef's.
+# You could also just review the results.
+
+use strict;
+
+sub usage {
+   print "Usage: checkdeclares.pl \n";
+   print "We just warn of struct declaration duplicates\n";
+   exit 1;
+}
+
+if ($#ARGV < 0) {
+   usage();
+}
+
+my $dup_counter = 0;
+
+foreach my $file (@ARGV) {
+   open(my $f, '<', $file)
+   or die "Cannot open $file: $!.\n";
+
+   my %declaredstructs = ();
+
+   while (<$f>) {
+   if (m/^\s*struct\s*(\w*);$/o) {
+   ++$declaredstructs{$1};
+   }
+   }
+
+   close($f);
+
+   foreach my $structname (keys %declaredstructs) {
+   if ($declaredstructs{$structname} > 1) {
+   print "$file: struct $structname is declared more than 
once.\n";
+   ++$dup_counter;
+   }
+   }
+}
+
+if ($dup_counter == 0) {
+   print "No duplicate struct declares found.\n";
+}
-- 
2.25.1



[PATCH] linux/profile.h: Remove unnecessary declaration

2021-04-01 Thread Wan Jiabing
Declaring struct pt_regs is unnecessary.
On the one hand, there is no function using it;
on the other hand, struct pt_regs has been declared
in linux/kernel.h. Remove them.

Signed-off-by: Wan Jiabing 
---
 include/linux/profile.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/profile.h b/include/linux/profile.h
index bad18ca43150..fd18ca96f557 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -15,7 +15,6 @@
 #define KVM_PROFILING  4
 
 struct proc_dir_entry;
-struct pt_regs;
 struct notifier_block;
 
 #if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS)
@@ -84,8 +83,6 @@ int task_handoff_unregister(struct notifier_block * n);
 int profile_event_register(enum profile_type, struct notifier_block * n);
 int profile_event_unregister(enum profile_type, struct notifier_block * n);
 
-struct pt_regs;
-
 #else
 
 #define prof_on 0
-- 
2.25.1



[PATCH] sunrpc: xprtrdma: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct rpcrdma_req is declared twice. One is declared at 216th line.
The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 net/sunrpc/xprtrdma/xprt_rdma.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index fe3be985e239..11e5fbfc642c 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -239,7 +239,6 @@ struct rpcrdma_frwr {
};
 };
 
-struct rpcrdma_req;
 struct rpcrdma_mr {
struct list_headmr_list;
struct rpcrdma_req  *mr_req;
-- 
2.25.1



[PATCH] mfd: abx500: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct ab8500_fg is declared twice. The blew one at 457th line
is closer to user. Remove the duplicate here.
Move "Forward declaration" annotation to the suitable place.

Signed-off-by: Wan Jiabing 
---
 include/linux/mfd/abx500/ab8500-bm.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/mfd/abx500/ab8500-bm.h 
b/include/linux/mfd/abx500/ab8500-bm.h
index 903e94c189d8..0b88eddcc5af 100644
--- a/include/linux/mfd/abx500/ab8500-bm.h
+++ b/include/linux/mfd/abx500/ab8500-bm.h
@@ -296,9 +296,6 @@ struct batres_vs_temp {
int resist;
 };
 
-/* Forward declaration */
-struct ab8500_fg;
-
 /**
  * struct ab8500_fg_parameters - Fuel gauge algorithm parameters, in seconds
  * if not specified
@@ -452,6 +449,7 @@ struct ab8500_bm_data {
const struct ab8500_fg_parameters *fg_params;
 };
 
+/* Forward declaration */
 struct ab8500_btemp;
 struct ab8500_gpadc;
 struct ab8500_fg;
-- 
2.25.1



[PATCH] rcar/rsnd.h: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct rsnd_dai_stream is declared twice. One is declared
at 254th line. The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 sound/soc/sh/rcar/rsnd.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 6b519370fd64..8cb94a988e27 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -347,7 +347,6 @@ struct rsnd_mod_ops {
int (*id_cmd)(struct rsnd_mod *mod);
 };
 
-struct rsnd_dai_stream;
 struct rsnd_mod {
int id;
enum rsnd_mod_type type;
-- 
2.25.1



[PATCH] amd: display: modules: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct mod_hdcp is declared twice. One is declared at 33rd line.
The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h 
b/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h
index d223ed3be5d3..03fe49c5b7d0 100644
--- a/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h
+++ b/drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h
@@ -255,8 +255,6 @@ struct mod_hdcp_config {
uint8_t index;
 };
 
-struct mod_hdcp;
-
 /* dm allocates memory of mod_hdcp per dc_link on dm init based on memory 
size*/
 size_t mod_hdcp_get_memory_size(void);
 
-- 
2.25.1



[PATCH] net: smc: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct smc_clc_msg_local is declared twice. One is declared at
301st line. The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 net/smc/smc_core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
index e8e448771f85..6d6fd1397c87 100644
--- a/net/smc/smc_core.h
+++ b/net/smc/smc_core.h
@@ -410,7 +410,6 @@ static inline void smc_set_pci_values(struct pci_dev 
*pci_dev,
 
 struct smc_sock;
 struct smc_clc_msg_accept_confirm;
-struct smc_clc_msg_local;
 
 void smc_lgr_cleanup_early(struct smc_connection *conn);
 void smc_lgr_terminate_sched(struct smc_link_group *lgr);
-- 
2.25.1



[PATCH] drm/drm_internal.h: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct drm_gem_object is declared twice. One is declared
at 40th line. The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/drm_internal.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index fad2249ee67b..1265de2b9d90 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -170,7 +170,6 @@ void drm_sysfs_connector_remove(struct drm_connector 
*connector);
 void drm_sysfs_lease_event(struct drm_device *dev);
 
 /* drm_gem.c */
-struct drm_gem_object;
 int drm_gem_init(struct drm_device *dev);
 int drm_gem_handle_create_tail(struct drm_file *file_priv,
   struct drm_gem_object *obj,
-- 
2.25.1



[PATCH] fs: btrfs: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct btrfs_inode is declared twice. One is declared at 67th line.
The blew declaration is not needed. Remove the duplicate.
struct btrfs_fs_info should be declared in the forward declarations.
Move it to the forward declarations.

Signed-off-by: Wan Jiabing 
---
 fs/btrfs/extent_io.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 824640cb0ace..227215a5722c 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -66,6 +66,7 @@ enum {
 struct btrfs_root;
 struct btrfs_inode;
 struct btrfs_io_bio;
+struct btrfs_fs_info;
 struct io_failure_record;
 struct extent_io_tree;
 
@@ -270,9 +271,6 @@ struct bio *btrfs_io_bio_alloc(unsigned int nr_iovecs);
 struct bio *btrfs_bio_clone(struct bio *bio);
 struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size);
 
-struct btrfs_fs_info;
-struct btrfs_inode;
-
 int repair_io_failure(struct btrfs_fs_info *fs_info, u64 ino, u64 start,
  u64 length, u64 logical, struct page *page,
  unsigned int pg_offset, int mirror_num);
-- 
2.25.1



[PATCH] fs: cifs: Remove unnecessary struct declaration

2021-04-01 Thread Wan Jiabing
struct cifs_readdata is declared twice. One is declared
at 208th line.
And struct cifs_readdata is defined blew.
The declaration here is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 fs/cifs/cifsglob.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 67c056a9a519..ec824ab8c5ca 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1283,8 +1283,6 @@ struct cifs_aio_ctx {
booldirect_io;
 };
 
-struct cifs_readdata;
-
 /* asynchronous read support */
 struct cifs_readdata {
struct kref refcount;
-- 
2.25.1



[PATCH] linux/bpf.h: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct btf_type is declared twice. One is declared at 35th line.
The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/bpf.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 3625f019767d..2fd8e775a17e 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -903,7 +903,6 @@ struct bpf_link_primer {
 };
 
 struct bpf_struct_ops_value;
-struct btf_type;
 struct btf_member;
 
 #define BPF_STRUCT_OPS_MAX_NR_MEMBERS 64
-- 
2.25.1



[PATCH] include: net: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct ctl_table_header is declared twice. One is declared
at 46th line. The blew one is not needed. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/net/net_namespace.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index dcaee24a4d87..47457048ab86 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -407,7 +407,6 @@ int register_pernet_device(struct pernet_operations *);
 void unregister_pernet_device(struct pernet_operations *);
 
 struct ctl_table;
-struct ctl_table_header;
 
 #ifdef CONFIG_SYSCTL
 int net_sysctl_init(void);
-- 
2.25.1



[PATCH] linux/spi: Remove repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct spi_transfer is declared twice. One is declared at 24th line.
The blew one is not needed though. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/spi/spi.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 592897fa4f03..c345392a11ee 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -247,7 +247,6 @@ static inline void *spi_get_drvdata(struct spi_device *spi)
 }
 
 struct spi_message;
-struct spi_transfer;
 
 /**
  * struct spi_driver - Host side "protocol" driver
-- 
2.25.1



[PATCH] linux/bpf-cgroup.h: Delete repeated struct declaration

2021-04-01 Thread Wan Jiabing
struct bpf_prog is declared twice. There is one declaration
which is independent on the MACRO at 18th line.
So the below one is not needed though. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/bpf-cgroup.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index c42e02b4d84b..57b4d4b980e7 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -418,7 +418,6 @@ int cgroup_bpf_prog_query(const union bpf_attr *attr,
  union bpf_attr __user *uattr);
 #else
 
-struct bpf_prog;
 struct cgroup_bpf {};
 static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
 static inline void cgroup_bpf_offline(struct cgroup *cgrp) {}
-- 
2.25.1



[PATCH] scsi: bfa: Remove unnecessary struct declaration

2021-04-01 Thread Wan Jiabing
struct bfa_fcs_s is declared twice. One is declared
at 50th line. Remove the duplicate.
struct bfa_fcs_fabric_s is defined at 175th line.
Remove unnecessary declaration.

Signed-off-by: Wan Jiabing 
---
 drivers/scsi/bfa/bfa_fcs.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h
index 3e117fed95c9..c1baf5cd0d3e 100644
--- a/drivers/scsi/bfa/bfa_fcs.h
+++ b/drivers/scsi/bfa/bfa_fcs.h
@@ -217,9 +217,6 @@ struct bfa_vf_event_s {
u32undefined;
 };
 
-struct bfa_fcs_s;
-struct bfa_fcs_fabric_s;
-
 /*
  * @todo : need to move to a global config file.
  * Maximum Rports supported per port (physical/logical).
-- 
2.25.1



[PATCH] tools: perf: util: Remove duplicate struct declaration

2021-04-01 Thread Wan Jiabing
struct target is declared twice. One has been declared
at 21st line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 tools/perf/util/evsel.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 6026487353dd..998e5b806696 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -157,7 +157,6 @@ struct perf_missing_features {
 extern struct perf_missing_features perf_missing_features;
 
 struct perf_cpu_map;
-struct target;
 struct thread_map;
 struct record_opts;
 
-- 
2.25.1



[PATCH] scripts: show_delta: Update the python interpreter

2021-03-30 Thread Wan Jiabing
In f29b5f3e6fc0a, the script is update to support python3.
Fix the python interpreter update to python3.

Fixes: f29b5f3e6fc0a ("show_delta: Update script to support python3")
Signed-off-by: Wan Jiabing 
---
 scripts/show_delta | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/show_delta b/scripts/show_delta
index 28e67e178194..4660a988b2ad 100755
--- a/scripts/show_delta
+++ b/scripts/show_delta
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0-only
 #
 # show_deltas: Read list of printk messages instrumented with
-- 
2.25.1



[PATCH] [v2] amd: display: dc: struct dc_state is declared twice

2021-03-30 Thread Wan Jiabing
struct dc_state is declared twice. One has been
declared at 273rd line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/amd/display/dc/dc.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
index 18ed0d3f247e..8ccf4bcd76b3 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -581,7 +581,6 @@ struct dc_bounding_box_overrides {
int min_dcfclk_mhz;
 };
 
-struct dc_state;
 struct resource_pool;
 struct dce_hwseq;
 struct gpu_info_soc_bounding_box_v1_0;
-- 
2.25.1



[PATCH 4/4] net: ethernet: stmicro: Remove duplicate struct declaration

2021-03-30 Thread Wan Jiabing
struct stmmac_safety_stats is declared twice. One has been
declared at 29th line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/net/ethernet/stmicro/stmmac/hwif.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h 
b/drivers/net/ethernet/stmicro/stmmac/hwif.h
index 979ac9fca23c..9139bbcc06c0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.h
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h
@@ -280,7 +280,6 @@ struct stmmac_dma_ops {
 struct mac_device_info;
 struct net_device;
 struct rgmii_adv;
-struct stmmac_safety_stats;
 struct stmmac_tc_entry;
 struct stmmac_pps_cfg;
 struct stmmac_rss;
-- 
2.25.1



[PATCH 3/4] net: wireless: marvell: Remove duplicate struct declaration

2021-03-30 Thread Wan Jiabing
struct lbtf_private is declared twice. One has been declared
at 157th line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/net/wireless/marvell/libertas_tf/libertas_tf.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas_tf/libertas_tf.h 
b/drivers/net/wireless/marvell/libertas_tf/libertas_tf.h
index 67bbb6a8f113..5d726545d987 100644
--- a/drivers/net/wireless/marvell/libertas_tf/libertas_tf.h
+++ b/drivers/net/wireless/marvell/libertas_tf/libertas_tf.h
@@ -453,7 +453,6 @@ struct cmd_ds_802_11_beacon_set {
u8 beacon[MRVL_MAX_BCN_SIZE];
 };
 
-struct lbtf_private;
 struct cmd_ctrl_node;
 
 /** Function Prototype Declaration */
-- 
2.25.1



[PATCH 2/4] net: wireless: microchip: Remove duplicate struct declaration

2021-03-30 Thread Wan Jiabing
struct wilc is declared twice. One has been declared
at 352nd line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/net/wireless/microchip/wilc1000/wlan.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h 
b/drivers/net/wireless/microchip/wilc1000/wlan.h
index d55eb6b3a12a..0d24e711b62b 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -392,7 +392,6 @@ struct wilc_cfg_rsp {
u8 seq_no;
 };
 
-struct wilc;
 struct wilc_vif;
 
 int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
-- 
2.25.1



[PATCH 1/4] net: wireless: broadcom: Remove duplicate struct declaration

2021-03-30 Thread Wan Jiabing
struct brcmf_bus is declared twice. One has been declared
at 37th line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
index 4146faeed344..44ba6f389fa9 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
@@ -112,7 +112,6 @@ do {
\
 
 extern int brcmf_msg_level;
 
-struct brcmf_bus;
 struct brcmf_pub;
 #ifdef DEBUG
 struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr);
-- 
2.25.1



[PATCH 0/4] net: Remove duplicate struct declaration

2021-03-30 Thread Wan Jiabing
This patch series tried to remove duplicate struct declaration.

Wan Jiabing (4):
  net: wireless: broadcom: Remove duplicate struct declaration
  net: wireless: microchip: Remove duplicate struct declaration
  net: wireless: marvell: Remove duplicate struct declaration
  net: ethernet: stmicro: Remove duplicate struct declaration

 drivers/net/ethernet/stmicro/stmmac/hwif.h   | 1 -
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 1 -
 drivers/net/wireless/marvell/libertas_tf/libertas_tf.h   | 1 -
 drivers/net/wireless/microchip/wilc1000/wlan.h   | 1 -
 4 files changed, 4 deletions(-)

-- 
2.25.1



[PATCH] arch: parisc: Remove duplicate struct task_struct declaration

2021-03-30 Thread Wan Jiabing
struct task_struct is declared twice. One has been declared
at 154th line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 arch/parisc/include/asm/processor.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/parisc/include/asm/processor.h 
b/arch/parisc/include/asm/processor.h
index 11ece0d07374..b5fbcd2c1780 100644
--- a/arch/parisc/include/asm/processor.h
+++ b/arch/parisc/include/asm/processor.h
@@ -272,7 +272,6 @@ on downward growing arches, it looks like this:
regs->gr[23] = 0;   \
 } while(0)
 
-struct task_struct;
 struct mm_struct;
 
 /* Free all resources held by a thread. */
-- 
2.25.1



[PATCH] arch: s390: Remove duplicate struct ccw1 declaration

2021-03-30 Thread Wan Jiabing
struct ccw1 is declared twice. One has been declared
at 21st line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 arch/s390/include/asm/ccwdev.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/s390/include/asm/ccwdev.h b/arch/s390/include/asm/ccwdev.h
index 778247bb1d61..d4e90f2ba77e 100644
--- a/arch/s390/include/asm/ccwdev.h
+++ b/arch/s390/include/asm/ccwdev.h
@@ -152,9 +152,6 @@ extern struct ccw_device *get_ccwdev_by_busid(struct 
ccw_driver *cdrv,
  * when new devices for its type pop up */
 extern int  ccw_driver_register   (struct ccw_driver *driver);
 extern void ccw_driver_unregister (struct ccw_driver *driver);
-
-struct ccw1;
-
 extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long);
 extern int ccw_device_set_options(struct ccw_device *, unsigned long);
 extern void ccw_device_clear_options(struct ccw_device *, unsigned long);
-- 
2.25.1



[PATCH] linux/intel_rapl.h: Modify struct declaration

2021-03-30 Thread Wan Jiabing
struct rapl_package is declared twice. One has been declared
at 80th line.
By reviewing the code, it should declare struct rapl_domain
rather than rapl_package. Modify it.

Signed-off-by: Wan Jiabing 
---
 include/linux/intel_rapl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/intel_rapl.h b/include/linux/intel_rapl.h
index 50b8398ffd21..93780834fc8f 100644
--- a/include/linux/intel_rapl.h
+++ b/include/linux/intel_rapl.h
@@ -33,7 +33,7 @@ enum rapl_domain_reg_id {
RAPL_DOMAIN_REG_MAX,
 };
 
-struct rapl_package;
+struct rapl_domain;
 
 enum rapl_primitives {
ENERGY_COUNTER,
-- 
2.25.1



[PATCH] usb: dwc2: Remove duplicate struct declaration

2021-03-30 Thread Wan Jiabing
struct dwc2_hsotg is declared twice. One has been declared
at forward declaration. Remove the duplicate one.

Signed-off-by: Wan Jiabing 
---
 drivers/usb/dwc2/core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 7161344c6522..8407bba523ce 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -210,7 +210,6 @@ do { \
 #define call_gadget(_hs, _entry)   do {} while (0)
 #endif
 
-struct dwc2_hsotg;
 struct dwc2_host_chan;
 
 /* Device States */
-- 
2.25.1



[PATCH] [v2] linux/trace_events.h: Remove duplicate struct declaration

2021-03-29 Thread Wan Jiabing
struct trace_array is declared twice. One has been declared
at forward declaration. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Undo sorting forward declarations alphabetically.
---
 include/linux/trace_events.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 28e7af1406f2..0237094e51f6 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -404,7 +404,6 @@ trace_get_fields(struct trace_event_call *event_call)
return event_call->class->get_fields(event_call);
 }
 
-struct trace_array;
 struct trace_subsystem_dir;
 
 enum {
-- 
2.25.1



[PATCH] linux/memcontrol.h: Remove duplicate struct declaration

2021-03-29 Thread Wan Jiabing
struct mem_cgroup is declared twice. One has been declared
at forward struct declaration. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/memcontrol.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 0c04d39a7967..f0ae33a0f175 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1068,8 +1068,6 @@ void split_page_memcg(struct page *head, unsigned int nr);
 #define MEM_CGROUP_ID_SHIFT0
 #define MEM_CGROUP_ID_MAX  0
 
-struct mem_cgroup;
-
 static inline struct mem_cgroup *page_memcg(struct page *page)
 {
return NULL;
-- 
2.25.1



[PATCH] linux/trace_events.h: Remove duplicate struct declaration

2021-03-29 Thread Wan Jiabing
struct trace_array is declared twice. One has been declared
at forward struct declaration. Remove the duplicate.
And sort these forward declarations alphabetically.

Signed-off-by: Wan Jiabing 
---
 include/linux/trace_events.h | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 28e7af1406f2..29ae3ec5cab9 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -10,11 +10,11 @@
 #include 
 #include 
 
-struct trace_array;
 struct array_buffer;
-struct tracer;
-struct dentry;
 struct bpf_prog;
+struct dentry;
+struct tracer;
+struct trace_array;
 
 const char *trace_print_flags_seq(struct trace_seq *p, const char *delim,
  unsigned long flags,
@@ -404,7 +404,6 @@ trace_get_fields(struct trace_event_call *event_call)
return event_call->class->get_fields(event_call);
 }
 
-struct trace_array;
 struct trace_subsystem_dir;
 
 enum {
-- 
2.25.1



[PATCH] [v2] scripts: checkdeclares for checking duplicate struct declares

2021-03-27 Thread Wan Jiabing
checkdeclares: find struct declared more than once.
Inspired by checkincludes.pl
This script checks for duplicate struct declares.
Note that this will not take into consideration macros so
you should run this only if you know you do have real dups
and do not have them under #ifdef's.
You could also just review the results.

Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Delete unused variable @file_lines.
---
 scripts/checkdeclares.pl | 53 
 1 file changed, 53 insertions(+)
 create mode 100755 scripts/checkdeclares.pl

diff --git a/scripts/checkdeclares.pl b/scripts/checkdeclares.pl
new file mode 100755
index ..ce769572f807
--- /dev/null
+++ b/scripts/checkdeclares.pl
@@ -0,0 +1,53 @@
+#!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
+#
+# checkdeclares: find struct declared more than once
+#
+# Copyright 2021 Wan Jiabing
+# Inspired by checkincludes.pl
+#
+# This script checks for duplicate struct declares.
+# Note that this will not take into consideration macros so
+# you should run this only if you know you do have real dups
+# and do not have them under #ifdef's.
+# You could also just review the results.
+
+use strict;
+
+sub usage {
+   print "Usage: checkdeclares.pl \n";
+   print "We just warn of struct declaration duplicates\n";
+   exit 1;
+}
+
+if ($#ARGV < 0) {
+   usage();
+}
+
+my $dup_counter = 0;
+
+foreach my $file (@ARGV) {
+   open(my $f, '<', $file)
+   or die "Cannot open $file: $!.\n";
+
+   my %declaredfiles = ();
+
+   while (<$f>) {
+   if (m/^\s*struct\s*(\w*);$/o) {
+   ++$declaredfiles{$1};
+   }
+   }
+
+   close($f);
+
+   foreach my $filename (keys %declaredfiles) {
+   if ($declaredfiles{$filename} > 1) {
+   print "$file: struct $filename is declared more than 
once.\n";
+   ++$dup_counter;
+   }
+   }
+}
+
+if ($dup_counter == 0) {
+   print "No duplicate struct declares found.\n";
+}
-- 
2.25.1



[PATCH] media: usb: Remove duplicate declares

2021-03-27 Thread Wan Jiabing
struct cx231xx has been declared at 146th line.
struct em28xx has been declared at 219th line.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/media/usb/cx231xx/cx231xx.h | 2 --
 drivers/media/usb/em28xx/em28xx.h   | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx.h 
b/drivers/media/usb/cx231xx/cx231xx.h
index b32eab641793..6929e4d97067 100644
--- a/drivers/media/usb/cx231xx/cx231xx.h
+++ b/drivers/media/usb/cx231xx/cx231xx.h
@@ -425,8 +425,6 @@ struct cx231xx_audio {
u16 end_point_addr;
 };
 
-struct cx231xx;
-
 /*/
 /* set/get i2c */
 /* 00--1Mb/s, 01-400kb/s, 10--100kb/s, 11--5Mb/s */
diff --git a/drivers/media/usb/em28xx/em28xx.h 
b/drivers/media/usb/em28xx/em28xx.h
index 6648e11f1271..43227111d410 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -628,8 +628,6 @@ struct em28xx_audio {
atomic_t   stream_started;  /* stream should be running if true */
 };
 
-struct em28xx;
-
 enum em28xx_i2c_algo_type {
EM28XX_I2C_ALGO_EM28XX = 0,
EM28XX_I2C_ALGO_EM2800,
-- 
2.25.1



[PATCH] drm: tegra: hub: struct tegra_dc is declared twice

2021-03-27 Thread Wan Jiabing
struct tegra_dc has been declared at 13rd line.
Remove the duplicate.
Move struct tegra_plane declaration forward.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/tegra/hub.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tegra/hub.h b/drivers/gpu/drm/tegra/hub.h
index 3efa1be07ff8..36593bb36072 100644
--- a/drivers/gpu/drm/tegra/hub.h
+++ b/drivers/gpu/drm/tegra/hub.h
@@ -11,6 +11,7 @@
 #include "plane.h"
 
 struct tegra_dc;
+struct tegra_plane;
 
 struct tegra_windowgroup {
unsigned int usecount;
@@ -72,9 +73,6 @@ to_tegra_display_hub_state(struct drm_private_state *priv)
return container_of(priv, struct tegra_display_hub_state, base);
 }
 
-struct tegra_dc;
-struct tegra_plane;
-
 int tegra_display_hub_prepare(struct tegra_display_hub *hub);
 void tegra_display_hub_cleanup(struct tegra_display_hub *hub);
 
-- 
2.25.1



[PATCH] amd: display: dc: struct dc_state is declared twice

2021-03-27 Thread Wan Jiabing
struct dc_state has been declared at 273rd line.
Remove the duplicate.
Delete duplicate blank lines.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/amd/display/dc/dc.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc.h 
b/drivers/gpu/drm/amd/display/dc/dc.h
index 18ed0d3f247e..dc667298ab5b 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -234,7 +234,6 @@ struct dc_static_screen_params {
unsigned int num_frames;
 };
 
-
 /* Surface update type is used by dc_update_surfaces_and_stream
  * The update type is determined at the very beginning of the function based
  * on parameters passed in and decides how much programming (or updating) is
@@ -272,7 +271,6 @@ struct dc;
 struct dc_plane_state;
 struct dc_state;
 
-
 struct dc_cap_funcs {
bool (*get_dcc_compression_cap)(const struct dc *dc,
const struct dc_dcc_surface_param *input,
@@ -281,7 +279,6 @@ struct dc_cap_funcs {
 
 struct link_training_settings;
 
-
 /* Structure to hold configuration flags set by dm at dc creation. */
 struct dc_config {
bool gpu_vm_support;
@@ -581,7 +578,6 @@ struct dc_bounding_box_overrides {
int min_dcfclk_mhz;
 };
 
-struct dc_state;
 struct resource_pool;
 struct dce_hwseq;
 struct gpu_info_soc_bounding_box_v1_0;
@@ -757,7 +753,6 @@ enum dc_transfer_func_predefined {
TRANSFER_FUNCTION_GAMMA26
 };
 
-
 struct dc_transfer_func {
struct kref refcount;
enum dc_transfer_func_type type;
@@ -770,7 +765,6 @@ struct dc_transfer_func {
};
 };
 
-
 union dc_3dlut_state {
struct {
uint32_t initialized:1; /*if 3dlut is went through 
color module for initialization */
@@ -784,7 +778,6 @@ union dc_3dlut_state {
uint32_t raw;
 };
 
-
 struct dc_3dlut {
struct kref refcount;
struct tetrahedral_params lut_3d;
@@ -1014,7 +1007,6 @@ enum dc_status dc_validate_global_state(
struct dc_state *new_ctx,
bool fast_validate);
 
-
 void dc_resource_state_construct(
const struct dc *dc,
struct dc_state *dst_ctx);
@@ -1167,7 +1159,6 @@ struct dc_container_id {
unsigned short productCode;
 };
 
-
 struct dc_sink_dsc_caps {
// 'true' if these are virtual DPCD's DSC caps (immediately upstream of 
sink in MST topology),
// 'false' if they are sink's DSC caps
@@ -1229,7 +1220,6 @@ struct dc_cursor {
struct dc_cursor_attributes attributes;
 };
 
-
 
/***
  * Interrupt interfaces
  
**/
-- 
2.25.1



[PATCH] scripts: checkdeclares for checking duplicate struct declares

2021-03-27 Thread Wan Jiabing
checkdeclares: find struct declared more than once.
Inspired by checkincludes.pl
This script checks for duplicate struct declares.
Note that this will not take into consideration macros so
you should run this only if you know you do have real dups
and do not have them under #ifdef's.
You could also just review the results.

Signed-off-by: Wan Jiabing 
---
 scripts/checkdeclares.pl | 55 
 1 file changed, 55 insertions(+)
 create mode 100755 scripts/checkdeclares.pl

diff --git a/scripts/checkdeclares.pl b/scripts/checkdeclares.pl
new file mode 100755
index ..f28c40ab0f00
--- /dev/null
+++ b/scripts/checkdeclares.pl
@@ -0,0 +1,55 @@
+#!/usr/bin/env perl
+# SPDX-License-Identifier: GPL-2.0
+#
+# checkdeclares: find struct declared more than once
+#
+# Copyright 2021 Wan Jiabing
+# Inspired by checkincludes.pl
+#
+# This script checks for duplicate struct declares.
+# Note that this will not take into consideration macros so
+# you should run this only if you know you do have real dups
+# and do not have them under #ifdef's.
+# You could also just review the results.
+
+use strict;
+
+sub usage {
+   print "Usage: checkdeclares.pl \n";
+   print "We just warn of struct declaration duplicates\n";
+   exit 1;
+}
+
+if ($#ARGV < 0) {
+   usage();
+}
+
+my $dup_counter = 0;
+
+foreach my $file (@ARGV) {
+   open(my $f, '<', $file)
+   or die "Cannot open $file: $!.\n";
+
+   my %declaredfiles = ();
+   my @file_lines = ();
+
+   while (<$f>) {
+   if (m/^\s*struct\s*(\w*);$/o) {
+   ++$declaredfiles{$1};
+   }
+   push(@file_lines, $_);
+   }
+
+   close($f);
+
+   foreach my $filename (keys %declaredfiles) {
+   if ($declaredfiles{$filename} > 1) {
+   print "$file: struct $filename is declared more than 
once.\n";
+   ++$dup_counter;
+   }
+   }
+}
+
+if ($dup_counter == 0) {
+   print "No duplicate struct declares found.\n";
+}
-- 
2.25.1



[PATCH] scsi: scsi_priv: Remove duplicate declaration

2021-03-26 Thread Wan Jiabing
struct request and struct request_queue have been
declared at forward struct declaration.
Remove the duplicate and reorder the forward declaration
to be in alphabetic order.

Signed-off-by: Wan Jiabing 
---
 drivers/scsi/scsi_priv.h | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 180636d54982..811abc86f6d6 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -6,14 +6,14 @@
 #include 
 #include 
 
-struct request_queue;
 struct request;
+struct request_queue;
+struct Scsi_Host;
 struct scsi_cmnd;
 struct scsi_device;
-struct scsi_target;
 struct scsi_host_template;
-struct Scsi_Host;
 struct scsi_nl_hdr;
+struct scsi_target;
 
 #define SCSI_CMD_RETRIES_NO_LIMIT -1
 
@@ -96,8 +96,6 @@ extern int scsi_mq_setup_tags(struct Scsi_Host *shost);
 extern void scsi_mq_destroy_tags(struct Scsi_Host *shost);
 extern void scsi_exit_queue(void);
 extern void scsi_evt_thread(struct work_struct *work);
-struct request_queue;
-struct request;
 
 /* scsi_proc.c */
 #ifdef CONFIG_SCSI_PROC_FS
-- 
2.25.1



[PATCH] netfilter: ipset: Remove duplicate declaration

2021-03-26 Thread Wan Jiabing
struct ip_set is declared twice. One is declared at 79th line,
so remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/netfilter/ipset/ip_set.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/netfilter/ipset/ip_set.h 
b/include/linux/netfilter/ipset/ip_set.h
index 46d9a0c26c67..10279c4830ac 100644
--- a/include/linux/netfilter/ipset/ip_set.h
+++ b/include/linux/netfilter/ipset/ip_set.h
@@ -124,8 +124,6 @@ struct ip_set_ext {
bool target;
 };
 
-struct ip_set;
-
 #define ext_timeout(e, s)  \
 ((unsigned long *)(((void *)(e)) + (s)->offset[IPSET_EXT_ID_TIMEOUT]))
 #define ext_counter(e, s)  \
-- 
2.25.1



[PATCH] linux/profile.h: Remove unnecessary declaration

2021-03-26 Thread Wan Jiabing
Declaring struct pt_regs is unnecessary.
On the one hand, there is no function using it;
on the other hand, struct pt_regs has been declared
in linux/kernel.h. Remove them.
Reorder the forward declaration to be in alphabetic order.

Signed-off-by: Wan Jiabing 
---
 include/linux/profile.h | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/profile.h b/include/linux/profile.h
index bad18ca43150..59b3acbbcc2b 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -14,9 +14,8 @@
 #define SLEEP_PROFILING3
 #define KVM_PROFILING  4
 
-struct proc_dir_entry;
-struct pt_regs;
 struct notifier_block;
+struct proc_dir_entry;
 
 #if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS)
 void create_prof_cpu_mask(void);
@@ -84,8 +83,6 @@ int task_handoff_unregister(struct notifier_block * n);
 int profile_event_register(enum profile_type, struct notifier_block * n);
 int profile_event_unregister(enum profile_type, struct notifier_block * n);
 
-struct pt_regs;
-
 #else
 
 #define prof_on 0
-- 
2.25.1



[PATCH] infiniband: ulp: struct iscsi_iser_task is declared twice

2021-03-26 Thread Wan Jiabing
struct iscsi_iser_task has been declared at 201st line.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/infiniband/ulp/iser/iscsi_iser.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h 
b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 78ee9445f801..9f6ac0a09a78 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -297,7 +297,6 @@ struct iser_login_desc {
 
 struct iser_conn;
 struct ib_conn;
-struct iscsi_iser_task;
 
 /**
  * struct iser_device - iSER device handle
-- 
2.25.1



[PATCH] nvdimm/nd-core.h: struct nd_region is declared twice

2021-03-26 Thread Wan Jiabing
struct nd_region has been declared at 118th line.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/nvdimm/nd-core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index 564faa36a3ca..e54551caf335 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -128,7 +128,6 @@ void __nd_device_register(struct device *dev);
 struct nd_label_id;
 char *nd_label_gen_id(struct nd_label_id *label_id, u8 *uuid, u32 flags);
 bool nd_is_uuid_unique(struct device *dev, u8 *uuid);
-struct nd_region;
 struct nvdimm_drvdata;
 struct nd_mapping;
 void nd_mapping_free_labels(struct nd_mapping *nd_mapping);
-- 
2.25.1



[PATCH] [v2] drm/i915: Remove repeated declaration

2021-03-25 Thread Wan Jiabing
struct drm_i915_private, struct intel_crtc_state and
struct intel_crtc is declared twice.
Remove the duplicate.

Reviewed-by: José Roberto de Souza 
Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Modify subject line.
- Delete trailing whitespace in commit log.
---
 drivers/gpu/drm/i915/display/intel_crt.h | 1 -
 drivers/gpu/drm/i915/display/intel_display.h | 1 -
 drivers/gpu/drm/i915/display/intel_vrr.h | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crt.h 
b/drivers/gpu/drm/i915/display/intel_crt.h
index 1b3fba359efc..6c5c44600cbd 100644
--- a/drivers/gpu/drm/i915/display/intel_crt.h
+++ b/drivers/gpu/drm/i915/display/intel_crt.h
@@ -11,7 +11,6 @@
 enum pipe;
 struct drm_encoder;
 struct drm_i915_private;
-struct drm_i915_private;
 
 bool intel_crt_port_enabled(struct drm_i915_private *dev_priv,
i915_reg_t adpa_reg, enum pipe *pipe);
diff --git a/drivers/gpu/drm/i915/display/intel_display.h 
b/drivers/gpu/drm/i915/display/intel_display.h
index 76f8a805b0a3..29cb6d84ed70 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -48,7 +48,6 @@ struct i915_ggtt_view;
 struct intel_atomic_state;
 struct intel_crtc;
 struct intel_crtc_state;
-struct intel_crtc_state;
 struct intel_digital_port;
 struct intel_dp;
 struct intel_encoder;
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.h 
b/drivers/gpu/drm/i915/display/intel_vrr.h
index fac01bf4ab50..96f9c9c27ab9 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.h
+++ b/drivers/gpu/drm/i915/display/intel_vrr.h
@@ -15,7 +15,6 @@ struct intel_crtc;
 struct intel_crtc_state;
 struct intel_dp;
 struct intel_encoder;
-struct intel_crtc;
 
 bool intel_vrr_is_capable(struct drm_connector *connector);
 void intel_vrr_check_modeset(struct intel_atomic_state *state);
-- 
2.25.1



[PATCH] [v3] debug_locks: Remove duplicate declaration

2021-03-25 Thread Wan Jiabing
struct task_struct is declared twice.
Remove the duplicate.

Reviewed-by: Andy Shevchenko 
Signed-off-by: Wan Jiabing 
---
Changelog:
v3:
- Add reviewer info and modify subject line
v2:
- Remove another duplicate declaration for being closer
  to its user.
---
 include/linux/debug_locks.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 2915f56ad421..32f6a37a3d3f 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -6,8 +6,6 @@
 #include 
 #include 
 
-struct task_struct;
-
 extern int debug_locks __read_mostly;
 extern int debug_locks_silent __read_mostly;
 
-- 
2.25.1



[PATCH] [v2] include: linux: debug_locks: Remove duplicate declaration

2021-03-25 Thread Wan Jiabing
struct task_struct has been declared.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Remove another duplicate declaration for being closer
  to its user.
---
 include/linux/debug_locks.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 2915f56ad421..32f6a37a3d3f 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -6,8 +6,6 @@
 #include 
 #include 
 
-struct task_struct;
-
 extern int debug_locks __read_mostly;
 extern int debug_locks_silent __read_mostly;
 
-- 
2.25.1



[PATCH] [v3] drivers: watchdog: Remove duplicate include of kernel.h

2021-03-25 Thread Wan Jiabing
linux/kernel.h has been included. Remove the duplicate.
Reorder include files to be in alphabetic order.

Signed-off-by: Wan Jiabing 
---
Changelog:
v3:
- Reorder include files to be in alphabetic order.

v2:
- Remove the duplicate which won't make worse.
---
 drivers/watchdog/dw_wdt.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 32d0e1781e63..cd578843277e 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -13,22 +13,21 @@
  */
 
 #include 
-#include 
-#include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
+#include 
 #include 
 #include 
-#include 
 
 #define WDOG_CONTROL_REG_OFFSET0x00
 #define WDOG_CONTROL_REG_WDT_EN_MASK   0x01
-- 
2.25.1



[PATCH] [v2] drivers: gpu: drm: Remove duplicate declaration

2021-03-25 Thread Wan Jiabing
struct dss_device has been declared. Remove the duplicate.
And sort these forward declarations alphabetically.

Signed-off-by: Wan Jiabing 
---
Changelog:
v2:
- Sort forward declarations alphabetically.
---
 drivers/gpu/drm/omapdrm/dss/omapdss.h | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h 
b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index a40abeafd2e9..040d5a3e33d6 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -48,16 +48,15 @@
 #define DISPC_IRQ_ACBIAS_COUNT_STAT3   (1 << 29)
 #define DISPC_IRQ_FRAMEDONE3   (1 << 30)
 
-struct dss_device;
-struct omap_drm_private;
-struct omap_dss_device;
 struct dispc_device;
+struct drm_connector;
 struct dss_device;
 struct dss_lcd_mgr_config;
+struct hdmi_avi_infoframe;
+struct omap_drm_private;
+struct omap_dss_device;
 struct snd_aes_iec958;
 struct snd_cea_861_aud_if;
-struct hdmi_avi_infoframe;
-struct drm_connector;
 
 enum omap_display_type {
OMAP_DISPLAY_TYPE_NONE  = 0,
-- 
2.25.1



[PATCH] [v3] drivers: staging: _adapter is declared twice

2021-03-25 Thread Wan Jiabing
struct _adapter has been declared at 23rd line.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
Changelog:
v3:
- Delete trailing whitespace.

v2:
- Delete the blank line.
---
 drivers/staging/rtl8712/drv_types.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8712/drv_types.h 
b/drivers/staging/rtl8712/drv_types.h
index 0c4325073c63..a44d04effc8b 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -36,8 +36,6 @@ enum _NIC_VERSION {
RTL8716_NIC
 };
 
-struct _adapter;
-
 struct qos_priv{
/* bit mask option: u-apsd, s-apsd, ts, block ack... */
unsigned int qos_option;
-- 
2.25.1



[PATCH] [v2] drivers: staging: _adapter is declared twice

2021-03-25 Thread Wan Jiabing
struct _adapter has been declared at 23rd line. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/staging/rtl8712/drv_types.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8712/drv_types.h 
b/drivers/staging/rtl8712/drv_types.h
index 0c4325073c63..a44d04effc8b 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -36,8 +36,6 @@ enum _NIC_VERSION {
RTL8716_NIC
 };
 
-struct _adapter;
-
 struct qos_priv{
/* bit mask option: u-apsd, s-apsd, ts, block ack... */
unsigned int qos_option;
-- 
2.25.1



[PATCH] include: net: struct sock is declared twice

2021-03-25 Thread Wan Jiabing
struct sock has been declared. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/net/bpf_sk_storage.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/bpf_sk_storage.h b/include/net/bpf_sk_storage.h
index 0e85713f56df..2926f1f00d65 100644
--- a/include/net/bpf_sk_storage.h
+++ b/include/net/bpf_sk_storage.h
@@ -27,7 +27,6 @@ struct bpf_local_storage_elem;
 struct bpf_sk_storage_diag;
 struct sk_buff;
 struct nlattr;
-struct sock;
 
 #ifdef CONFIG_BPF_SYSCALL
 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk);
-- 
2.25.1



[PATCH] include: linux: struct path is declared twice

2021-03-25 Thread Wan Jiabing
struct path has been declared at 85th line. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/mount.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index 5d92a7e1a742..30272f961af7 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -94,7 +94,6 @@ extern struct vfsmount *mnt_clone_internal(const struct path 
*path);
 extern bool __mnt_is_readonly(struct vfsmount *mnt);
 extern bool mnt_may_suid(struct vfsmount *mnt);
 
-struct path;
 extern struct vfsmount *clone_private_mount(const struct path *path);
 extern int __mnt_want_write(struct vfsmount *);
 extern void __mnt_drop_write(struct vfsmount *);
-- 
2.25.1



[PATCH] include: linux: struct device is declared twice

2021-03-25 Thread Wan Jiabing
struct device has been declared at 133rd line. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/libnvdimm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
index 01f251b6e36c..89b69e645ac7 100644
--- a/include/linux/libnvdimm.h
+++ b/include/linux/libnvdimm.h
@@ -141,7 +141,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct 
device *dev,
 
 struct nvdimm_bus;
 struct module;
-struct device;
 struct nd_blk_region;
 struct nd_blk_region_desc {
int (*enable)(struct nvdimm_bus *nvdimm_bus, struct device *dev);
-- 
2.25.1



[PATCH] include: scsi: scsi_host_cmd_pool is declared twice

2021-03-25 Thread Wan Jiabing
struct scsi_host_cmd_pool has been declared. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/scsi/scsi_host.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index e30fd963b97d..5fa8f6a78d05 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -19,7 +19,6 @@ struct scsi_device;
 struct scsi_host_cmd_pool;
 struct scsi_target;
 struct Scsi_Host;
-struct scsi_host_cmd_pool;
 struct scsi_transport_template;
 
 
-- 
2.25.1



[PATCH] drivers: net: wireless: struct lbs_private is declared duplicately

2021-03-25 Thread Wan Jiabing
struct lbs_private has been declared at 22nd line.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/net/wireless/marvell/libertas/decl.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/decl.h 
b/drivers/net/wireless/marvell/libertas/decl.h
index 5d1e30e0c5db..c1e0388ef01d 100644
--- a/drivers/net/wireless/marvell/libertas/decl.h
+++ b/drivers/net/wireless/marvell/libertas/decl.h
@@ -23,7 +23,6 @@ struct lbs_private;
 typedef void (*lbs_fw_cb)(struct lbs_private *priv, int ret,
const struct firmware *helper, const struct firmware *mainfw);
 
-struct lbs_private;
 struct sk_buff;
 struct net_device;
 struct cmd_ds_command;
-- 
2.25.1



[PATCH] drivers: net: ethernet: struct sk_buff is declared duplicately

2021-03-25 Thread Wan Jiabing
struct sk_buff has been declared. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/net/ethernet/netronome/nfp/nfp_app.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_app.h 
b/drivers/net/ethernet/netronome/nfp/nfp_app.h
index 76d13af46a7a..3e9baff07100 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_app.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_app.h
@@ -18,7 +18,6 @@ struct netdev_bpf;
 struct netlink_ext_ack;
 struct pci_dev;
 struct sk_buff;
-struct sk_buff;
 struct nfp_app;
 struct nfp_cpp;
 struct nfp_pf;
-- 
2.25.1



[PATCH] drivers: staging: _adapter is declared twice

2021-03-25 Thread Wan Jiabing
struct _adapter has been declared at 23rd line. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/staging/rtl8712/drv_types.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8712/drv_types.h 
b/drivers/staging/rtl8712/drv_types.h
index 0c4325073c63..976d19cdcf87 100644
--- a/drivers/staging/rtl8712/drv_types.h
+++ b/drivers/staging/rtl8712/drv_types.h
@@ -36,7 +36,6 @@ enum _NIC_VERSION {
RTL8716_NIC
 };
 
-struct _adapter;
 
 struct qos_priv{
/* bit mask option: u-apsd, s-apsd, ts, block ack... */
-- 
2.25.1



[PATCH] drivers: gpu: drm: xen_drm_front_drm_info is declared twice

2021-03-25 Thread Wan Jiabing
struct xen_drm_front_drm_info has been declared. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/xen/xen_drm_front_conn.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.h 
b/drivers/gpu/drm/xen/xen_drm_front_conn.h
index 3adacba9a23b..e5f4314899ee 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_conn.h
+++ b/drivers/gpu/drm/xen/xen_drm_front_conn.h
@@ -16,7 +16,6 @@
 struct drm_connector;
 struct xen_drm_front_drm_info;
 
-struct xen_drm_front_drm_info;
 
 int xen_drm_front_conn_init(struct xen_drm_front_drm_info *drm_info,
struct drm_connector *connector);
-- 
2.25.1



[PATCH] drivers: gpu: drm: Remove repeated declaration

2021-03-24 Thread Wan Jiabing
struct drm_i915_private, struct intel_crtc_state and
struct intel_crtc have been declared before. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/i915/display/intel_crt.h | 1 -
 drivers/gpu/drm/i915/display/intel_display.h | 1 -
 drivers/gpu/drm/i915/display/intel_vrr.h | 1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crt.h 
b/drivers/gpu/drm/i915/display/intel_crt.h
index 1b3fba359efc..6c5c44600cbd 100644
--- a/drivers/gpu/drm/i915/display/intel_crt.h
+++ b/drivers/gpu/drm/i915/display/intel_crt.h
@@ -11,7 +11,6 @@
 enum pipe;
 struct drm_encoder;
 struct drm_i915_private;
-struct drm_i915_private;
 
 bool intel_crt_port_enabled(struct drm_i915_private *dev_priv,
i915_reg_t adpa_reg, enum pipe *pipe);
diff --git a/drivers/gpu/drm/i915/display/intel_display.h 
b/drivers/gpu/drm/i915/display/intel_display.h
index 76f8a805b0a3..29cb6d84ed70 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -48,7 +48,6 @@ struct i915_ggtt_view;
 struct intel_atomic_state;
 struct intel_crtc;
 struct intel_crtc_state;
-struct intel_crtc_state;
 struct intel_digital_port;
 struct intel_dp;
 struct intel_encoder;
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.h 
b/drivers/gpu/drm/i915/display/intel_vrr.h
index fac01bf4ab50..96f9c9c27ab9 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.h
+++ b/drivers/gpu/drm/i915/display/intel_vrr.h
@@ -15,7 +15,6 @@ struct intel_crtc;
 struct intel_crtc_state;
 struct intel_dp;
 struct intel_encoder;
-struct intel_crtc;
 
 bool intel_vrr_is_capable(struct drm_connector *connector);
 void intel_vrr_check_modeset(struct intel_atomic_state *state);
-- 
2.25.1



[PATCH] drivers: gpu: drm: Remove duplicate declaration

2021-03-24 Thread Wan Jiabing
struct dss_device has been declared at 51st line. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h 
b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index a40abeafd2e9..2658aadee09a 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -52,7 +52,6 @@ struct dss_device;
 struct omap_drm_private;
 struct omap_dss_device;
 struct dispc_device;
-struct dss_device;
 struct dss_lcd_mgr_config;
 struct snd_aes_iec958;
 struct snd_cea_861_aud_if;
-- 
2.25.1



[PATCH] tools: perf: util: Remove duplicate declaration

2021-03-24 Thread Wan Jiabing
struct evlist has been declared at 10th line.
struct comm has been declared at 15th line.
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 tools/perf/util/metricgroup.h  | 1 -
 tools/perf/util/thread-stack.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/tools/perf/util/metricgroup.h b/tools/perf/util/metricgroup.h
index ed1b9392e624..026bbf416c48 100644
--- a/tools/perf/util/metricgroup.h
+++ b/tools/perf/util/metricgroup.h
@@ -9,7 +9,6 @@
 
 struct evlist;
 struct evsel;
-struct evlist;
 struct option;
 struct rblist;
 struct pmu_events_map;
diff --git a/tools/perf/util/thread-stack.h b/tools/perf/util/thread-stack.h
index 3bc47a42af8e..b3cd09beb62f 100644
--- a/tools/perf/util/thread-stack.h
+++ b/tools/perf/util/thread-stack.h
@@ -16,7 +16,6 @@ struct comm;
 struct ip_callchain;
 struct symbol;
 struct dso;
-struct comm;
 struct perf_sample;
 struct addr_location;
 struct call_path;
-- 
2.25.1



[PATCH] include: linux: debug_locks: Remove duplicate declaration

2021-03-24 Thread Wan Jiabing
struct task_struct is declared at 9th line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/debug_locks.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 2915f56ad421..0b3187a5290d 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -46,7 +46,6 @@ extern int debug_locks_off(void);
 # define locking_selftest()do { } while (0)
 #endif
 
-struct task_struct;
 
 #ifdef CONFIG_LOCKDEP
 extern void debug_show_all_locks(void);
-- 
2.25.1



[PATCH] include: linux: host1x: Remove duplicate declaration

2021-03-24 Thread Wan Jiabing
struct host1x is declared at 20th line. Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/host1x.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index ce59a6a6a008..462f0bc7a703 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -140,7 +140,6 @@ static inline void host1x_bo_munmap(struct host1x_bo *bo, 
void *addr)
 
 struct host1x_syncpt_base;
 struct host1x_syncpt;
-struct host1x;
 
 struct host1x_syncpt *host1x_syncpt_get(struct host1x *host, u32 id);
 u32 host1x_syncpt_id(struct host1x_syncpt *sp);
-- 
2.25.1



[PATCH] include: linux: fs: Remove duplicate declaration

2021-03-24 Thread Wan Jiabing
struct iov_iter has been declared at 66th line. 
Remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/fs.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index ec8f3ddf4a6a..7f3cbd47670a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1883,7 +1883,6 @@ struct dir_context {
  */
 #define REMAP_FILE_ADVISORY(REMAP_FILE_CAN_SHORTEN)
 
-struct iov_iter;
 
 struct file_operations {
struct module *owner;
-- 
2.25.1



[PATCH] include: linux: pm: Remove duplicate declaration

2021-03-24 Thread Wan Jiabing
struct device is declared twice.So remove the duplicate.

Signed-off-by: Wan Jiabing 
---
 include/linux/pm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/pm.h b/include/linux/pm.h
index 482313a8ccfc..c9657408fee1 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -39,7 +39,6 @@ static inline void pm_vt_switch_unregister(struct device *dev)
  * Device power management
  */
 
-struct device;
 
 #ifdef CONFIG_PM
 extern const char power_group_name[];  /* = "power" */
-- 
2.25.1



[PATCH] include: linux: lightnvm: Remove duplicate include

2021-03-24 Thread Wan Jiabing
ifdef CONFIG_NVM, linux/blkdev.h and uapi/linux/lightnvm.h
would be included twice. So remove them.
By the way, I find that struct nvm_rq is declared twice. 
If removing the duplicated declaration really makes sense, it would 
be much clean up work to do in inlude/linux.

Signed-off-by: Wan Jiabing 
---
 include/linux/lightnvm.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 1db223710b28..1ddb41ee71eb 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -112,10 +112,8 @@ struct nvm_dev_ops {
 
 #ifdef CONFIG_NVM
 
-#include 
 #include 
 #include 
-#include 
 
 enum {
/* HW Responsibilities */
@@ -276,7 +274,6 @@ struct nvm_target {
 
 #define NVM_MAX_VLBA (64) /* max logical blocks in a vector command */
 
-struct nvm_rq;
 typedef void (nvm_end_io_fn)(struct nvm_rq *);
 
 struct nvm_rq {
-- 
2.25.1



[PATCH] arch: arm: mach-sa1100: Remove duplicate include

2021-03-23 Thread Wan Jiabing
linux/tty.h has been included at line 13, so 
remove the duplicate one at line 21.

Signed-off-by: Wan Jiabing 
---
 arch/arm/mach-sa1100/hackkit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index 3085f1c2e586..3fe34ee7c0ab 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -18,7 +18,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.25.1



[PATCH] [v2] arch: powerpc: Remove duplicate includes

2021-03-23 Thread Wan Jiabing
mmu-hash.h: asm/bug.h has been included at line 12, so remove 
the duplicate one at line 21.
interrupt.c: asm/interrupt.h has been included at line 12, so 
remove the duplicate one at line 10. 
time.c: linux/sched/clock.h has been included at line 33,so 
remove the duplicate one at line 56 and move sched/cputime.h 
under sched including segament.

Signed-off-by: Wan Jiabing 
---
 arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 -
 arch/powerpc/kernel/interrupt.c   | 1 -
 arch/powerpc/kernel/time.c| 3 +--
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h 
b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index f911bdb68d8b..3004f3323144 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -18,7 +18,6 @@
  * complete pgtable.h but only a portion of it.
  */
 #include 
-#include 
 #include 
 #include 
 
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index c475a229a42a..11d456896772 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -7,7 +7,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index b67d93a609a2..e2766e0e2a3a 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -52,8 +53,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 
-- 
2.25.1



[PATCH] [v2] tools: testing: Remove duplicate includes

2021-03-23 Thread Wan Jiabing
sched.h has been included at line 33, so remove the 
duplicate one at line 36.
inttypes.h has been included at line 19, so remove the 
duplicate one at line 23.
pthread.h has been included at line 17,so remove the 
duplicate one at line 20.

Signed-off-by: Wan Jiabing 
---
 tools/testing/selftests/powerpc/mm/tlbie_test.c | 1 -
 tools/testing/selftests/powerpc/tm/tm-poison.c  | 1 -
 tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c | 1 -
 3 files changed, 3 deletions(-)

diff --git a/tools/testing/selftests/powerpc/mm/tlbie_test.c 
b/tools/testing/selftests/powerpc/mm/tlbie_test.c
index f85a0938ab25..48344a74b212 100644
--- a/tools/testing/selftests/powerpc/mm/tlbie_test.c
+++ b/tools/testing/selftests/powerpc/mm/tlbie_test.c
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/tools/testing/selftests/powerpc/tm/tm-poison.c 
b/tools/testing/selftests/powerpc/tm/tm-poison.c
index 29e5f26af7b9..27c083a03d1f 100644
--- a/tools/testing/selftests/powerpc/tm/tm-poison.c
+++ b/tools/testing/selftests/powerpc/tm/tm-poison.c
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "tm.h"
 
diff --git a/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c 
b/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c
index e2a0c07e8362..9ef37a9836ac 100644
--- a/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c
+++ b/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c
@@ -17,7 +17,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "tm.h"
 #include "utils.h"
-- 
2.25.1



[PATCH] tools: perf: Remove duplicate includes

2021-03-22 Thread Wan Jiabing
sys/stat.h has been included at line 23, so remove the
duplicate one at line 27.
linux/string.h has been included at line 7, so remove the
duplicate one at line 9.
time.h has been included at line 14, so remove the
duplicate one at line 28.

Signed-off-by: Wan Jiabing 
---
 tools/perf/builtin-daemon.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index ace8772a4f03..632ecd010a4f 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -6,7 +6,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -24,8 +23,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include "builtin.h"
 #include "perf.h"
 #include "debug.h"
-- 
2.25.1



[PATCH] tools: testing: inttypes.h is included twice

2021-03-22 Thread Wan Jiabing
inttypes.h has been included at line 19.
So we remove the duplicate one at line 23.

Signed-off-by: Wan Jiabing 
---
 tools/testing/selftests/powerpc/tm/tm-poison.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/powerpc/tm/tm-poison.c 
b/tools/testing/selftests/powerpc/tm/tm-poison.c
index 29e5f26af7b9..27c083a03d1f 100644
--- a/tools/testing/selftests/powerpc/tm/tm-poison.c
+++ b/tools/testing/selftests/powerpc/tm/tm-poison.c
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "tm.h"
 
-- 
2.25.1



  1   2   >