WARNING: struct file_operations should normally be const.
That was found by running checkpatch.
Signed-off-by: Melike Yurtoglu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix checkpatch.pl issues with "space prohibited between function name
and open parenthesis" in console.c
Signed-off-by: Hatice ERTURK <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WARNING: space prohibited before that '--'
Removed space prohibited. That was found by running checkpatch.
Signed-off-by: Melike Yurtoglu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WARNING: space prohibited between function name and open parenthesis '('
Remove unnecessary space between function name and opening parenthesis.
That was found by running checkpatch
Signed-off-by: Melike Yurtoglu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WARNING: else is not generally useful after a break or return
Remove unnecessary else after return. That was found by running
checkpatch
Signed-off-by: Melike Yurtoglu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WARNING: void function return statements are not generally useful
Remove return in void function. That was found by running checkpatch.
Signed-off-by: Melike Yurtoglu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WARNING: "Missing a blank line after declarations"
Add blank line after declarations. That was found by running checkpatch
Signed-off-by: Melike Yurtoglu <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The following patch fixes the checkpatch.pl warning:
drivers/staging/lustre/lustre/obdecho/echo_client.c WARNING: Missing a blank line after declarations
Signed-off-by: Hatice ERTURK <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes "do not add new typedefs" warning generated by
checkpatch.pl.
Update related files.
Signed-off-by: Haneen Mohammed <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/statfs.h> instead of #include <asm/statfs.h>
Signed-off-by: Dilek Uzulmez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ERROR: "(foo*)" should be "(foo *)".That's why add space together.
That Error found with checkpatch.pl
Signed-off-by: Hatice ERTURK <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes variables that were simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The memory area set by the call to memset is immediately
overwritten by the subsequent call to memcpy. Hence, remove that
redundant memset.
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes the use of a variable used only for
returning a value. The following coccinelle script was
used to discover it:
@@
expression ret;
identifier f;
@@
-ret =
+return
f(...);
-return ret;
It also fixes the checkpatch.pl warning about line being over
80 characters, in the lines where changes were made.
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove unused variable assignment for is2t and assign
sim_bitmap at declaration to make the code more compact.
Signed-off-by: Vatika Harlalka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Variable path_on is assigned explicitly in the if branch and so
its assignment outside can be moved to the else branch.
Signed-off-by: Vatika Harlalka <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Insert missing space before '=' to improve readability.
This Error found with checkpatch.pl
Signed-off-by: Hatice ERTURK <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Insert missing space before '|' to improve readability.
This Error found with checkpatch.pl
Signed-off-by: Hatice ERTURK <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch fixes these error messages found by checkpatch.pl:
ERROR: "foo* bar" should be "foo *bar"
Signed-off-by: Hatice ERTURK <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch uses kasprintf as it combines kmalloc and
sprintf, and takes care of the size calculation itself.
The semantic patch that makes this change is as follows:
// <smpl>
@@
expression a,flag;
expression list args;
statement S;
@@
a =
- \(kmalloc\|kzalloc\)(...,flag)
+ kasprintf(flag,args)
<... when != a
if (a == NULL || ...) S
...>
- sprintf(a,args);
Signed-off-by: Navya Sri Nizamkari <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch replaces printk() with dev_dbg() in order to avoid the
suggestion of using a more specific function while printing debug
information. Warning found by checkpatch.pl.
Signed-off-by: Cristina Opriceana <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.
The issue was detected and resolved using the following
coccinelle script:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Aya Mahfouz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix checkpatch.pl issues with do not use C99 //
comments in key.h
Signed-off-by: Yeliz Taneroglu <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Addresses checkpatch.pl check:
CHECK: Extern prototypes should be avoided in .h files
Removes the 'extern' keyword from function prototypes
Signed-off-by: Katie Dunne <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
I find the Kconfig dependencies of the various Unisys drivers rather
confusing. Due to the dependencies, you must select the drivers one by
one to see the following ones. So if you are looking for a specific
driver, it is not visible by default. And if you don't know exactly
what you need, it's even worse as you don't know what is available.
In a case like this with several helper drivers and many dependencies,
I think it makes more sense to list all the drivers at first, and use
select statements to fulfill the dependencies for the user.
As a nice side effect, it avoids the weird indentation, which was
technically correct but still somewhat confusing.
I also dropped the dependencies on HAS_IOMEM, as the whole driver set
is for X86_64 only anyway which always has HAS_IOMEM set. And I
dropped the redundant dependencies on UNISYSSPAR as all drivers are
already inside an "if UNISYSSPAR" block.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Benjamin Romer <[email protected]>
Cc: David Kershner <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The code does the checks on should_stop variable in the kernel
threads. The uisthread_stop function sets the should_stop and calls
KILL (eventually kill_pid) to stop the thread.
The checking of should_stop variable can be replaced to a call to
kthread_should_stop function and the setting of the should_stop and
a call to KILL can be replaced with kthread_stop function.
Cc: Ken Cox <[email protected]>
Cc: Benjamin Romer <[email protected]>
Signed-off-by: Devendra Naga <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
kthread_run calls kthread_create and if the thread is created
it then calls wake_up_process on the corresponding returned
task struct. So the code can be simplified by calling just
kthread_run.
Cc: Ken Cox <[email protected]>
Cc: Benjamin Romer <[email protected]>
Signed-off-by: Devendra Naga <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch reduces the kernel size by removing error messages that duplicate
the normal OOM message.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)
@@
identifier f,print,l;
expression e;
constant char[] c;
@@
e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(...);
if (e == NULL) {
<+...
- print(...,c,...);
... when any
(
goto l;
|
return ...;
)
...+> }
Signed-off-by: Quentin Lambert <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>