[PATCH] usb: gadget: udc: use USB API functions rather than constants

2014-08-23 Thread Himangi Saraogi
num(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/gadget/udc/r8a66597-udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH] af_decnet: Use time_after_eq

2014-08-20 Thread Himangi Saraogi
_eq(jiffies, E1+E2*E3) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/decnet/af_decnet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index ae011b4..25733d5 100644 --- a/net/decnet/af_decnet.c +++ b/net/dec

[PATCH] decnet: Use time_after_eq

2014-08-20 Thread Himangi Saraogi
_eq(jiffies, E1+E2) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/decnet/dn_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/decnet/dn_timer.c b/net/decnet/dn_timer.c index d9c150c..1d330fd 100644 --- a/net/decnet/dn_timer.c +++ b/net/decnet/dn_time

[PATCH] ipconfig: Use time_before

2014-08-20 Thread Himangi Saraogi
E1+E2) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/ipv4/ipconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 5bbef4f..648fa14 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -262,7 +26

[PATCH] dn_dev: Use time_before

2014-08-20 Thread Himangi Saraogi
ore(jiffies, E1+E2) ) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/decnet/dn_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 3b726f3..4400da7 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -4

[PATCH] isdn/bas_gigaset: use USB API functions rather than constants

2014-08-16 Thread Himangi Saraogi
This patch introduces the use of the function usb_endpoint_num. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Himangi

[PATCH] isdn/gigaset: use USB API functions rather than constants

2014-08-15 Thread Himangi Saraogi
This patch introduces the use of the function usb_endpoint_num. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Himangi

[PATCH] orinoco_usb: use USB API functions rather than constants

2014-08-15 Thread Himangi Saraogi
(epd) && usb_endpoint_dir_out(epd)) + usb_endpoint_is_bulk_out(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/wireless/orinoco/orinoco_usb.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/orinoco/orinoco_

[PATCH] rc-core: use USB API functions rather than constants

2014-08-15 Thread Himangi Saraogi
struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) != - \(USB_ENDPOINT_XFER_INT\|3\)) + !usb_endpoint_xfer_int(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/media/rc/streamzap.c | 6 ++ 1 file changed, 2 insertions(+

[PATCH] radio-si470x-usb: use USB API functions rather than constants

2014-08-15 Thread Himangi Saraogi
usb_endpoint_is_int_in(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/media/radio/si470x/radio-si470x-usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si47

[PATCH] media/rc/imon.c: use USB API functions rather than constants

2014-08-15 Thread Himangi Saraogi
This patch introduces the use of the function usb_endpoint_type. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Himangi

[PATCH] Drivers: ide: Remove typedef atiixp_ide_timing

2014-08-14 Thread Himangi Saraogi
tdres; @@ coccinelle.tdres = td; @@ type tn1.td; identifier tf.tdres; @@ -typedef struct + tdres { ... } -td ; @@ type tn1.td; identifier tf.tdres; @@ -td + struct tdres Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/ide/atiixp.c | 8 1 file changed, 4 inse

[PATCH] Bluetooth: bluecard_cs.c: Remove typedef bluecard_info_t

2014-08-13 Thread Himangi Saraogi
case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/bluetooth/bluecard_cs.c | 35 ++- 1 file changed, 18 insertions(+), 17

[PATCH] bluetooth/dtl1_cs: Remove typedefs nsh_t and dtl1_info_t

2014-08-13 Thread Himangi Saraogi
the case for dtl1_info_t and a similar patch finds the nsh_t case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/bluetooth/dtl1_cs.c | 36

[PATCH] bluetooth/btuart_cs: Remove typedef btuart_info_t

2014-08-13 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/bluetooth/btuart_cs.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions

[PATCH] IB/qib: Drop unnecessary continue

2014-08-13 Thread Himangi Saraogi
Continue is not needed at the bottom of a loop. The Coccinelle semantic patch implementing this change is: @@ @@ for (...;...;...) { ... if (...) { ... - continue; } } Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/infiniband/hw/qib/qib_init.c | 4 +--- 1 file

[PATCH] drivers/bluetooth: Remove typedef bt3c_info_t

2014-08-13 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/bluetooth/bt3c_cs.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff

[PATCH] powerpc/pseries: Drop unnecessary continue

2014-08-13 Thread Himangi Saraogi
Continue is not needed at the bottom of a loop. The Coccinelle semantic patch implementing this change is: @@ @@ for (...;...;...) { ... if (...) { ... - continue; } } Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- Not compile tested. arch/powerpc/platforms/pseries

[PATCH] ARM: integrator: Drop unnecessary continue

2014-08-13 Thread Himangi Saraogi
Continue is not needed at the bottom of a loop. The Coccinelle semantic patch implementing this change is: @@ @@ for (...;...;...) { ... if (...) { ... - continue; } } Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/arm/mach-integrator/impd1.c | 4 +--- 1 file

[PATCH] drivers/net/wireless: Remove typedef local_info_t

2014-08-13 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/wireless/atmel_cs.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff

[PATCH] net/udp_offload: Drop unnecessary continue

2014-08-13 Thread Himangi Saraogi
Continue is not needed at the bottom of a loop. The Coccinelle semantic patch implementing this change is: @@ @@ for (...;...;...) { ... if (...) { ... - continue; } } Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/ipv4/udp_offload.c | 4 +--- 1 file changed, 1

[PATCH] rtlwifi: btcoexist: adjust double test

2014-08-12 Thread Himangi Saraogi
Rewrite a duplicated test to test the correct value The Coccinelle semantic patch that finds this problem is: // @@ expression E; @@ ( * E || ... || E | * E && ... && E ) // Signed-off-by: Himangi Saraogi --- In file drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.c, th

[PATCH] NFC: st21nfcb: drop kfree of devm_kzalloc's data

2014-08-10 Thread Himangi Saraogi
Using kfree to free data allocated with devm_kzalloc causes double frees. The Coccinelle semantic patch that fixes this problem is as follows: // @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/nfc/st21nfcb

[PATCH] usb: phy: drop kfree of devm_kzalloc's data

2014-08-10 Thread Himangi Saraogi
Using kfree to free data allocated with devm_kzalloc causes double frees. The Coccinelle semantic patch that fixes this problem is as follows: // @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/phy/phy-gpio

[PATCH] drivers: net: davinci_cpdma: drop devm_kfree of devm_kzalloc'd data

2014-08-10 Thread Himangi Saraogi
devm_kfree should not have to be explicitly used. The Coccinelle semantic patch that fixes this problem is as follows: // @@ expression x,d; @@ x = devm_kzalloc(...) ... ?-devm_kfree(d,x); // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/ti/davinci_cpdma.c

[PATCH] wan: wanxl: Remove typedefs from struct names

2014-08-10 Thread Himangi Saraogi
tifier tf.tdres; @@ -td + struct tdres Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- To send to: Krzysztof Halasa ,net...@vger.kernel.org,linux-kernel@vger.kernel.org drivers/net/wan/wanxl.c | 63 + 1 file changed, 32 insertions(

[PATCH] clk: st: remove null pointer dereference

2014-08-09 Thread Himangi Saraogi
points to err0. This problem was found using the following Coccinelle semantic match: // @@ expression E, E1; identifier f; statement S1,S2,S3; @@ * if (E == NULL) { ... when != if (E == NULL) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // Signed-off-by: Hima

[PATCH] hdlc: Remove typedefs from struct names

2014-08-09 Thread Himangi Saraogi
tifier tf.tdres; @@ -td + struct tdres Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- To send to: Krzysztof Halasa ,net...@vger.kernel.org,linux-kernel@vger.kernel.org drivers/net/wan/hdlc_fr.c | 63 --- 1 file changed, 32 insertions(

[PATCH] airo_cs: Remove typedef local_info_t

2014-08-09 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/wireless/airo_cs.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff

[PATCH] mfd: menelaus: remove null pointer dereference

2014-08-09 Thread Himangi Saraogi
problem was found using the following Coccinelle semantic match: // @@ expression E, E1; identifier f; statement S1,S2,S3; @@ * if (E == NULL) { ... when != if (E == NULL) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // Signed-off-by: Himangi Saraogi Acked

[PATCH] atmel: Remove typedef atmel_priv_ioctl

2014-08-09 Thread Himangi Saraogi
; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/wireless/atmel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 1fe41af..9183f1c 100644 --- a/drivers

[PATCH] com20020_cs: Remove typedef com20020_dev_t

2014-08-09 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- To send to: net...@vger.kernel.org,linux-kernel@vger.kernel.org drivers/net/arcnet/com20020_cs.c | 16

[PATCH] ethernet: amd: Remove typedef local_info_t

2014-08-09 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/xircom/xirc2ps_cs.c | 40 1 file changed, 20 insertions(+), 20

[PATCH] drivers/net: Remove typedef axnet_dev_t

2014-08-07 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/8390/axnet_cs.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions

[PATCH] drivers/net: Remove typedefs pcnet_dev_t and hw_info_t

2014-08-07 Thread Himangi Saraogi
detects the cases: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/8390/pcnet_cs.c | 68 ++-- 1 file changed, 34

[PATCH] drivers/net: ethernet: Remove typedef for struct and enum

2014-08-07 Thread Himangi Saraogi
Coccinelle semantic patch detects the case for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 34

[PATCH] dm9000: Remove typedef board_info_t

2014-08-07 Thread Himangi Saraogi
: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/davicom/dm9000.c | 92 +-- 1 file changed, 46 insertions(+), 46

[PATCH] pcie-gadget-spear: use devm_ functions

2014-08-07 Thread Himangi Saraogi
to make sure the devm_*() routine declarations are unambiguously available. The initial call to platform_get_resource is moved down to the introduced call to devm_ioremap_resource that uses its result. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- Not compile tested due to

[PATCH] wireless: wlcore: Use devm_kzalloc

2014-08-07 Thread Himangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a couple of labels and the initial assignment of the ret variable in the probe function are removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net

[PATCH] pcmcia/vrc4171: Remove typedefs for enums and struct

2014-08-06 Thread Himangi Saraogi
-like. The following Coccinelle semantic patch detects the cases for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/pcmcia/vrc4171_card.c | 30

[PATCH] xfs: Remove typedef xfs_uu_t

2014-08-06 Thread Himangi Saraogi
Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- fs/xfs/uuid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfs/uuid.c b/fs/xfs/uuid.c index b83f76b..1f21d8f 100644 --- a/fs/xfs/uuid.c +++ b/fs/xfs/uuid.c @@ -18,13 +18,13 @@ #include /* IRIX interpre

[PATCH] pcmcia: Remove typedef in structs and emum

2014-08-06 Thread Himangi Saraogi
Coccinelle semantic patch detects the cases for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/pcmcia/i82365.c | 36

[PATCH] nfs: Remove typedef nfs_readdir_descriptor_t

2014-08-06 Thread Himangi Saraogi
struct tdres ) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- fs/nfs/dir.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 7e17687..ba5bb19 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@

[PATCH] x86: mtrr/cyrix.c : Remove typedef arr_state_t

2014-08-06 Thread Himangi Saraogi
Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/x86/kernel/cpu/mtrr/cyrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c index 9e451b0..5e8d57d 100644 --- a/arch/x86/kernel/cpu/mtrr/c

[PATCH] fs/befs/btree.c: Remove typedef befs_btree_node

2014-08-06 Thread Himangi Saraogi
tdres; @@ coccinelle.tdres = td; @@ type tn1.td; identifier tf.tdres; @@ -typedef struct + tdres { ... } -td ; @@ type tn1.td; identifier tf.tdres; @@ -td + struct tdres Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- fs/befs/btree.

[PATCH] sound: oss: Remove typedefs wanc_info and wavnc_port_info

2014-08-06 Thread Himangi Saraogi
{ ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- sound/oss/waveartist.c | 157 - 1 file changed, 89 insertions(+), 68 deletions(-) diff --git a/sound/oss/waveartist.c b/sound/oss

[PATCH] sound: oss: uart401: Remove typedef uart401_devc

2014-08-06 Thread Himangi Saraogi
tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- sound/oss/uart401.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/sound/oss/uart401.c b/sound/oss/uart401.c index 62b8869..279bc56 100644 --- a/sound

[PATCH] pcmcia: Remove typedef tuple_flags

2014-08-06 Thread Himangi Saraogi
; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/pcmcia/cistpl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 884a984..0a4c165 100644 --- a/drivers/pcmcia

[PATCH] sound/oss/pss: Remove typedefs pss_mixerdata and pss_confdata

2014-08-05 Thread Himangi Saraogi
; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- sound/oss/pss.c | 46 -- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/sound/oss/pss.c b/sound/oss/pss.c index 145e36b

[PATCH] sound/oss/opl3: Remove typedef opl_devinfo

2014-08-05 Thread Himangi Saraogi
This typedef is unnecessary and should just be removed as they are never used. The following Coccinelle semantic patch detects the case. @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by

[PATCH] netfilter: h323: Remove typedefs from structs

2014-08-05 Thread Himangi Saraogi
{ ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- net/netfilter/nf_conntrack_h323_asn1.c | 110 +- net/netfilter/nf_conntrack_h323_types.c | 346 2 files changed, 234 insertions

[PATCH] mtd: fsl_ifc_nand: use devm_ functions consistently

2014-08-03 Thread Himangi Saraogi
(...) ... *kzalloc(...) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- Not compile tested. drivers/mtd/nand/fsl_ifc_nand.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 2338124

[PATCH] cpufreq: integrator: Use set_cpus_allowed_ptr

2014-08-03 Thread Himangi Saraogi
mp;I) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/cpufreq/integrator-cpufreq.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c index e5122f1..c132052 100644 --- a/dri

[PATCH] staging: iio: ad9951: Use devm_iio_device_register

2014-08-03 Thread Himangi Saraogi
This patch introduces the use of devm_iio_device_register and does away with the unregister in the remove function. The remove function is no longer required and is completely removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/staging/iio/frequency/ad9951.c | 10

[PATCH] staging:iio:ad9852: Use devm_iio_device_register

2014-08-03 Thread Himangi Saraogi
This patch introduces the use of devm_iio_device_register and does away with the unregister in the remove function. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/staging/iio/frequency/ad9852.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a

[PATCH] staging: iio: ad9832: Use devm_iio_device_register

2014-08-03 Thread Himangi Saraogi
This patch introduces the use of devm_iio_device_register and does away with the unregister in the remove function. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/staging/iio/frequency/ad9832.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH v2] net: phy: spi_ks8995: Introduce the use of devm_kzalloc

2014-08-03 Thread Himangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a label is removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- v2: adding net...@vger.kernel.org drivers/net/phy/spi_ks8995.c | 26 -- 1

[PATCH] HID: hid-sensor-hub: use devm_ functions consistently

2014-08-02 Thread Himangi Saraogi
inconsistency is as follows: // @@ @@ *devm_kzalloc(...) ... *kzalloc(...) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/hid/hid-sensor-hub.c | 33 +++-- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/drivers/hid/hid-sensor-hub.c b

[PATCH] net: phy: spi_ks8995: Introduce the use of devm_kzalloc

2014-08-02 Thread Himangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a label is removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/phy/spi_ks8995.c | 26 -- 1 file changed, 8 insertions(+), 18

[PATCH] cw1200: Introduce the use of devm_kzalloc

2014-08-02 Thread Himangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/wireless/cw1200/cw1200_spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net

[PATCH] can: mcp251x: Use dmam_alloc_coherent

2014-08-02 Thread Himangi Saraogi
This patch moves the data allocated using dma_alloc_coherent to the corresponding managed interface and does away with the calls to free the allocated memory in the probe and remove functions. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/can/spi/mcp251x.c | 16

[PATCH] net: wireless: wl1251: Remove unnecessary free_irq

2014-08-02 Thread Himangi Saraogi
This patch does away with free_irq in the remove function as the irq is allocated with a devm_request_irq. Signed-off-by: Himangi Saraogi --- I'm not sure that devm_request_irq should be used in the first place, as it will move the stopping of the interrupt over wl1251_free_hw. Should

[PATCH v3] EEPROM: Introduce the use of devm_kzalloc

2014-08-01 Thread Himangi Saraogi
. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- v3: change headers included. drivers/misc/eeprom/eeprom.c | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c index 33f8673..b432873 100644

[PATCH] ath6kl: convert a driver to use module_usb_driver()

2014-08-01 Thread Himangi Saraogi
This converts a driver in drivers/net/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/wireless/ath/ath6kl/usb.c | 21 + 1 file changed, 1 insertion(+), 20 deletions

[PATCH] drivers/net: Use managed interfaces

2014-08-01 Thread Himangi Saraogi
function. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/dnet.c | 46 - 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c index e9b0fab..a379c3e

[PATCH] net: ks8851-ml: Use devm_ioremap_resource

2014-08-01 Thread Himangi Saraogi
the remove function. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/micrel/ks8851_mll.c | 59 1 file changed, 21 insertions(+), 38 deletions(-) diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel

[PATCH] cirrus: cs89x0: Use managed interfaces

2014-08-01 Thread Himangi Saraogi
. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/net/ethernet/cirrus/cs89x0.c | 32 +++- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/cirrus/cs89x0.c b/drivers/net/ethernet/cirrus/cs89x0.c index fe84fba..9823a0e

[PATCH] netdev: octeon_mgmt: Use devm_ioremap_resource

2014-07-31 Thread Himangi Saraogi
. Also, error handling is added on the values returned by devm_ioremap_resource. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- Not compile tested. drivers/net/ethernet/octeon/octeon_mgmt.c | 64 +++ 1 file changed, 13 insertions(+), 51 deletions(-) diff --git

[PATCH] svcrdma: delete double assignment

2014-07-28 Thread Himangi Saraogi
Delete successive assignments to the same location. A simplified version of Coccinelle semantic match that finds this problem is as follows: // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Himangi Saraogi --- Should the assignment be the maximum of the 2 values? net/sunrpc

[PATCH] net: irda: delete double assignment

2014-07-28 Thread Himangi Saraogi
Delete successive assignments to the same location. A simplified version of Coccinelle semantic match that finds this problem is as follows: // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Himangi Saraogi --- Should the second assignment have been |=? net/irda/irlap_frame.c

[PATCH] ocfs2: delete double assignment

2014-07-28 Thread Himangi Saraogi
Delete successive assignments to the same location. The two assignments are simply identical. A simplified version of Coccinelle semantic match that finds this problem is as follows: // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Himangi Saraogi --- Should the fist assignment

[PATCH] afs: delete double assignment

2014-07-28 Thread Himangi Saraogi
A simplified version of Coccinelle semantic match that finds this problem is as follows: // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Himangi Saraogi --- Should the second assignment is each case be a |= ? fs/afs/main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a

[PATCH] net/udp_offload: Use IS_ERR_OR_NULL

2014-07-27 Thread Himangi Saraogi
This patch introduces the use of the macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The following Coccinelle semantic patch was used for making the change: @@ expression e; @@ - e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) || ... Signed-off-by: Himangi Saraogi Acked-by: Julia

[PATCH] openvswitch: Use IS_ERR_OR_NULL

2014-07-27 Thread Himangi Saraogi
This patch introduces the use of the macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The following Coccinelle semantic patch was used for making the change: @@ expression e; @@ - e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) || ... Signed-off-by: Himangi Saraogi Acked-by: Julia

[PATCH] net/ipv4: Use IS_ERR_OR_NULL

2014-07-27 Thread Himangi Saraogi
This patch introduces the use of the macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The following Coccinelle semantic patch was used for making the change: @@ expression e; @@ - e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) || ... Signed-off-by: Himangi Saraogi Acked-by: Julia

[PATCH] net_sched: remove exceptional & on function name

2014-07-24 Thread Himangi Saraogi
In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: Himangi Saraogi Acked-b

[PATCH] neigh: remove exceptional & on function name

2014-07-24 Thread Himangi Saraogi
In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: Himangi Saraogi Acked-b

[PATCH] igmp: remove exceptional & on function name

2014-07-24 Thread Himangi Saraogi
In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: Himangi Saraogi Acked-b

[PATCH] netfilter: nf_conntrack: remove exceptional & on function name

2014-07-24 Thread Himangi Saraogi
In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: Himangi Saraogi Acked-b

[PATCH] rbd: Use rbd_segment_name_free

2014-07-23 Thread Himangi Saraogi
= \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,...) ... when != x = E when != &x ?-kfree(x) +kmem_cache_free(c,x) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/block/rbd.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[PATCH] isdn: use constants instead of magicnumbers

2014-07-23 Thread Himangi Saraogi
ntifier r.fld; identifier r.c; constant s.C; @@ E->fld & - C + c // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- To send to: Karsten Keil ,net...@vger.kernel.org,linux-kernel@vger.kernel.org drivers/isdn/i4l/isdn_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH] misc: bh1780: Introduce the use of devm_kzalloc

2014-07-23 Thread Himangi Saraogi
required is also done away with. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/misc/bh1780gli.c | 33 + 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c index 48ea33d..4c4a59b 100644

[PATCH v2] EEPROM: Introduce the use of devm_kzalloc

2014-07-23 Thread Himangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a label and the err variable are removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- v2: add missing semi-colon drivers/misc/eeprom/eeprom.c | 21

[PATCH] infsd4: convert comma to semicolon

2014-07-23 Thread Himangi Saraogi
; @@ e1 -, +; e2; // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 564d723..c393d6c 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd

[PATCH] EEPROM: Introduce the use of devm_kzalloc

2014-07-23 Thread Himangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a label and the err variable are removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/misc/eeprom/eeprom.c | 21 + 1 file changed, 5

[PATCH] ceph: convert comma to semicolon

2014-07-23 Thread Himangi Saraogi
; @@ e1 -, +; e2; // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 1fde164..6d1cd45 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -3277,7 +3277,7 @@ int

[PATCH] powerpc/perf/hv-24x7: Use kmem_cache_free

2014-07-22 Thread Himangi Saraogi
mp;x ?-kfree(x) +kmem_cache_free(c,x) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/powerpc/perf/hv-24x7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index 66d0f17..70d4f74 100644 --- a/arch/pow

[PATCH] staging: gdm724x: Use NLMSG_HDRLEN

2014-07-22 Thread Himangi Saraogi
Replace use of NLMSG_SPACE(0) with NLMSG_HDRLEN as they are equivalent and NLMSG_SPACE seems to be deprecated. Signed-off-by: Himangi Saraogi --- To send to: Greg Kroah-Hartman ,de...@driverdev.osuosl.org,linux-kernel@vger.kernel.org drivers/staging/gdm724x/netlink_k.c | 2 +- 1 file changed

[PATCH] rbd: Use kmem_cache_free

2014-07-22 Thread Himangi Saraogi
mp;x ?-kfree(x) +kmem_cache_free(c,x) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index b2c98c1..8381c54 100644 --- a/drivers/block/rbd.c +++ b/dri

[PATCH] misc: bh1770glc: Use managed functions

2014-07-21 Thread Himangi Saraogi
This patch introduces the use of managed interfaces like devm_kzalloc, devm_regulator_bulk_get and does away with the functions to free the allocated memory in the probe and remove functions. Also, some labels are removed and renamed to preserve the ordering. Signed-off-by: Himangi Saraogi Acked

[PATCH] staging: iio: ad5930: Use devm_iio_device_register

2014-07-21 Thread Himangi Saraogi
This patch introduces the use of iio_device_register and does away with the call to the coressponding unregister function in the remove function of the driver. The remove function is no longer required and is completely removed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers

[PATCH] Coccinelle: Script to replace if and BUG with BUG_ON

2014-07-20 Thread Himangi Saraogi
This script detects cases where BUG() follows an if condition on an expression and replaces the if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- scripts/coccinelle/misc/bugon.cocci

[RESEND PATCH] powerpc/mpic_msgr: Use kcalloc and correct the argument to sizeof

2014-07-19 Thread Himangi Saraogi
bit nicer to read. The Coccinelle semantic patch that makes the first change is as follows: // @disable sizeof_type_expr@ type T; T **x; @@ x = <+...sizeof( - T + *x )...+> // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/powerpc/sysdev/mpic_msgr.c | 2 +-

linux-kernel@vger.kernel.org

2014-07-19 Thread Himangi Saraogi
on E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // Signed-off-by: Himangi Saraogi --- This is not tested and clearly changes the semantics, so it is only something to consider. tools/power/cpupower/utils/idle_monitor/mperf_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 del

linux-kernel@vger.kernel.org

2014-07-19 Thread Himangi Saraogi
consider. The Coccinelle semantic patch that makes this change is as follows: // @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // Signed-off-by: Himangi Saraogi --- arch/powerpc/sysdev/fsl_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH] parisc: Eliminate memset after alloc_bootmem_pages

2014-07-19 Thread Himangi Saraogi
\|alloc_bootmem_low_pages\)(...) ... when != E - memset(E,0,E1); Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/parisc/mm/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index ae085ad..0bef864 100644 --- a/arch/parisc/mm/init.c

[PATCH] x86, olpc: Eliminate BUG_ON and memset after alloc_bootmem

2014-07-19 Thread Himangi Saraogi
= \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...) ... when != E - BUG_ON (E == NULL); @@ expression E,E1; @@ E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...) ... when != E - memset(E,0,E1); Signed-off-by: Himangi

[PATCH] mm/m68k: Eliminate memset after alloc_bootmem_pages

2014-07-19 Thread Himangi Saraogi
\|alloc_bootmem_low_pages\)(...) ... when != E - memset(E,0,E1); Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- To send to: Geert Uytterhoeven ,linux-m...@lists.linux-m68k.org,linux-kernel@vger.kernel.org arch/m68k/mm/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/m68k

[PATCH] uml/net_kern: Eliminate NULL test after alloc_bootmem

2014-07-19 Thread Himangi Saraogi
\|alloc_bootmem_low_pages\)(...) ... when != E - if (E == NULL) S Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/um/drivers/net_kern.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 7d26d9c..f70dd54 100644 --- a

[PATCH] uml: Eliminate NULL test after alloc_bootmem

2014-07-19 Thread Himangi Saraogi
\|alloc_bootmem_low_pages\)(...) ... when != E - if (E == NULL) S Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- arch/um/kernel/initrd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c index 55cead8..48bae81 100644 --- a/arch/um/kernel

  1   2   3   >