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
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 <amitoj1...@gmail.com>
---
drivers/isdn/hisax/fsm
Remove an unnecassary cast 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 <amitoj1...@gmail.com>
---
drivers/media/platform/vivid
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 <amitoj1...@gmail.com>
---
drivers/usb/storage/ene_ub6250
Remove an unnecassary cast 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/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
1 file
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
;
expression e,r;
@@
for_each_available_child_of_node(r,n) {
...
(
of_node_put(n);
|
e = n
|
+ of_node_put(n);
? break;
)
...
}
... when != n
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/media/platform/exynos4-is/media-dev.c | 12 +---
1 file changed, 9 insertions(+), 3
;
expression e,r;
@@
for_each_available_child_of_node(r,n) {
...
(
of_node_put(n);
|
e = n
|
+ of_node_put(n);
? break;
)
...
}
... when != n
//
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/media/platform/exynos4-is/media-dev.c | 12 +---
1 file c
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
Remove an unnecassary cast 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 <amitoj1...@gmail.com>
---
drivers/gpu/drm/amd/
for_each_child_of_node performs an of_node_get on each iteration, so
to break out of the loop an of_node_put is required.
Found using Coccinelle. The semantic patch used for this is as follows:
//
@@
expression e;
local idexpression n;
@@
for_each_child_of_node(..., n) {
... when !=
!= of_node_put(n)
when != e = n
(
return n;
|
+ of_node_put(n);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/gpu/host1x/bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
index 4a99c64
!= of_node_put(child)
when != e = child
(
return child;
|
+ of_node_put(child);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/clk/tegra/clk-emc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/tegra/clk-emc.c b
!= of_node_put(n)
when != e = n
(
return n;
|
+ of_node_put(n);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/gpu/host1x/bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/host1x/bus.c b/drive
!= of_node_put(child)
when != e = child
(
return child;
|
+ of_node_put(child);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/clk/tegra/clk-emc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drive
!= of_node_put(n)
when != e = n
(
return n;
+ of_node_put(n);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/bus/vexpress-config.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress
!= of_node_put(n)
when != e = n
(
return n;
+ of_node_put(n);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/bus/vexpress-config.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/vexpress-conf
!= of_node_put(n)
when != e = n
(
return n;
+ of_node_put(n);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla
---
drivers/bus/arm-cci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 577cc4b..011b2f6
!= of_node_put(n)
when != e = n
(
return n;
+ of_node_put(n);
? return ...;
)
...
}
//
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/bus/arm-cci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm
On Tue, Dec 15, 2015 at 7:28 AM, Sanidhya Solanki wrote:
>
> Patch contains the spacing fixes that led to checkpatch.pl warnings.
>
> Signed-off-by: Sanidhya Solanki
> ---
> drivers/staging/dgnc/dgnc_cls.c| 4 +-
> drivers/staging/dgnc/dgnc_driver.h | 8 --
>
On Tue, Dec 15, 2015 at 7:28 AM, Sanidhya Solanki wrote:
>
> Patch contains the spacing fixes that led to checkpatch.pl warnings.
>
> Signed-off-by: Sanidhya Solanki
> ---
> drivers/staging/dgnc/dgnc_cls.c| 4 +-
>
Remove unnecessary variable 'err' from functions c2_reject() and
c2_service_destroy() since it can be replaced by a single line of
code instead.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/rdma/amso1100/c2_provider.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions
This patch moves extern declarations to respective header files.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/lustre/lustre/obdclass/cl_internal.h | 3 +++
drivers
This patch moves extern declarations to respective header files.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/staging/lustre/lustre/ob
Remove unnecessary variable 'err' from functions c2_reject() and
c2_service_destroy() since it can be replaced by a single line of
code instead.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/staging/rdma/amso1100/c2_provider.c | 10 ++
1 file changed, 2 inse
This patch moves extern declarations in socklnd_lib.c to the respective
header file, 'socklnd.h'.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/lustre/lnet/klnds
This patch moves extern declarations in socklnd_lib.c to the respective
header file, 'socklnd.h'.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/s
This patch moves extern declarations to respective header files.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/lustre/lnet/selftest/console.c | 4
drivers
This patch moves extern declarations to respective header files.
This patch also removes extern keyword from function declarations
since functions have the extern specifier by default.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
drivers/staging/lustre/lnet/selftest/con
Remove wrapper function mfree_sta_priv_lock() that can be replaced by a
direct call to mfree_all_stainfo().
Signed-off-by: Amitoj Kaur Chawla
---
Changes in v2:
-Removed trailing whitespace
drivers/staging/rtl8712/rtl871x_sta_mgt.c | 9 ++---
1 file changed, 2 insertions(+), 7
This patch removes the c2_print_macaddr() wrapper function which calls
the pr_debug standard kernel function only.
c2_print_macaddr() has been replaced by directly calling pr_debug().
Signed-off-by: Amitoj Kaur Chawla
---
Changes in v2:
-Removed comment added in previous version
Changes
Remove wrapper function mfree_sta_priv_lock() that can be replaced by a
direct call to mfree_all_stainfo().
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
Changes in v2:
-Removed trailing whitespace
drivers/staging/rtl8712/rtl871x_sta_mgt.c | 9 ++---
1 file c
This patch removes the c2_print_macaddr() wrapper function which calls
the pr_debug standard kernel function only.
c2_print_macaddr() has been replaced by directly calling pr_debug().
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
Changes in v2:
-Removed comment
the format string in pr_info() for now.tv_sec
to incorporate 'long long' on 32 bit architectures.
Signed-off-by: Amitoj Kaur Chawla
---
Changes in v2:
-Removed unnecessary format string change in pr_info()
drivers/char/ipmi/ipmi_ssif.c | 9 +
1 file changed, 5 insertions(+), 4 deletions
the format strings in sprintf() for now.tv_sec
and now.tv_nsec to incorporate 'long long' on 32 bit architectures and
leading zeroes respectively.
Signed-off-by: Amitoj Kaur Chawla
Reviewed-by: Arnd Bergmann
---
Changes in v2:
-change format string of now.tv_sec to '%llu'
-change format
the format string in pr_info() for now.tv_sec
to incorporate 'long long' on 32 bit architectures.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
Changes in v2:
-Removed unnecessary format string change in pr_info()
drivers/char/ipmi/ipmi_ssif.c | 9 +
1 file chan
the format strings in sprintf() for now.tv_sec
and now.tv_nsec to incorporate 'long long' on 32 bit architectures and
leading zeroes respectively.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
Reviewed-by: Arnd Bergmann <a...@arndb.de>
---
Changes in v2:
-change f
also uses ktime_us_delta() to get the elapsed time.
Signed-off-by: Amitoj Kaur Chawla
---
Changes in v2:
-Modified subject of commit message
drivers/ide/pdc202xx_new.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide
also uses ktime_us_delta() to get the elapsed time.
Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com>
---
Changes in v2:
-Modified subject of commit message
drivers/ide/pdc202xx_new.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drive
32 bit systems using 'struct timeval' will break in the year 2038, so
we replace the code appropriately. However, this driver is not broken
in 2038 since we are using only the microseconds portion of the
current time.
This patch replaces timeval with timespec64.
Signed-off-by: Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so
we replace the code appropriately. However, this driver is not broken
in 2038 since we are using only the microseconds portion of the
current time.
This patch replaces timeval with timespec64.
Signed-off-by: Amitoj Kaur Chawla
Used C89 instead of C99 Comments and removed C99 comments performing
prints only.
Problem found using checkpatch.pl
ERROR: do not use C99 // comments
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/sm750fb/ddk750_chip.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions
Used C89 instead of C99 Comments and removed C99 comments performing
prints only.
Problem found using checkpatch.pl
ERROR: do not use C99 // comments
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/sm750fb/ddk750_chip.c | 10 ++
1 file changed, 2 insertions
Fixed error by removing space after open parenthesis '('
Problem found using checkpatch.pl
ERROR: space prohibited after that open parenthesis '('
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/sm750fb/ddk750_chip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
Fixed error by removing space after open parenthesis '('
Problem found using checkpatch.pl
ERROR: space prohibited after that open parenthesis '('
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/sm750fb/ddk750_chip.c | 4 ++--
1 file changed, 2 insertions(+), 2
ession e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
<<
-c)
+c
,...);
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/sm750fb/sm750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
inde
f;
constant c;
@@
e1 = f(...,
-(e
+e
-c)
+c
,...);
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/sm750fb/sm750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 4074375
On Fri, Apr 3, 2015 at 10:21 PM, Dan Carpenter wrote:
>
> On Fri, Apr 03, 2015 at 10:12:11PM +0530, Amitoj Kaur Chawla wrote:
> > Removes variable comparison with 0 by using !.
>
> Sometimes testing for zero makes sense. When you write code, you are
> telling a story. If
ion *E;
@@
(
E ==
- 0
+ NULL
|
E !=
- 0
+ NULL
|
- 0
+ NULL
== E
|
- 0
+ NULL
!= E
)
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/rtl8188eu/hal/odm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/odm.c
b/drivers/staging/rtl
On Fri, Apr 3, 2015 at 10:21 PM, Dan Carpenter dan.carpen...@oracle.com wrote:
On Fri, Apr 03, 2015 at 10:12:11PM +0530, Amitoj Kaur Chawla wrote:
Removes variable comparison with 0 by using !.
Sometimes testing for zero makes sense. When you write code, you are
telling a story. If you
;
@@
(
E ==
- 0
+ NULL
|
E !=
- 0
+ NULL
|
- 0
+ NULL
== E
|
- 0
+ NULL
!= E
)
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/rtl8188eu/hal/odm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/odm.c
b/drivers
Fix the spacing problems with correct indentation and correct use of
braces and spacing in switch-case statements.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/sm750fb/ddk750_chip.c | 63 +--
1 file changed, 31 insertions(+), 32 deletions(-)
diff --git
The edits have been made to fix C99 Comment and properly indent
the if-else statements with the braces.
Also, to use tabs instead of spaces.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/sm750fb/ddk750_chip.c | 35 ++-
1 file changed, 14 insertions
The edits have been made to fix C99 Comment and properly indent
the if-else statements with the braces.
Also, to use tabs instead of spaces.
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/sm750fb/ddk750_chip.c | 35 ++-
1 file changed
Fix the spacing problems with correct indentation and correct use of
braces and spacing in switch-case statements.
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/sm750fb/ddk750_chip.c | 63 +--
1 file changed, 31 insertions(+), 32
The edits have been made to add a space before the comment and the errors in
braces in the if-else statements.
Previously in commit 2d34f53f1065878cd881ac61a183f8e836583d51, removed
the C99 comments and errors in if-else indentation and braces.
Signed-off-by: Amitoj Kaur Chawla
---
drivers
The edits have been made to remove C99 Comments and properly indent
the if-else statements in the file while taking care of the braces according to
Linux coding style.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/sm750fb/ddk750_chip.c | 25 +++--
1 file changed, 11
The edits have been made to remove C99 Comments and properly indent
the if-else statements in the file while taking care of the braces according to
Linux coding style.
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/sm750fb/ddk750_chip.c | 25
The edits have been made to add a space before the comment and the errors in
braces in the if-else statements.
Previously in commit 2d34f53f1065878cd881ac61a183f8e836583d51, removed
the C99 comments and errors in if-else indentation and braces.
Signed-off-by: Amitoj Kaur Chawla amitoj1
This file contained a lot of warnings of line of over 80 characters
and that the code needs to be refactored due to nested if else
conditions.
The file was accordingly edited to remove some of the warnings.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/octeon-usb/octeon-hcd.c | 8
This file contained a warning of a line being over 80 characters and
so the file has been edited to remove that warning.
Signed-off-by: Amitoj Kaur Chawla
---
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon-usb
This file contained a warning of a line being over 80 characters and
so the file has been edited to remove that warning.
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
This file contained a lot of warnings of line of over 80 characters
and that the code needs to be refactored due to nested if else
conditions.
The file was accordingly edited to remove some of the warnings.
Signed-off-by: Amitoj Kaur Chawla amitoj1...@gmail.com
---
drivers/staging/octeon-usb
301 - 370 of 370 matches
Mail list logo