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(-)
_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
_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
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
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
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
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
(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_
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(+
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
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
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
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
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
:
@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
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
:
@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
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
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
:
@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
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
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
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
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
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
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(
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
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(
:
@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
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
;
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
:
@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
:
@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
:
@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
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
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
:
@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
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
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
-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
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
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
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
@@
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
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.
{ ... }
-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
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
;
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
;
@@
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
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
{ ... }
-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
(...)
...
*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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
.
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
. 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
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
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
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
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
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
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
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
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
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
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
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
= \(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(-)
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(-)
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
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
;
@@
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
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
;
@@
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
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
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
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
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
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
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
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 +-
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
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
\|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
=
\(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
\|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
\|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
\|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 - 100 of 250 matches
Mail list logo