Category: Linux

Staging: lustre: libcfs: Prefer using the BIT macro

Author: Shraddha Barke <shraddha.6596@gmail.com> This patch replaces bit shifting on 1 with the BIT(x) macro This was done with coccinelle: @@ int g; @@ -(1

Staging: iio: meter: Prefer using the BIT macro

Author: Shraddha Barke <shraddha.6596@gmail.com> This patch replaces bit shifting on 1 with the BIT(x) macro This was done with coccinelle: @@ int g; @@ -(1

Staging: iio: meter: Prefer using the BIT macro

Author: Shraddha Barke <shraddha.6596@gmail.com> This patch replaces bit shifting on 1 with the BIT(x) macro This was done with coccinelle: @@ int g; @@ -(1

Staging: iio: addac: Prefer using the BIT macro

Author: Shraddha Barke <shraddha.6596@gmail.com> This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ int g; @@ -(1

Staging: iio: addac: Prefer using the BIT macro

Author: Shraddha Barke <shraddha.6596@gmail.com> This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ int g; @@ -(1

ipv6: fix ifnullfree.cocci warnings

Author: Wu Fengguang <fengguang.wu@intel.com> net/ipv6/route.c:2946:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning “kfree(NULL) is safe this check is probably not required” and kfreeaddr.cocci by …

Continue reading

lib/decompress_unlzma: Do a NULL check for pointer

Author: Fabio Estevam <fabio.estevam@freescale.com> Compare pointer-typed values to NULL rather than 0. The semantic patch that makes this change is available in scripts/coccinelle/null/badzero.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — lib/decompress_unlzma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c index decb646..ed7a1fd 100644 — a/lib/decompress_unlzma.c +++ …

Continue reading

mm: add support for __GFP_ZERO flag to dma_pool_alloc()

Author: Sean O. Stalley <sean.stalley@intel.com> Currently a call to dma_pool_alloc() with a ___GFP_ZERO flag returns a non-zeroed memory region. This patchset adds support for the __GFP_ZERO flag to dma_pool_alloc(), adds 2 wrapper functions for allocing zeroed memory from a pool, and provides a coccinelle script for finding & replacing instances of dma_pool_alloc() followed by memset(0) …

Continue reading

drm/i915: Always call the adjusted mode ‘adjusted_mode’

Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Always name any variable pointing at the adjusted mode as ‘adjustead_mode’. This will make it much easier to identify when we should use the crtc_ timings and when we shoudln’t. Conversion was performed with coccinelle: @@ expression E; identifier I; @@ – struct drm_display_mode *I = &E.adjusted_mode; + struct drm_display_mode *adjusted_mode …

Continue reading

Staging: rtl8192e: rtl_wx.c: Remove braces for single statement blocks

Author: Shraddha Barke <shraddha.6596@gmail.com> The linux kernel coding style discourages use of braces for single statement blocks. This patch removes the unnecessary braces. The warning was detected using checkpatch.pl. Coccinelle was used to make the change. Signed-off-by: Shraddha Barke Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   …

Continue reading