Dilek Uzulmez [Sun, 22 Feb 2015 12:50:06 +0000 (14:50 +0200)]
Staging: rtl8192u: Fix do not use // c99 comments.
This patch fixes "do not use // C99 comments" errors in ieee80211_module.c
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Sat, 21 Feb 2015 19:16:34 +0000 (21:16 +0200)]
Staging: rtl8192u: Remove space before ','
This patch fixes checkpatch.pl error in file r8190_rtl8256.h
ERROR: space prohibited before that ',' (ctx:WxW)
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Sat, 21 Feb 2015 19:03:23 +0000 (21:03 +0200)]
Staging: rtl8192u: Fix do not use // c99 comments.
This patch fixes "do not use // C99 comments" errors in
r8190_rtl8256.h
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Sat, 21 Feb 2015 11:24:38 +0000 (12:24 +0100)]
Staging: rtl8192u: Replace printk() with pr_debug() and netdev_dbg().
For dynamic debugging pr_debug() or netdev_dbg (if there is a ponter
to a device net structure) is preferred over printk(), which is the
raw way to print something. Issue found by checkpatch.pl.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Fri, 20 Feb 2015 21:54:27 +0000 (22:54 +0100)]
Staging: rtl8192u: Remove else after return
This patch simplifies the code by removing else and fixes
the following checkpatch.pl warning: "else is not useful after
break or return".
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Fri, 20 Feb 2015 21:26:57 +0000 (22:26 +0100)]
Staging: rtl8192u: Replace header files
Files <asm/string.h> and <asm/errno.h> should not be included directly.
This patch fixes the following checkpatch.pl warnings:
Use #include <linux/errno.h> instead of <asm/errno.h>
Use #include <linux/string.h> instead of <asm/string.h>
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ksenija Stanojevic [Thu, 19 Feb 2015 22:05:20 +0000 (23:05 +0100)]
Staging: rtl8192u: Remove space before tab
This patch fixes the checkpatch.pl warning:
WARNING: "please, no space before tabs"
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gamze POLAT [Thu, 19 Feb 2015 08:43:07 +0000 (10:43 +0200)]
Staging: dgnc: Removed trailing whitespace
Removed trailing whitespaces to improve code readability and remove
checkpatch warning.
Signed-off-by: Gamze POLAT <gamzepolat94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 06:00:56 +0000 (08:00 +0200)]
staging: slicloss: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.
The issue was discovered using the following coccinelle script:
@@
expression ds, e1, e2;
@@
-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 05:59:51 +0000 (07:59 +0200)]
staging: rtl8192u: ieee80211: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.
The issue was discovered using the following coccinelle script:
@@
expression ds, e1, e2;
@@
-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 05:58:29 +0000 (07:58 +0200)]
staging: panel: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.
The issue was discovered using the following coccinelle script:
@@
expression ds, e1, e2;
@@
-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 05:57:25 +0000 (07:57 +0200)]
staging: dgnc: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.
The issue was discovered using the following coccinelle script:
@@
expression ds, e1, e2;
@@
-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 05:55:43 +0000 (07:55 +0200)]
staging: wlan-ng: replace init_timer by setup_timer
This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.
The issue was discovered using the following coccinelle script:
@@
expression ds, e1, e2;
@@
-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yeliz Taneroglu [Wed, 25 Feb 2015 23:04:47 +0000 (01:04 +0200)]
Staging: fbtft: removed trailing whitespace
The following patch fixes the checkpatch.pl warning:
Removed all trailing whitespace in fb_s6d1121.c
Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 19 Feb 2015 19:18:18 +0000 (21:18 +0200)]
Staging: fbtft: Convert comment from C99 style to C89 style
This patch fixes checkpatch.pl error
ERROR: do not use C99 // comments
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 19 Feb 2015 18:56:48 +0000 (20:56 +0200)]
Staging: fbtft: remove trailing whitespace
This patch fixes checkpatch.pl error trailing whitespace.
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Thu, 19 Feb 2015 18:42:43 +0000 (20:42 +0200)]
Staging: fbtft: Added blank line after declaration
WARNING: Missing a blank line after declaration
chackpatch.pl warning in fb_ssd1351.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Thu, 19 Feb 2015 17:50:50 +0000 (19:50 +0200)]
Staging: fbtft: Added blank line after declaration
WARNING: Missing a blank line after declaration
chackpatch.pl warning in fb_ili9320.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 03:02:24 +0000 (05:02 +0200)]
staging: fbtft: fix spacing errors
This patch fixes the following checkpatch.pl errors:
space prohibited before that ','
space required after that ','
spaces required around that '='
Given that the addition of spaces triggered the line over 80 characters
warning, some lines were divided into two.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:56:50 +0000 (04:56 +0200)]
staging: fbtft: fix space prohibited before that ','
This patch fixes the following checkpatch.pl error:
fix space prohibited before that ','
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:55:45 +0000 (04:55 +0200)]
staging: fbtft: fix space required after that ','
This patch fixes the following checkpatch.pl error:
space required after that ','
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:50:25 +0000 (04:50 +0200)]
staging: fbtft: fix braces {} are not necessary for single statement blocks
This patch fixes the following checkpatch.pl warning:
braces {} are not necessary for single statement blocks
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:48:34 +0000 (04:48 +0200)]
staging: fbtft: fix space prohibited before that ','
This patch fixes the following checkpatch.pl error:
space prohibited before that ','
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:53:59 +0000 (04:53 +0200)]
staging: fbtft: fix braces {} are not necessary for single statement blocks
This patch fixes the following checkpatch.pl warning:
braces {} are not necessary for single statement blocks
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:45:22 +0000 (04:45 +0200)]
staging: fbtft: fix code indent should use tabs where possible
This patch fixes the following checkpatch.pl error:
code indent should use tabs where possible
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 26 Feb 2015 07:52:08 +0000 (09:52 +0200)]
Staging: rtl8723au: Add blank line after declarations
WARNING: "Missing a blank line after declarations"
Add blank line after declarations. That was found by running checkpatch
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 26 Feb 2015 07:52:07 +0000 (09:52 +0200)]
Staging: rtl8723au: Remove return in void function
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 <aysemelikeyurtoglu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 26 Feb 2015 06:51:03 +0000 (08:51 +0200)]
Staging: rtl8723au: Tabs should be used
WARNING: please, no spaces at the start of a line
That was found by running checkpatch.
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Wed, 25 Feb 2015 22:08:21 +0000 (00:08 +0200)]
Staging: rtl8723au: remove unnecessary break after return
WARNING: break is not useful after a goto or return.
Remove unnecessary break after return. That was found by running checkpatch.
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Wed, 25 Feb 2015 21:26:21 +0000 (23:26 +0200)]
Staging: rtl8723au: Remove return in void function
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 <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Tue, 24 Feb 2015 13:14:26 +0000 (15:14 +0200)]
Staging: rtl8723au: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:
drivers/staging/rtl8723au/core/rtw_ap.c WARNING: Missing a blank
line after declarations
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dilek Uzulmez [Sat, 21 Feb 2015 22:12:35 +0000 (00:12 +0200)]
Staging: rtl8723au: core: Fix quoted string split across lines
This patch fixes "quoted string split across lines warning" warning in
rtw_ap.c
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Fri, 20 Feb 2015 08:48:45 +0000 (14:18 +0530)]
Staging: rtl8723au: Use put_unaligned_le16
Using byte ordering functions and then memcpy() is risky and
prone to hide errors which are hard to track down. So, this
patch introduces the use of function put_unaligned_le16 which
makes the code clear. Here, use of variable tim_bitmap_le
and variable itself is removed. Also, to be compatible with the
changes header file is added too.
Coccinelle is used to do this change and semantic patch used for
this is as follows:
@a@
typedef __le16;
__le16 e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
@@
- tmp = cpu_to_le16(y);
<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(__le16)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e
@@ type T; identifier a.tmp; @@
- T tmp;
...when != tmp
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Tue, 17 Feb 2015 21:21:25 +0000 (00:21 +0300)]
Staging: rts5208: Remove braces around single if-statement
This patch removes unneeded braces around a single if-statement.
This problem was found using checkpatch.pl.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Thu, 26 Feb 2015 12:44:02 +0000 (18:14 +0530)]
Staging: rtl8188eu: Replace if-else block with switch-case
Replace if-else block with switch-case to make it more compact
and increase readability.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Thu, 26 Feb 2015 17:35:11 +0000 (23:05 +0530)]
Staging: rtl8188eu: Refactor conditional code to increase readability
Remove the nested conditionals. The if and else-if have the same
code so they are combined to make the code more compact.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Thu, 26 Feb 2015 18:17:39 +0000 (23:47 +0530)]
Staging: rtl8188eu: Combine two loops to increase readability
The first loop assigns values to ofdm_index array and the
second checks for boundary conditions. They are combined and
a comment is added to increase clarity.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Thu, 26 Feb 2015 20:09:32 +0000 (01:39 +0530)]
Staging: rtl8188eu: Remove unnecessary if condition
Remove this branch as is2t is defined false and is not
modified. The variable value32 is then unused.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Wed, 25 Feb 2015 15:41:14 +0000 (07:41 -0800)]
Staging: rtl8188eu: Remove unused macros
Removes macro definitions that are unused elsewhere
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 23 Feb 2015 09:16:13 +0000 (14:46 +0530)]
Staging: rtl8188eu: Remove unnecessary variable
Remove unnecessary variable and replace its uses with previously
defined variable.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 23 Feb 2015 18:10:27 +0000 (23:40 +0530)]
Staging: rtl8188eu: Refactored code to increase readility
Refactored the conditional code to make it more compact.
Replaced the ternary operators with abs() macro to increase readability.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 23 Feb 2015 18:36:14 +0000 (00:06 +0530)]
Staging: rtl8188eu: Replace ternary operator with existing macro
Replace ternary operator with existing abs() macro to increase
code readability.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Thu, 26 Feb 2015 13:01:52 +0000 (18:31 +0530)]
Staging: rtl8188eu: Remove redundant if condition
Remove redundant if condition as !result is always false.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Mon, 23 Feb 2015 22:32:44 +0000 (00:32 +0200)]
Staging: rtl8188eu: Add blank line after declarations
WARNING: "Missing a blank line after declarations"
That was found by running checkpatch
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 23 Feb 2015 14:02:38 +0000 (19:32 +0530)]
Staging: rtl8188eu: Changed array and loop construct
This function only required the array from the 14th element
onwards. Therefore, the array size is reduced and the loop
counter is modified so as to start from 0.
Also, the assignment of variable place is redundant as it is
initialized again in the loop.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 23 Feb 2015 09:11:07 +0000 (14:41 +0530)]
Staging: rtl8188eu: Replace unneeded switch-case block
Replace switch-case block with single if statement to
increase code readability.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 23 Feb 2015 08:50:30 +0000 (14:20 +0530)]
Staging: rtl8188eu: Remove unnecessary variable
Remove unneccessary variable and replace its uses with another
variable which is previously defined.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Sun, 22 Feb 2015 12:37:33 +0000 (18:07 +0530)]
Staging: rtl8188eu: Fix line over 80 characters
Added a variable to reduce line size and enhance code readability.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Fri, 20 Feb 2015 08:48:37 +0000 (14:18 +0530)]
Staging: rtl8188eu: Use put_unaligned_le16
Using byte ordering functions and then memcpy() is risky and
prone to hide errors which are hard to track down. So, this
patch introduces the use of function put_unaligned_le16 which
makes the code clear. Here, use of variable tim_bitmap_le
and variable itself is removed. Also, to be compatible with the
changes header file is added too.
Coccinelle is used to do this change and semantic patch used for
this is as follows:
@a@
typedef __le16;
__le16 e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
@@
- tmp = cpu_to_le16(y);
<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(__le16)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e
@@ type T; identifier a.tmp; @@
- T tmp;
...when != tmp
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Fri, 20 Feb 2015 07:28:50 +0000 (12:58 +0530)]
Staging: rtl8188eu: Remove unused struct ndis_802_11_key
This patch removes struct ndis_802_11_key as it is defined
in a header file but never used.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 19:14:41 +0000 (21:14 +0200)]
staging: comedi: drivers: replace init_timer by setup_timer
This patch replaces init_timer and 2 step initialization of function and
data by setup_timer to make the code more concise.
The issue was discovered using the following coccinelle script:
@@
expression ds, e1, e2;
@@
-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
-ds.function = e1;
...
-ds.data = e2;
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Thu, 19 Feb 2015 02:05:40 +0000 (18:05 -0800)]
Staging: media: mn88473: Match alignment with open parenthesis
Fixes the checkpatch.pl Check:
CHECK: Alignment should match open parenthesis
Increases readability by standardizing 7 argument indentations
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Wed, 18 Feb 2015 16:52:38 +0000 (22:22 +0530)]
Staging: media: Change data value in setup_timer function
Here, data value 0xabadcafe in function setup_timer
seems like a nonsense value and timer handler function
is not using it anyway. So, change it to 0.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Wed, 18 Feb 2015 16:52:29 +0000 (22:22 +0530)]
Staging: media: lirc: Use setup_timer
This patch introduces the use of function setup_timer
instead of structure assignments as it is the preferred
way to setup and set the timer.
This is done using Coccinelle and semantic patch used is
as follows:
@@
expression x,y,z;
@@
- init_timer (&x);
+ setup_timer (&x, y, z);
- x.function = y;
- x.data = z;
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yeliz Taneroglu [Wed, 25 Feb 2015 23:26:36 +0000 (01:26 +0200)]
Staging: i2o: Add blank line
This patch fixes the checkpatch.pl warning:
WARNING: "Missing a blank line after declarations"
Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yeliz Taneroglu [Wed, 25 Feb 2015 23:45:36 +0000 (01:45 +0200)]
Staging: i2o: Removed unnecessary braces
The following patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Wed, 25 Feb 2015 22:10:21 +0000 (00:10 +0200)]
Staging: i2o: Remove unnecessary braces
Brackets were removed from the expression that containing single
statement. Removed following checkpatch.pl warnings:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Wed, 25 Feb 2015 22:10:20 +0000 (00:10 +0200)]
Staging: i2o: Remove unnecessary 'out of memory' message
This patch removes unnecessay out of memory message fixing the following
checkpach.pl warning in device.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Fri, 20 Feb 2015 01:44:31 +0000 (03:44 +0200)]
staging: i2o: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
This patch fixes the following checkpatch.pl warning:
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Fri, 20 Feb 2015 01:43:52 +0000 (03:43 +0200)]
staging: i2o: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
This patch fixes the following checkpatch.pl warning:
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Wed, 18 Feb 2015 19:49:16 +0000 (01:19 +0530)]
Staging: i2o: Join quoted string split across lines
This patch removes the checkpatch.pl warnings "quoted string split accross lines"
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Wed, 18 Feb 2015 18:52:24 +0000 (00:22 +0530)]
Staging: i2o: Remove space after the * in a pointer type variable
This patch is to remove space after the * in pointer type function parameters
in function prototype and definition to follow kernel coding conventions.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Tue, 17 Feb 2015 22:22:07 +0000 (03:52 +0530)]
Staging: i2o: Convert comment from C99 style to C89 style
This patch fixes checkpatch.pl error in debug.c
ERROR: do not use C99 // comments
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Tue, 17 Feb 2015 21:37:20 +0000 (03:07 +0530)]
Staging: i2o: Use preferred library linux/uaccess.h over asm/uaccess.h
This patch fixes checkpatch.pl warning "Use #include
<linux/uaccess.h> instead of <asm/uaccess.h>" in i2o/config-osm.c .
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sun, 22 Feb 2015 13:27:56 +0000 (15:27 +0200)]
Staging: vt6656: replace memcpy() by ether_addr_copy() using coccinelle and pack variable
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rxtx.c
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)
@@ expression e1, e2; @@
- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);
According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.
The changes were applied using the following coccinelle rule:
Here is the output of pahole for the relevant datastructures:
struct vnt_usb_send_context {
void * priv; /* 0 8*/
struct sk_buff * skb; /* 8 8*/
struct urb * urb; /* 16 8*/
struct ieee80211_hdr * hdr; /* 24 8*/
unsigned int buf_len; /* 32 4*/
u32 frame_len; /* 36 4*/
u16 tx_hdr_size; /* 40 2*/
u16 tx_rate; /* 42 2*/
u8 type; /* 44 1*/
u8 pkt_no; /* 45 1*/
u8 pkt_type; /* 46 1*/
u8 need_ack; /* 47 1*/
u8 fb_option; /* 48 1*/
bool in_use; /* 49 1*/
unsigned char data[2900]; /* 50 2900*/
/* --- cacheline 46 boundary (2944 bytes) was 6 bytes ago --- */
/* size: 2952, cachelines: 47, members: 15 */
/* padding: 2 */
/* last cacheline: 8 bytes */
};
struct ieee80211_key_conf {
u32 cipher; /* 0 4*/
u8 icv_len; /* 4 1*/
u8 iv_len; /* 5 1*/
u8 hw_key_idx; /* 6 1*/
u8 flags; /* 7 1*/
s8 keyidx; /* 8 1*/
u8 keylen; /* 9 1*/
u8 key[0]; /* 10 0*/
/* size: 12, cachelines: 1, members: 8 */
/* padding: 2 */
/* last cacheline: 12 bytes */
};
struct vnt_mic_hdr {
u8 id; /* 0 1*/
u8 tx_priority; /* 1 1*/
u8 mic_addr2[6]; /* 2 6*/
u8 ccmp_pn[6]; /* 8 6*/
__be16 payload_len; /* 14 2*/
__be16 hlen; /* 16 2*/
__le16 frame_control; /* 18 2*/
u8 addr1[6]; /* 20 6*/
u8 addr2[6]; /* 26 6*/
u8 addr3[6]; /* 32 6*/
__le16 seq_ctrl; /* 38 2*/
u8 addr4[6]; /* 40 6*/
u16 packing; /* 46 2*/
/* size: 48, cachelines: 1, members: 13 */
/* last cacheline: 48 bytes */
};
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sat, 21 Feb 2015 20:37:16 +0000 (22:37 +0200)]
Staging: vt6655: changed C99 // comments
// erased and replace it with /* */ used.
Error found with checkpatch.pl
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Fri, 20 Feb 2015 22:51:02 +0000 (14:51 -0800)]
Staging: vt6655: break lines over 80 characters
Addresses checkpatch.pl warning:
WARNING: line over 80 characters
Break 2 lines over 80 characters and align with opening parenthesis
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Thu, 19 Feb 2015 23:43:12 +0000 (15:43 -0800)]
Staging: vt6655: Replace C99 comments with C89
Addresses the checkpatch.pl error:
ERROR: Do not use C99 // comments
Remove an unneeded comment line
Replace C99 comments with C89
Reduce multiple line comments to one line
Shorten comments over 80 line by removing blank space
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Sun, 22 Feb 2015 10:18:04 +0000 (12:18 +0200)]
Staging: lustre: Deleted space prohibited between function name and open parenthesis
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 <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sat, 21 Feb 2015 21:23:24 +0000 (23:23 +0200)]
Staging: lustre: Removed unnecessary spaces
Fix checkpatch.pl issues with "unnecessary whitespace before a quoted
newline" in llite_lib.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sat, 21 Feb 2015 20:47:43 +0000 (22:47 +0200)]
Staging: lustre: use kstrtoul() instead of sscanf()
This patch makes checkpatch.pl by fixing the following warning:
WARNING: Prefer kstrto<type> to single variable sscanf.
I used to kstrtoul can convert unsigned long instead of sscanf
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sat, 21 Feb 2015 21:19:46 +0000 (23:19 +0200)]
Staging: lustre: Removed unnecessary braces
This patch fixes checkpatch.pl warning in llite_lib.c
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Fri, 20 Feb 2015 21:51:38 +0000 (23:51 +0200)]
Staging: lustre: Edit switch-case indent
This patch fixes indent as the codingStyle
of the kernel recommends in dir.c
Fix checkpatch.pl error:
ERROR: switch and case should be at the same indent.
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Fri, 20 Feb 2015 21:51:37 +0000 (23:51 +0200)]
Staging: lustre: Add blank line after variable declarations
This patch fixes "Missing a blank line after declarations" checkpatch.pl
warning in dir.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Fri, 20 Feb 2015 21:51:36 +0000 (23:51 +0200)]
Staging: lustre: Used "linux" instead of "asm"
This patch fixes "Use #include <linux/uaccess.h> instead of
<asm/uaccess.h"> checkpatch.pl warning in dir.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gulsah Kose [Sun, 22 Feb 2015 03:08:05 +0000 (05:08 +0200)]
staging: lustre: lnet: klnds: o2iblnd: Removed useless return keywords.
Removed return keyword from void functions. Removed following checkpatch.pl warnings:
WARNING: void function return statements are not generally useful
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gulsah Kose [Sun, 22 Feb 2015 03:08:07 +0000 (05:08 +0200)]
staging: lustre: lnet: klnds: o2iblnd: Added missing blank line.
Added missing blank line after declaration. Removed following checkpatch.pl warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gulsah Kose [Sun, 22 Feb 2015 03:08:04 +0000 (05:08 +0200)]
staging: lustre: lnet: klnds: o2iblnd: Removed unnecessary spaces.
Removed unnecessary spaces between function name and open parenthesis '('.
Removed following checkpatch.pl warnings:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Fri, 20 Feb 2015 13:35:30 +0000 (15:35 +0200)]
Staging: lustre: lnet: klnds: o2iblnd: Deleted space prohibited between function name and open parenthesis
WARNING: space prohibited between function name and open parenthesis '('
checkpatch.pl warning in o2iblnd_modparams.c
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Fri, 20 Feb 2015 13:23:18 +0000 (15:23 +0200)]
Staging: lustre: lnet: klnds: o2iblnd: Remove intialization of static to 0
ERROR: do not initialise statics to 0 or NULL
checkpatch.pl error in o2iblnd_modparams.c
initial value unassigned static variables are automatically set to zero.
so it is unnecessary to assign the initial value to zero
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Thu, 19 Feb 2015 21:06:46 +0000 (23:06 +0200)]
Staging: lustre: lnet: add spaces around '||'
This fixes the checkpatch.pl error in conctl.c:
ERROR: spaces required around that '||' (ctx:VxE)
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 19 Feb 2015 20:25:40 +0000 (22:25 +0200)]
Staging: lustre: include: linux: libcfs: Remove spaces at the start of a line
This patch fixes checpatch.pl warning
WARNING: please, no spaces at the start of a line
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Tue, 17 Feb 2015 18:34:18 +0000 (20:34 +0200)]
staging: lustre: ldlm: remove commented call to LBUG
This patch removes a commented call to LBUG since lustre should be
cleaned out of debugging macros before moving out of staging.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:43:51 +0000 (04:43 +0200)]
staging: fbtft: fix space prohibited before that ','
This patch fixes the following checkpatch.pl error:
space prohibited before that ','
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Tue, 17 Feb 2015 17:48:51 +0000 (19:48 +0200)]
staging: fbtft: fix spacing errors
This patch fixes the following checkpatch.pl errors for
the file fb_bd663474.c:
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ','
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Tue, 17 Feb 2015 14:50:54 +0000 (20:20 +0530)]
Staging: emxx_udc: Convert from __attribute__((aligned(size))) to __aligned(size)
This patch addresses the checkpatch.pl warning
WARNING: __aligned(size) is preferred over __attribute__((aligned(size)))
aligned(x) is a macro :
#define __aligned(x) __attribute__((aligned(x)))
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tapasweni Pathak [Fri, 20 Feb 2015 13:13:53 +0000 (18:43 +0530)]
staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMIC
To avoid deadlock, do not call blocking functions with spinlocks held.
Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the pile
doesn't have enough free pages but will not sleep and hence deadlock can
be avoided.
Found by Coccinelle.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 16 Feb 2015 14:55:03 +0000 (20:25 +0530)]
Staging: dgnc: Fix warning of code style
This patch fixes checkpatch.pl WARNING:
Line longer than 80 chars.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 16 Feb 2015 18:40:44 +0000 (00:10 +0530)]
Staging: dgnc: Removed trailing whitespace to improve readability.
Removed trailing whitespaces to improve code readability and remove checkpatch warning.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Mon, 16 Feb 2015 21:14:42 +0000 (02:44 +0530)]
Staging: dgnc: Indented code to increase readability
Indented code and fixed checkpatch warning to enhance readability.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Mon, 23 Feb 2015 02:21:14 +0000 (18:21 -0800)]
Linux 4.0-rc1
.. after extensive statistical analysis of my G+ polling, I've come to
the inescapable conclusion that internet polls are bad.
Big surprise.
But "Hurr durr I'ma sheep" trounced "I like online polls" by a 62-to-38%
margin, in a poll that people weren't even supposed to participate in.
Who can argue with solid numbers like that? 5,796 votes from people who
can't even follow the most basic directions?
In contrast, "v4.0" beat out "v3.20" by a slimmer margin of 56-to-44%,
but with a total of 29,110 votes right now.
Now, arguably, that vote spread is only about 3,200 votes, which is less
than the almost six thousand votes that the "please ignore" poll got, so
it could be considered noise.
But hey, I asked, so I'll honor the votes.
Linus Torvalds [Mon, 23 Feb 2015 02:05:13 +0000 (18:05 -0800)]
Merge tag 'ext4_for_linus' of git://git./linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Ext4 bug fixes.
We also reserved code points for encryption and read-only images (for
which the implementation is mostly just the reserved code point for a
read-only feature :-)"
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix indirect punch hole corruption
ext4: ignore journal checksum on remount; don't fail
ext4: remove duplicate remount check for JOURNAL_CHECKSUM change
ext4: fix mmap data corruption in nodelalloc mode when blocksize < pagesize
ext4: support read-only images
ext4: change to use setup_timer() instead of init_timer()
ext4: reserve codepoints used by the ext4 encryption feature
jbd2: complain about descriptor block checksum errors
Linus Torvalds [Mon, 23 Feb 2015 01:42:14 +0000 (17:42 -0800)]
Merge branch 'for-linus-2' of git://git./linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro:
"Assorted stuff from this cycle. The big ones here are multilayer
overlayfs from Miklos and beginning of sorting ->d_inode accesses out
from David"
* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (51 commits)
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
procfs: fix race between symlink removals and traversals
debugfs: leave freeing a symlink body until inode eviction
Documentation/filesystems/Locking: ->get_sb() is long gone
trylock_super(): replacement for grab_super_passive()
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
SELinux: Use d_is_positive() rather than testing dentry->d_inode
Smack: Use d_is_positive() rather than testing dentry->d_inode
TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
VFS: Split DCACHE_FILE_TYPE into regular and special types
VFS: Add a fallthrough flag for marking virtual dentries
VFS: Add a whiteout dentry type
VFS: Introduce inode-getting helpers for layered/unioned fs environments
Infiniband: Fix potential NULL d_inode dereference
posix_acl: fix reference leaks in posix_acl_create
autofs4: Wrong format for printing dentry
...
Linus Torvalds [Sun, 22 Feb 2015 17:57:16 +0000 (09:57 -0800)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fix from Russell King:
"Just one fix this time around. __iommu_alloc_buffer() can cause a
BUG() if dma_alloc_coherent() is called with either __GFP_DMA32 or
__GFP_HIGHMEM set. The patch from Alexandre addresses this"
* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()
Al Viro [Sun, 22 Feb 2015 03:19:57 +0000 (22:19 -0500)]
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
X-Coverup: just ask spender
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sun, 22 Feb 2015 03:16:11 +0000 (22:16 -0500)]
procfs: fix race between symlink removals and traversals
use_pde()/unuse_pde() in ->follow_link()/->put_link() resp.
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sun, 22 Feb 2015 03:05:11 +0000 (22:05 -0500)]
debugfs: leave freeing a symlink body until inode eviction
As it is, we have debugfs_remove() racing with symlink traversals.
Supply ->evict_inode() and do freeing there - inode will remain
pinned until we are done with the symlink body.
And rip the idiocy with checking if dentry is positive right after
we'd verified debugfs_positive(), which is a stronger check...
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro [Sat, 21 Feb 2015 09:59:02 +0000 (04:59 -0500)]
Documentation/filesystems/Locking: ->get_sb() is long gone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Konstantin Khlebnikov [Thu, 19 Feb 2015 17:19:35 +0000 (20:19 +0300)]
trylock_super(): replacement for grab_super_passive()
I've noticed significant locking contention in memory reclaimer around
sb_lock inside grab_super_passive(). Grab_super_passive() is called from
two places: in icache/dcache shrinkers (function super_cache_scan) and
from writeback (function __writeback_inodes_wb). Both are required for
progress in memory allocator.
Grab_super_passive() acquires sb_lock to increment sb->s_count and check
sb->s_instances. It seems sb->s_umount locked for read is enough here:
super-block deactivation always runs under sb->s_umount locked for write.
Protecting super-block itself isn't a problem: in super_cache_scan() sb
is protected by shrinker_rwsem: it cannot be freed if its slab shrinkers
are still active. Inside writeback super-block comes from inode from bdi
writeback list under wb->list_lock.
This patch removes locking sb_lock and checks s_instances under s_umount:
generic_shutdown_super() unlinks it under sb->s_umount locked for write.
New variant is called trylock_super() and since it only locks semaphore,
callers must call up_read(&sb->s_umount) instead of drop_super(sb) when
they're done.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Fanotify probably doesn't want to watch autodirs so make it use d_can_lookup()
rather than d_is_dir() when checking a dir watch and give an error on fake
directories.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>