File size after:
text data bss dec hex filename
2129 1352 03481 d99 drivers/atm/adummy.o
This change was made with the help of Coccinelle.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/atm/adummy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
File size after:
text data bss dec hex filename
3593228232 832 64996fde4 drivers/atm/solos-pci.o
This change was made with the help of Coccinelle.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/atm/solos-pci.c | 4 ++--
1 file changed, 2 insertions(+), 2
The variable `err` is not used anywhere and just returns the
predefined value `0` at the end of the function. Hence, remove the
variable and return 0 explicitly.
Signed-off-by: Amitoj Kaur Chawla
---
net/sunrpc/clnt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net
n = f;
|
-init_timer(&t);
+setup_timer(&t,f,d);
|
-init_timer_on_stack(&t);
+setup_timer_on_stack(&t,f,d);
)
<... when != S1
t.x1 = e1;
...>
Signed-off-by: Amitoj Kaur Chawla
---
drivers/atm/horizon.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/
pci_free_consistent's argument 'struct pci_dev' should be NULL not 0.
The Coccinelle semantic patch used to make this change is as follows:
@@
@@
pci_free_consistent(
- 0
+ NULL
, ...)
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/tundra/tsi108_eth.c | 3 ++-
1
Drop redundant include of moduleparam.h
The Coccinelle semantic patch used to make this change is as follows:
@ includesmodule @
@@
#include
@ depends on includesmodule @
@@
- #include
Signed-off-by: Amitoj Kaur Chawla
---
net/caif/chnl_net.c | 1 -
1 file changed, 1 deletion(-)
diff
Remove redundant call to memset before a call to memcpy.
The Coccinelle semantic patch used to make this change is as follows:
@@
expression e1,e2,e3,e4;
@@
- memset(e1,e2,e3);
memcpy(e1,e4,e3);
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 1 -
1 file
- memcpy(to, from, size);
Signed-off-by: Amitoj Kaur Chawla
---
net/tipc/server.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/tipc/server.c b/net/tipc/server.c
index 2446bfb..38a6f33 100644
--- a/net/tipc/server.c
+++ b/net/tipc/server.c
@@ -411,13 +411,12 @@ static
: Amitoj Kaur Chawla
---
drivers/net/ethernet/cavium/liquidio/octeon_device.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.c
b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
index f67641a..2bf90c1 100644
--- a
alloc_ordered_workqueue.
WQ_MEM_RECLAIM flag has been set since ethernet devices seem to sit in
memory reclaim path, so to guarantee forward progress regardless of
memory pressure.
Signed-off-by: Amitoj Kaur Chawla
Acked-by: Tejun Heo
---
Not sure if the assumption of requiring ordering of work items
is required.
WQ_MEM_RECLAIM flag has been set here to ensure forward progress
regardless of memory pressure.
The order of execution is not important so set @max_active as 0.
Signed-off-by: Amitoj Kaur Chawla
Acked-by: Tejun Heo
---
drivers/net/can/spi/mcp251x.c | 3 ++-
1 file changed
On Wed, Mar 2, 2016 at 3:51 AM, David Miller wrote:
> From: Amitoj Kaur Chawla
> Date: Sat, 27 Feb 2016 22:34:16 +0530
>
>> @@ -835,23 +835,20 @@ static int lmc_init_one(struct pci_dev *pdev, const
>> struct pci_device_id *ent)
>> err = pci_request_regions(pde
On Sun, Feb 28, 2016 at 1:23 PM, Stafford Horne wrote:
>
>
> On Sun, 28 Feb 2016, Amitoj Kaur Chawla wrote:
>
>> On Sun, Feb 28, 2016 at 12:18 AM, Stafford Horne wrote:
>> >
>> >
>> > On Thu, 25 Feb 2016, David Miller wrote:
>> >
>> >
On Sun, Feb 28, 2016 at 12:18 AM, Stafford Horne wrote:
>
>
> On Thu, 25 Feb 2016, David Miller wrote:
>
>> From: Amitoj Kaur Chawla
>> Date: Wed, 24 Feb 2016 19:28:19 +0530
>>
>>> Convert a call to init_timer and accompanying intializations of
>>>
.
Also, `sc` was only being freed in the probe function and not the
remove function before the change. By using devm_kzalloc this patch
also fixes this memory leak.
Signed-off-by: Amitoj Kaur Chawla
---
I was not able to find anywhere that `sc` might be freed. However,
if a free has been overlooked
Introduce the use of kobj_to_dev() helper function instead of open
coding it with container_of()
The Coccinelle semantic patch used to make this change is as follows:
//
@@
expression a;
symbol kobj;
@@
- container_of(a, struct device, kobj)
+ kobj_to_dev(a)
//
Signed-off-by: Amitoj Kaur Chawla
;
-t.function = f;
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/3com/3c59x.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/3com/3c59x.c
b/drivers/net/ethernet/3com/3c59x.c
index 79e1a02..c377607 100644
--- a/drivers/net/
.function = f;
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/nvidia/forcedeth.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c
b/drivers/net/ethernet/nvidia/forcedeth.c
index 75e88f4..9b0d7f4 100644
--- a/drivers
.function = f;
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/dec/tulip/tulip_core.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c
b/drivers/net/ethernet/dec/tulip/tulip_core.c
index b553409..94d0eeb
On Fri, Feb 19, 2016 at 5:05 PM, Thadeu Lima de Souza Cascardo
wrote:
> NACK.
>
> ehea does not use platform_driver_register, it uses
> ibmebus_register_driver, which does not set owner.
>
> Cascardo.
Thanks for the feedback. I'll make sure to check for this in the future.
Amitoj
platform_driver does not need to set an owner, it will be populated by
the driver core.
Generated-by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers
ould be written "!lp"
Signed-off-by: Amitoj Kaur Chawla
---
Changes in v2:
-Modified commit message to properly describe the change.
drivers/net/ethernet/amd/lance.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amd/lance.c b/dr
On Wed, Feb 17, 2016 at 7:46 PM, Sergei Shtylyov
wrote:
> Hello.
>
> On 2/17/2016 4:35 PM, Amitoj Kaur Chawla wrote:
>
>> The return value of kzalloc on failure should be -ENOMEM and
>
>
>kzalloc() returns NULL on failure! You need to clarify your patch
> desc
en "!lp"
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/amd/lance.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amd/lance.c b/drivers/net/ethernet/amd/lance.c
index 256f590..3a7ebfd 100644
--- a/drivers/net/ethernet/amd/lance.c
-off-by: Amitoj Kaur Chawla
---
drivers/net/wireless/marvell/mwifiex/11h.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/11h.c
b/drivers/net/wireless/marvell/mwifiex/11h.c
index 71a1b58..81c60d0 100644
--- a/drivers/net/wireless
. We only
need to find elapsed microseconds rather than absolute time, so it's
better to use monotonic time, so using ktime_get_ts64() makes the code
more efficient and more robust against concurrent settimeofday()
calls.
Signed-off-by: Amitoj Kaur Chawla
Reviewed-by: Arnd Bergmann
---
dr
This change has been made with the goal that kernel functions should
return something more descriptive than -1 on failure.
A variable `err` has been introduced for storing error codes.
The return value of kzalloc on failure should return a -1 and not a
-ENOMEM. This was found using Coccinelle. A
that the return value is not 0,
hence no change is required at the call site.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/bonding/bond_alb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index bb9e9fc
The return value of vmalloc on failure of allocation of memory should
be -ENOMEM and not -1.
Found using Coccinelle. A simplified version of the semantic patch
used is:
//
@@
expression *e;
identifier l1;
position p,q;
@@
e@q = vmalloc(...);
if@p (e == NULL) {
...
goto l1;
}
l1:
...
return -1
+
+ -ENOMEM
;
}
//
The two call sites only check that the return value is not 0,
hence no change is required at the call sites.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/ibm/ibmveth.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ibm
may also return -1 after calling mpp2_prs_tcam_port_map_get.
So that the function consistently returns meaningful error values on
failure, the -1 is changed to -EINVAL.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/net/ethernet/marvell/mvpp2.c | 4 ++--
1 file changed, 2 insertions(+), 2
Remove unnecassary casts in the argument to kfree.
Found using Coccinelle. The semantic patch used to find this is as follows:
//
@@
type T;
expression *f;
@@
- kfree((T *)(f));
+ kfree(f);
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/isdn/hisax/fsm.c | 2 +-
drivers/isdn/mISDN/fsm.c | 2
32 matches
Mail list logo