[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

[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

[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

[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

[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

[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

[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

[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

[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/ql

[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

[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/liqu

[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

[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

[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

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

2021-04-12 Thread Wan Jiabing
t/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

[PATCH] powerpc: alignment: Remove unneeded variables

2021-04-12 Thread Wan Jiabing
t/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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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

2021-04-01 Thread Wan Jiabing
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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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(-)

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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

2021-03-27 Thread Wan Jiabing
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

[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

[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

[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

[PATCH] scripts: checkdeclares for checking duplicate struct declares

2021-03-27 Thread Wan Jiabing
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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

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

2021-03-23 Thread Wan Jiabing
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

[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

[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

[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

  1   2   >