> I've accidentally mounted one overlayfs over another and got obvious
> warning from lockdep: i_mutex lockdep classes are per-fs-type.
>
> # mount -t overlay overlay 1 -o
> upperdir=1_upper,workdir=1_work,lowerdir=1_lower
> # mount -t overlay overlay 2 -o upperdir=2_upper,workdir=2_work,lowerdir=
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Xu Wang
---
sound/usb/endpoint.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 8e568823c992..d5ed4ddfd451 100644
--- a/sound
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).
net/bridge/br_multicast.c:1246:9-16: WARNING: ERR_CAST can be used with mp
Generated by: scripts/coccinelle/api/err_cast.cocci
Signed-off-by: Xu Wang
---
net/bridge/br_multicast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/crypto/cavium/cpt/cptvf_main.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c
b/drivers/crypto/cavium/cpt/cptvf_main.c
index
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/usb/host/ehci-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
index 6361d81272bc..769329032257 100644
--- a/drivers
Use WARN(1,...) rather than printk followed by WARN_ON(1).
Signed-off-by: Xu Wang
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 526fd5ac2ba8..a556b8c00a9f 100644
--- a/kernel/trace/trace.c
+++ b
Use WARN(1,...) rather than printk followed by WARN_ON(1).
Signed-off-by: Xu Wang
---
fs/dcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 2cdfdcd4276b..1dad7069dfe5 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1637,7 +1637,7
Remove unneeded assignment parentheses.
Signed-off-by: Xu Wang
---
scripts/extract-cert.c | 2 +-
scripts/sign-file.c| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/extract-cert.c b/scripts/extract-cert.c
index b071bf476fea..8005911926b8 100644
--- a/scripts
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Xu Wang
---
drivers/usb/misc/yurex.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
index 6e7d34e7fec4..2063ef071393 100644
seq_puts is a lot cheaper than seq_printf, so use that to print
literal strings.
Signed-off-by: Xu Wang
---
fs/ext4/mballoc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index c0a331e2feb0..77288e549a95 100644
--- a/fs/ext4/mballoc.c
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "devm_kcalloc".
Signed-off-by: Xu Wang
---
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 ++--
1 file changed, 2
Replace a comma between expression statements by a semicolon.
Signed-off-by: Xu Wang
---
fs/nfs/blocklayout/rpc_pipefs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
index 9fb067a6f7e0..ef9db135c649 100644
Replace a comma between expression statements by a semicolon.
Signed-off-by: Xu Wang
---
kernel/time/alarmtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index ca223a89530a..f4ace1bf8382 100644
--- a/kernel/time
Replace a comma between expression statements by a semicolon.
Signed-off-by: Xu Wang
---
mm/hugetlb_cgroup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
index aabf65d4d91b..1f87aec9ab5c 100644
--- a/mm/hugetlb_cgroup.c
+++ b
Replace a comma between expression statements by a semicolon.
Signed-off-by: Xu Wang
---
samples/v4l/v4l2-pci-skeleton.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c
index 3fa6582b4a68..dcc2f62265b6
Replace a comma between expression statements by a semicolon.
Signed-off-by: Xu Wang
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 5d20b2da4427..5055e1531e43 100644
--- a/tools/lib/bpf
Remove unneeded variable t1 seed_encrypt() and
seed_decrypt().
Signed-off-by: Xu Wang
---
crypto/seed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/seed.c b/crypto/seed.c
index 5e3bef3a617d..69b3058d6a32 100644
--- a/crypto/seed.c
+++ b/crypto/seed.c
@@ -366,7
Simplify the return expression.
Signed-off-by: Xu Wang
---
tools/lib/bpf/libbpf.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 5055e1531e43..b423fdaae0b6 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf
Simplify the return expression.
Signed-off-by: Xu Wang
---
net/ipv6/rpl_iptunnel.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c
index 5fdf3ebb953f..e58ad9ac987c 100644
--- a/net/ipv6/rpl_iptunnel.c
+++ b/net/ipv6
Remove unnecassary casts in the argument to kfree.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c
b/drivers/net/ethernet/qlogic/qed/qed_main.c
index
Simplify the return expression.
Signed-off-by: Xu Wang
---
tools/lib/bpf/libbpf.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 5d20b2da4427..cd59e237ca96 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c
b/drivers/net/ethernet/freescale/fs_enet
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
b/drivers/net/ethernet/freescale/fs_enet
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
b/drivers/net/ethernet/qlogic/qlcnic
fix semicolon.cocci warnings:
./drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c:272:2-3: Unneeded
semicolon
Signed-off-by: Xu Wang
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell
fix semicolon.cocci warnings:
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c:1788:3-4: Unneeded
semicolon
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c:1809:3-4: Unneeded
semicolon
Signed-off-by: Xu Wang
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 4
fix semicolon.cocci warnings:
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1326:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af
fix semicolon.cocci warnings:
drivers/net/wireless/mediatek/mt76/mt7915/mac.c:1694:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
sound/soc/codecs/adau17x1.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
sound/soc/codecs/da7218.c | 13 +
sound/soc/codecs/da7219-aad.c | 19 ---
sound
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
sound/soc/codecs/es8328.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs
drivers/input/touchscreen/zinitix.c:164:31-32: Unneeded semicolon
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Xu Wang
---
drivers/input/touchscreen/zinitix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input
fix semicolon.cocci warnings:
drivers/net/ethernet/mscc/ocelot_net.c:460:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
drivers/net/ethernet/mscc/ocelot_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mscc/ocelot_net.c
b/drivers/net/ethernet
fix semicolon.cocci warning:
drivers/dma/qcom/gpi.c:1703:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
drivers/dma/qcom/gpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index 1a0bf6b0567a..f20b5573fc67 100644
--- a
ecause clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/iio/adc/stm32-dfsdm-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/adc/stm32-dfsdm-core.c
b
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 18 ++
drivers/gpu/drm/msm/disp/mdp5/mdp5_mdss.c | 12
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff
Fix warnings reported by coccicheck:
./drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c:159:4-10:
WARNING: NULL check before some freeing functions is not needed.
Signed-off-by: Xu Wang
---
.../media/atomisp/pci/runtime/isp_param/src/isp_param.c| 3 +--
1 file
./drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c:390:2-8:
WARNING: NULL check before some freeing functions is not needed.
Signed-off-by: Xu Wang
---
.../atomisp/pci/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c | 3 +--
1 file changed, 1 insertion(+), 2
Fix warnings reported by coccicheck:
./drivers/scsi/qla2xxx/qla_os.c:4636:2-7: WARNING: NULL check before some
freeing functions is not needed.
./drivers/scsi/qla2xxx/qla_os.c:4651:3-8: WARNING: NULL check before some
freeing functions is not needed.
Signed-off-by: Xu Wang
---
drivers/scsi
Since commit ff9ea323816d ("block, bdi: an active gendisk always has a
request_queue associated with it") the request_queue pointer returned
from bdev_get_queue() shall never be NULL.
Signed-off-by: Xu Wang
---
drivers/md/dm-thin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
Since commit ff9ea323816d ("block, bdi: an active gendisk always has a
request_queue associated with it") the request_queue pointer returned
from bdev_get_queue() shall never be NULL.
Signed-off-by: Xu Wang
---
drivers/md/dm-cache-target.c | 2 +-
1 file changed, 1 insertion(+),
fix semicolon.cocci warning:
tools/testing/selftests/net/ipsec.c:1788:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
tools/testing/selftests/net/ipsec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/ipsec.c
b/tools/testing/selftests/net
fix semicolon.cocci warning:
tools/tracing/latency/latency-collector.c:1021:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
tools/tracing/latency/latency-collector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tracing/latency/latency-collector.c
b/tools/tracing
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/video/fbdev/goldfishfb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c
index 9c83ec3f8e1f..c2f386b35617 100644
Remove casting the values returned by dma_alloc_coherent.
Signed-off-by: Xu Wang
---
drivers/usb/host/fotg210-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 1d94fcfac2c2..8961492a4c53 100644
--- a
Remove casting the values returned by kcalloc.
Signed-off-by: Xu Wang
---
drivers/scsi/pm8001/pm8001_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c
b/drivers/scsi/pm8001/pm8001_init.c
index 3cf3e58b6979..ac0e598b8ac2 100644
In case of error, the function devm_ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Signed-off-by: Xu Wang
---
drivers/i2c/busses/i2c-mlxbf.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/usb/dwc2/platform.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/usb/gadget/udc/aspeed-vhub/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/udc/aspeed
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/iio/adc/stm32-adc-core.c | 29 +++--
drivers/iio/adc/stm32-adc.c | 14
ecause clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/iio/adc/stm32-dfsdm-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/adc/stm32-dfsdm-core.c
b
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/iio/frequency/adf4350.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/frequency/adf4350.c b
Remove extra brackets.
Signed-off-by: Xu Wang
---
drivers/w1/w1_int.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index b3e1792d9c49..eee4b5b652f1 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -102,7 +102,7 @@ int
Remove extra brackets.
Signed-off-by: Xu Wang
---
sound/isa/sb/sb16_csp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c
index 8635a2b6b36b..2c292bf0f5ae 100644
--- a/sound/isa/sb/sb16_csp.c
+++ b/sound/isa/sb/sb16_csp.c
fix semicolon.cocci warning:
tools/tracing/latency/latency-collector.c:1021:2-3: Unneeded semicolon
Signed-off-by: Xu Wang
---
Changes since v2:
- Fix another instance of superfluous semicolon.
---
tools/tracing/latency/latency-collector.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
Because clk_prepare_enable() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/clk/rockchip/clk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/armada/armada_510.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/armada
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove them.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove them.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge
In ioremap we should return -ENOMEM when it reports an
memory allocation failure.
Signed-off-by: Xu Wang
---
arch/arm/mach-zynq/platsmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
index 68ec303fa278
> On Thu, Jun 25, 2015 at 10:24 AM, Xu Wang wrote:
> >> I've accidentally mounted one overlayfs over another and got obvious
> >> warning from lockdep: i_mutex lockdep classes are per-fs-type.
> >>
> >> # mount -t overlay overlay 1 -o
> >
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "devm_kcalloc".
Signed-off-by: Xu Wang
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 5 +++--
1 file changed, 3
Replace sg++ with sg = sg_next(sg).
Signed-off-by: Xu Wang
---
net/rds/send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rds/send.c b/net/rds/send.c
index 68e2bdb08fd0..57d03a6753de 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -387,7 +387,7 @@ int
Using for_each_set_bit() to simplify the code.
Signed-off-by: Xu Wang
---
arch/xtensa/kernel/perf_event.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/xtensa/kernel/perf_event.c b/arch/xtensa/kernel/perf_event.c
index 9bae79f70301..99fcd63ce597 100644
--- a/arch
Remove unnecassary casts in the argument to kfree.
Signed-off-by: Xu Wang
---
fs/ceph/xattr.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 71ee34d160c3..3a733ac33d9b 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
Remove unnecassary casts in the argument to kfree.
Signed-off-by: Xu Wang
---
arch/powerpc/platforms/pseries/dlpar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/dlpar.c
b/arch/powerpc/platforms/pseries/dlpar.c
index 16e86ba8aa20
platform_get_resource() may return NULL, add proper
check to avoid potential NULL dereferencing.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/xilinx/ll_temac_main.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c
b/drivers/net/ethernet
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/ptp/ptp_ines.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c
index
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
kernel/audit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 7efaece534a9..144e1e9322a5 100644
Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove it
Signed-off-by: Xu Wang
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86
Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove them.
Signed-off-by: Xu Wang
---
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/ingenic
Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove it
Signed-off-by: Xu Wang
---
drivers/i2c/busses/i2c-mt65xx.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mt65xx.c b
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "devm_kcalloc".
Signed-off-by: Xu Wang
---
drivers/hwtracing/coresight/coresight-platform.c | 5 ++---
1 file changed, 2
Replace sg++ with sg = sg_next(sg).
Signed-off-by: Xu Wang
---
arch/alpha/kernel/pci_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 7f1925a32c99..81037907268d 100644
--- a/arch/alpha/kernel
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/scsi/qedi/qedi_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi
Because clk_disable_unprepare already checked NULL clock
parameter, so the additional checks are unnecessary, just remove them.
Signed-off-by: Xu Wang
---
drivers/crypto/s5p-sss.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto
Because clk_disable_unprepare already checked
NULL clock parameter, so the additional check is
unnecessary, just remove it.
Signed-off-by: Xu Wang
---
drivers/bluetooth/hci_qca.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers
Because clk_disable_unprepare already checked NULL clock
parameter, so the additional checks are unnecessary, just remove them.
Signed-off-by: Xu Wang
---
drivers/mmc/host/omap_hsmmc.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/mmc/host
Using ata_link_info() instead of ata_link_printk().
Signed-off-by: Xu Wang
---
drivers/ata/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 0c0a736eb861..9d72d907b4ee 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "devm_kcalloc".
Signed-off-by: Xu Wang
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 ++--
1 file
Replace a comma between expression statements by a semicolon.
Signed-off-by: Xu Wang
---
block/bsg-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index fb7b347f8010..d185396d88bb 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
Remove unneeded variable insize in venus_pioctl().
Signed-off-by: Xu Wang
---
fs/coda/upcall.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index eb3b1898da46..903bd7a4ee16 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
Using ata_link_info() instead of ata_link_printk().
Signed-off-by: Xu Wang
---
drivers/ata/ahci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 0c0a736eb861..fbd8eaa32d32 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata
Because clk_enable, clk_disable, clk_prepare, and clk_unprepare already
checked NULL clock parameter, so the additional checks are unnecessary,
just remove them.
Signed-off-by: Xu Wang
---
drivers/video/fbdev/au1100fb.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
sound/soc/ti/davinci-evm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang
---
sound/soc/samsung/i2s.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung
ecause clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang
---
sound/soc/pxa/pxa-ssp.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/pxa
Remove unnecessary cast in the argument to kfree.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/neterion/vxge/vxge-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c
b/drivers/net/ethernet/neterion/vxge/vxge-config.c
Remove unneeded variable ret used to store return value.
Signed-off-by: Xu Wang
---
drivers/net/ethernet/microchip/lan743x_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c
b/drivers/net/ethernet/microchip/lan743x_main.c
Use set_current_state macro instead of current->state = TASK_RUNNING.
Signed-off-by: Xu Wang
---
kernel/time/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 398e6eadb861..2bf78ecffebe 100644
--- a/kernel/time/time
Remove unneeded variable ret i.
Signed-off-by: Xu Wang
---
drivers/md/bcache/writeback.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 1cf1e5016cb9..71801c086b82 100644
--- a/drivers/md/bcache/writeback.c
+++ b/drivers
Remove unnecassary casts in the argument to kfree.
Signed-off-by: Xu Wang
---
fs/debugfs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index ae49a55bda00..3753c4c484fc 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
Remove unneeded variable i in bch_dirty_init_thread().
Signed-off-by: Xu Wang
---
drivers/md/bcache/writeback.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 1cf1e5016cb9..71801c086b82 100644
--- a/drivers/md/bcache
This patch is to use eth_broadcast_addr() to assign broadcast address
insetad of memset().
Signed-off-by: Xu Wang
---
drivers/net/ethernet/freescale/enetc/enetc_qos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_qos.c
b/drivers
Remove extra brackets.
Signed-off-by: Xu Wang
---
tools/power/acpi/os_specific/service_layers/osunixmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/power/acpi/os_specific/service_layers/osunixmap.c
b/tools/power/acpi/os_specific/service_layers/osunixmap.c
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Signed-off-by: Xu Wang
---
drivers/media/pci/cx88/cx88-mpeg.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c
b/drivers/media/pci/cx88/cx88-mpeg.c
index a57c991b165b
1 - 100 of 136 matches
Mail list logo