Author: Julia Lawall <Julia.Lawall@lip6.fr> The ttusbdecfe_config structure is never modified, so declare it as const. Other references to this structure type were already declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab — drivers/media/usb/ttusb-dec/ttusb_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/media/usb/ttusb-dec/ttusb_dec.c …
Catégorie : Linux
Nov 13 2015
GFS2: Delete an unnecessary check before the function call « iput »
Author: Markus Elfring <elfring@users.sourceforge.net> The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bob Peterson — fs/gfs2/ops_fstype.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Nov 13 2015
[media] drivers/media/usb/dvb-usb-v2: constify mxl111sf_demod_config structure
Author: Julia Lawall <Julia.Lawall@lip6.fr> The mxl111sf_demod_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab — drivers/media/usb/dvb-usb-v2/mxl111sf-demod.c | 4 ++– drivers/media/usb/dvb-usb-v2/mxl111sf-demod.h | 4 ++– drivers/media/usb/dvb-usb-v2/mxl111sf.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff –git …
Nov 13 2015
nfc: s3fwrn5: constify s3fwrn5_phy_ops structures
Author: Julia Lawall <Julia.Lawall@lip6.fr> The s3fwrn5_phy_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Robert Baldyga Signed-off-by: Samuel Ortiz — drivers/nfc/s3fwrn5/core.c | 2 +- drivers/nfc/s3fwrn5/i2c.c | 2 +- drivers/nfc/s3fwrn5/s3fwrn5.h | 4 ++– 3 files changed, 4 insertions(+), 4 deletions(-) diff –git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c …
Nov 13 2015
dmaengine: ioatdma: constify dca_ops structures
Author: Julia Lawall <julia.lawall@lip6.fr> The dca_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Dan Williams Signed-off-by: Vinod Koul — drivers/dca/dca-core.c | 3 ++- drivers/dma/ioat/dca.c | 2 +- include/linux/dca.h | 5 +++– 3 files changed, 6 insertions(+), 4 deletions(-) diff –git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c …
Nov 13 2015
[media] radio-shark2: constify radio_tea5777_ops structures
Author: Julia Lawall <Julia.Lawall@lip6.fr> The radio_tea5777_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/radio/radio-shark2.c | 2 +- drivers/media/radio/radio-tea5777.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff –git a/drivers/media/radio/radio-shark2.c b/drivers/media/radio/radio-shark2.c index 8654e0d..0e65a85 100644 …
Nov 13 2015
[media] media: videobuf2: fix compare_const_fl.cocci warnings
Author: Julia Lawall <Julia.Lawall@lip6.fr> Move constants to the right of binary operators. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Junghak Sung Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/v4l2-core/videobuf2-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index 502984c..2d1e5b7 100644 — a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c …
Nov 12 2015
drm/amd/powerplay: fix boolreturn.cocci warnings
Author: kbuild test robot <fengguang.wu@intel.com> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2653:9-10: WARNING: return of 0/1 in function ‘is_pcie_gen2_supported’ with return type bool drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2645:9-10: WARNING: return of 0/1 in function ‘is_pcie_gen3_supported’ with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: yanyang1 Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher — drivers/gpu/drm/amd/include/amd_pcie_helpers.h | …
Nov 11 2015
ASoC: Intel: constify sst_block_ops structures
Author: Julia Lawall <Julia.Lawall@lip6.fr> The sst_block_ops structure is never modified, and is thus declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Jie Yang Signed-off-by: Mark Brown — sound/soc/intel/common/sst-dsp-priv.h | 6 +++— sound/soc/intel/common/sst-firmware.c | 4 ++– sound/soc/intel/haswell/sst-haswell-dsp.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff –git a/sound/soc/intel/common/sst-dsp-priv.h …
Nov 09 2015
btrfs: fix signed overflows in btrfs_sync_file
Author: David Sterba <dsterba@suse.com> The calculation of range length in btrfs_sync_file leads to signed overflow. This was caught by PaX gcc SIZE_OVERFLOW plugin. https://forums.grsecurity.net/viewtopic.php?f=1&t=4284 The fsync call passes 0 and LLONG_MAX, the range length does not fit to loff_t and overflows, but the value is converted to u64 so it silently works as expected. The …