Nadav Amit [Tue, 5 Sep 2017 20:25:25 +0000 (20:25 +0000)]
staging: lustre: ptlrpc: kfree used instead of kvfree
rq_reqbuf is allocated using kvmalloc() but released in one occasion
using kfree() instead of kvfree().
The issue was found using grep based on a similar bug.
Fixes:
d7e09d0397e8 ("add Lustre file system client support")
Fixes:
ee0ec1946ec2 ("lustre: ptlrpc: Replace uses of OBD_{ALLOC,FREE}_LARGE")
Cc: Peng Tao <bergwolf@gmail.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Sat, 16 Sep 2017 16:46:28 +0000 (17:46 +0100)]
staging: fbtft: remove redundant initialization of txbuf16
txbuf16 is being initialized at declaration time and then later
set to another value without it being read inbetween, hence making
the initialization redundant. Fix this by setting txbuf16 just
the once. Also clean up some incorrect indentations. Cleans up
clang build warning:
warning: Value stored to 'txbuf16' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Sat, 16 Sep 2017 16:32:51 +0000 (17:32 +0100)]
staging: ccree: remove unused and redundant variable idx
Variable idx is being set but never read and thus it can be
removed because it is redundant. Cleans up clang build warnings:
warning: Value stored to 'idx' during its initialization is never read
warning: Value stored to 'idx' is never read
warning: Value stored to 'idx' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Castulo J. Martinez [Sat, 16 Sep 2017 00:16:54 +0000 (17:16 -0700)]
staging: speakup: Remove unnecessary parentheses
Remove unnecessary parentheses from if statements to make the code
easier to read.
Issue found by checkpatch.
Signed-off-by: Castulo J. Martinez <castulo.martinez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentine Sinitsyn [Fri, 15 Sep 2017 01:34:20 +0000 (18:34 -0700)]
staging: rtl8188eu: Fix spelling
rtl8188eu contains some spelling errors in comment lines as well as in
constants. Harmless as they are, they still make the code feel a bit
unclean, which is not something we want in the kernel.
Improve this by fixing typos so they won't catch eyes of future driver
developers anymore.
Signed-off-by: Wolfgang Hartmann <wolfgang.hartmann@siemens.com>
Signed-off-by: Manish Shrestha <manishshrestha2006@gmail.com>
Signed-off-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 18 Sep 2017 10:15:09 +0000 (12:15 +0200)]
staging: rtl8192u: remove unneeded SN_LESS macro
It's already in a .h file, don't redefine it as the compiler doesn't
like it if it does not match identically.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:54 +0000 (16:30 +0530)]
staging: rtl819u: move '{' to next line
Fixes checkpatch.pl error:
ERROR: open brace '{' following function declarations go on the next line
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:53 +0000 (16:30 +0530)]
staging: rtl8192u: remove space before semicolon
Fixex checkpatch.pl warning:
WARNING: space prohibited before semicolon
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:52 +0000 (16:30 +0530)]
staging: rtl8192u: add space after ','
Fixes 'space required after ','', reported by checkpatch.pl
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:51 +0000 (16:30 +0530)]
staging: rtl8192u: remove space function pointer arguments
Fixes checkpatch.pl warning:
WARNING: Unnecessary space before function pointer arguments
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:50 +0000 (16:30 +0530)]
staging: rtl8192u: fix '{' following enum go on the same line
Fixes checkpatch.pl error:
ERROR: open brace '{' following enum go on the same line
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:49 +0000 (16:30 +0530)]
staging: rtl8192u:add space before '(' and '{'
Fixes checkpatch.pl errors:
ERROR: space required before the open parenthesis '('
ERROR: space required before the open brace '{'
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:48 +0000 (16:30 +0530)]
staging: rtl8192u: add spaces after struct/enum definitions
Fixes checkpatch.pl warnings:
WARNING: missing space after enum definition
WARNING: missing space after struct definition
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:47 +0000 (16:30 +0530)]
staging: rtl8192u: remove space before ')'
Fixes checkpatch.pl error:
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:46 +0000 (16:30 +0530)]
staging: rtl8192u: remove space after '('
ERROR: space prohibited after the open parenthesis '('
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:45 +0000 (16:30 +0530)]
staging: rtl8192u: add space after '}'
This patch fixes checkpatch.pl error:
ERROR: space required after that close brace '}'
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 11:00:44 +0000 (16:30 +0530)]
staging: rtl8192u: fix spaces around algebric and binary operators
Fixes prefer spaces around '+', '_', '?', '&', '==', '!=', '|', '&&', '=' as reported
by checkpatch.pl.
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Wed, 13 Sep 2017 04:32:25 +0000 (22:32 -0600)]
staging: wlan-ng: Replace pr_debug with netdev_dbg
This patch replace pr_debug with netdev_dbg when appropriate net_device
structure is found.
Issue found using the following Coccinelle script:
@r exists@
identifier f, s, i;
position p;
@@
f(...,struct s *i,...) {
<+... when != i == NULL
(
pr_err@p(...);
|
pr_info@p(...);
|
pr_debug@p(...);
)
...+>
}
@rr@
identifier r.s, fld;
@@
struct s {
...
struct net_device *fld;
... };
@@
identifier r.i, r.s, rr.fld;
position r.p;
@@
(
-pr_err@p
+netdev_err
(
+ i->fld,
...)
|
-pr_info@p
+netdev_info
(
+ i->fld,
...)
|
-pr_debug@p
+netdev_dbg
(
+ i->fld,
...)
)
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Fri, 15 Sep 2017 07:04:30 +0000 (12:34 +0530)]
Staging: pi433: Merge assignment with return value
Removes the unnecessary assignment of retval preceding
the return statement.
Detected using the following Coccinelle script:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Keerthi Reddy [Wed, 13 Sep 2017 17:12:34 +0000 (22:42 +0530)]
staging: Android: follow coding guidlines
- Add a new line after struct declaration
- remove extra new line.
Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Thu, 14 Sep 2017 12:08:50 +0000 (17:38 +0530)]
staging: xgifb: fix multiple line dereference
This patch fixes the checkpatch.pl warning:
WARNING: Avoid multiple line dereference - prefer'XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag'
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Thu, 14 Sep 2017 12:48:13 +0000 (18:18 +0530)]
Staging: ccree: Use kcalloc instead of kzalloc
Use kcalloc instead of kzalloc to check for overflow before
multiplication. Done using the following semantic patch by
coccinelle.
http://coccinelle.lip6.fr/rules/kzalloc.cocci
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aishwarya Pant [Fri, 15 Sep 2017 13:23:08 +0000 (18:53 +0530)]
staging: rtl8188eu: remove parenthesis from right hand side of assignment
Parenthesis are not needed around the right hand side of an assignment.
This patch was made on the core files of rtl8188eu using the following
coccinelle script.
@@
binary operator op = {==,!=,&&,||,>=,<=,&,|};
expression l, r, t;
@@
(
l = (r op t)
|
l =
-(
r
-)
)
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Sat, 16 Sep 2017 08:12:16 +0000 (13:42 +0530)]
Staging: rtl8723bs/os_dep: Remove typecast in kfree
Remove typecast of pointer in kfree((u8 *)pdvobj) as
it is not needed.
Found using the following Coccinelle semantic patch:
@@
identifier x;
type t;
@@
-kfree((t *)x)
+kfree(x)
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Thu, 14 Sep 2017 12:04:05 +0000 (17:34 +0530)]
staging: rtl8723bs: Merge assignment with return
Merge assignment with return statement to directly return the value.
Done using following coccinelle semantic patch
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Sat, 16 Sep 2017 06:34:27 +0000 (12:04 +0530)]
Staging: irda: Use !x instead of NULL comparison
Test for NULL as !x where functions that return NULL on failure
are used. Done using the following semantic patch by coccinelle.
@ is_null @
expression E;
statement S;
@@
E = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));
(
if(!E)
S
|
-if(E==NULL)
+if(!E)
S
)
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Sat, 16 Sep 2017 06:08:38 +0000 (11:38 +0530)]
Staging: irda: drivers: Move the curly bracket to the same line as if
Move the left curly brace to the same line as the if statement.
This coding style is more common and also reduces the number of
lines of code.
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Fri, 15 Sep 2017 21:06:16 +0000 (02:36 +0530)]
Staging: irda: Remove parentheses on the right of assignment
Parentheses are not needed on the right hand side of assignment
statement in most cases. Done using the following semantic
patch by coccinelle.
@@
identifier E,F,G,f;
expression e,r;
@@
(
E = (G == F);
|
E = (e == r);
|
E =
-(
...
-)
;
)
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Fri, 15 Sep 2017 21:05:47 +0000 (02:35 +0530)]
Staging: irda: Don't use assignment inside if statement
Write assignment statement outside of the if statement. Done
using the following semantic patch by coccinelle.
@@
identifier E;
expression F;
statement S;
@@
-if((E = F))
+E = F;
+if(E)
S
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Fri, 15 Sep 2017 09:13:15 +0000 (14:43 +0530)]
Staging: irda: drivers: Replace (skb == NULL) with (!skb)
Some functions return NULL as an indication of failure.
The style (!skb) is more common than (skb == NULL) for these
functions.
Found by the following Coccinelle script.
@@
identifier i;
statement S;
@@
i = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\|
alloc_netdev\|dev_alloc_skb\)(...));
(
-if (i == NULL)
+if (!i)
S
|
-if (NULL == i)
+if (!i)
S
)
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Thu, 14 Sep 2017 04:55:38 +0000 (22:55 -0600)]
staging: irda: Remove typedef struct
This patch remove typedef from a structure with all its ocurrences
since using typedefs for structures is discouraged.
Issue found using Coccinelle:
@r1@
type T;
@@
typedef struct { ... } T;
@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_t" or T[-2:] == "_T":
coccinelle.T2 = T[:-2];
else:
coccinelle.T2 = T;
print T, coccinelle.T2
@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;
@r3@
type r1.T;
identifier c1.T2;
@@
-T
+struct T2
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sun, 17 Sep 2017 20:00:35 +0000 (01:30 +0530)]
staging: speakup: remove NULL comparison
This was done using cocccinelle script:
@@
identifier arg;
@@
-arg==NULL
+!arg
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Sat, 16 Sep 2017 05:04:05 +0000 (10:34 +0530)]
Staging: speakup: Remove print following unsuccessful kmalloc
Remove print statement following unsuccessful kmalloc when there
is not enough memory. Kmalloc and variants normally produce a
backtrace in such a case. Hence, a print statement is not necessary.
Found using the following Coccinelle semantic patch:
@@
identifier i;
@@
i = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|
devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\|
kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...));
(
if (i == NULL)
{
-\(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...);
...when any
}
|
if (!i)
{
-\(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...);
...when any
}
)
@@
identifier i;
@@
(
- if (i == NULL) {
+ if (i == NULL)
return ...;
- }
|
- if (!i) {
+ if (!i)
return ...;
- }
)
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Sat, 16 Sep 2017 16:39:29 +0000 (22:09 +0530)]
Staging: dgnc: Remove unused fields in struct channel_t
Eliminate the fields that are not used and the comments
associated with them.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Sat, 16 Sep 2017 16:38:54 +0000 (22:08 +0530)]
Staging: dgnc: Remove unused fields in struct dgnc_board
Remove unused fields and comments associated with them in
the structure definition.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 13:59:33 +0000 (19:29 +0530)]
staging: dgnc: remove variable rc
Found using coccinelle script:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aastha Gupta [Sat, 16 Sep 2017 13:02:32 +0000 (18:32 +0530)]
staging: dgnc: remove unused variable
This patch removes unused variable.
Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Sat, 16 Sep 2017 00:41:48 +0000 (18:41 -0600)]
staging: lustre: lnet: Replace list_for_each with list_for_each_entry
Replace use of the combination of list_for_each and list_entry
with list_for_each_entry to simplify the code and remove variables
that are used only in list_for_each.
Issue found and corrected using Coccinelle script:
@r@
expression head, member, e;
type T1, T2, T3;
iterator name list_for_each, list_for_each_entry;
identifier pos, var;
@@
-T1 *pos;
...when!=pos=e;
-list_for_each(pos, head)
+list_for_each_entry(var, head, member)
{
...when!=pos=e;
when!=T3 *var;
-var = list_entry(pos, T2, member);
...when!=pos=e;
}
...when!=pos=e;
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Mon, 18 Sep 2017 09:00:16 +0000 (11:00 +0200)]
Merge branch 'staging_typec_move' into staging-next
Move the typec code out of staging into the USB tree. This is on a
separate branch so that we can share it with the USB git tree and not
cause merge issues later on.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guenter Roeck [Tue, 12 Sep 2017 03:32:08 +0000 (20:32 -0700)]
usb: typec: fusb302: Move out of staging
The driver is in good enough shape to be moved out of staging.
Do it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guenter Roeck [Tue, 12 Sep 2017 03:32:07 +0000 (20:32 -0700)]
typec: tcpm: Move out of staging
Move tcpm (USB Type-C Port Manager) out of staging.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guenter Roeck [Tue, 12 Sep 2017 03:32:06 +0000 (20:32 -0700)]
staging: typec: pd: Document struct pd_message
struct pd_message is the format of a PD message as seen on the wire.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guenter Roeck [Tue, 12 Sep 2017 03:32:05 +0000 (20:32 -0700)]
staging: typec: tcpm: Document data structures
Document struct tcpc_config and struct tcpc_dev.
Drop unused TCPC_USB_SWITCH_RESTORE.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Guenter Roeck [Tue, 12 Sep 2017 03:32:04 +0000 (20:32 -0700)]
staging: typec: tcpm: Drop commented out code
Commented out code can be added as needed. Drop it.
Also drop TODO and an obsolete XXX comment.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aviya Erenfeld [Mon, 11 Sep 2017 22:51:10 +0000 (01:51 +0300)]
staging: wlan-ng: Avoid bogus endianness
The linkstatus variable in the info struct received as __le16
but handled in every other place in the driver as u16
Fix that and remove the sparse warning that occurred due to it:
prism2sta.c:1450:29: warning: incorrect type in assignment (different base types)
prism2sta.c:1450:29: expected unsigned short [unsigned] [usertype] link_status_new
prism2sta.c:1450:29: got restricted __le16 [usertype] linkstatus
Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Sun, 10 Sep 2017 18:34:28 +0000 (21:34 +0300)]
staging:r8192u: replace request_module with try_then_request_module
Return value of request_module() does not handled,
so it is possible to use shorter try_then_request_module().
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Liam Ryan [Tue, 12 Sep 2017 00:40:15 +0000 (01:40 +0100)]
staging: rtl8712: Fix unbalanced braces around else statement
Fix checkpath-reported unbalanced braces in the following areas
221: FILE: drivers/staging/rtl8712/hal_init.c:221:
392: FILE: drivers/staging/rtl8712/os_intfs.c:392:
363: FILE: drivers/staging/rtl8712/rtl8712_cmd.c:363:
889: FILE: drivers/staging/rtl8712/rtl8712_recv.c:889:
902: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:902:
84: FILE: drivers/staging/rtl8712/rtl871x_ioctl_set.c:84:
580: FILE: drivers/staging/rtl8712/rtl871x_mlme.c:580:
593: FILE: drivers/staging/rtl8712/usb_intf.c:593:
Signed-off-by: Liam Ryan <liamryandev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Mon, 11 Sep 2017 16:28:37 +0000 (21:58 +0530)]
Staging: ccree: Remove unused variable monitor_lock
Remove the variable monitor_lock as it is not used anywhere.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Mon, 11 Sep 2017 17:39:51 +0000 (23:09 +0530)]
staging: rtl8723bs: Change coding style to (foo *bar)
This coding style (foo *bar) is more common for the kernel code.
Change foo* bar to foo *bar.
Change foo * bar to foo *bar.
Change (foo*) to (foo *).
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shreeya Patel [Mon, 11 Sep 2017 17:51:06 +0000 (23:21 +0530)]
Staging: rtlwifi: Remove unnecessary 'out of memory' message.
Logging messages that show some type of "out of memory" error
are generally unnecessary as there is a generic message and
a stack dump done by the memory subsystem.
These messages generally increase kernel size without much
added value.
Problem found by checkpatch.
Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Tue, 12 Sep 2017 13:12:06 +0000 (18:42 +0530)]
staging: rtl8723bs: Remove unnecessary spaces
Space between function name and open parentheses '(' is prohibited.
Space is required around most binary operators '=', '==', '+=',
'<', ':', '+', '-'
Space required before '&', '*'
Space is required after ',', ';'
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Haneen Mohammed [Tue, 12 Sep 2017 19:04:50 +0000 (13:04 -0600)]
staging: pi433: Replace printk() with dev_dbg()
This patch convert printk() to the preferred variant dev_dbg() and
remove unnecessary comment line.
Issue detected with checkpatch.pl.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 17:41:14 +0000 (23:11 +0530)]
staging: rtl8723bs: Remove unnecessary blank lines
Blank lines aren't necessary after an open brace and before a close brace
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 17:39:10 +0000 (23:09 +0530)]
staging: rtl8723bs: Remove unneccesary braces and change position of open brace
Follow linux-kernel code style for conditional statements
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 17:29:50 +0000 (22:59 +0530)]
staging: rtl8723bs: Add space between concatenated strings
Use spaces between concatenated strings
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 17:23:22 +0000 (22:53 +0530)]
staging: rtl8723bs: Remove unnecessary spaces at the start of line
No spaces at the start of a line
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 17:21:01 +0000 (22:51 +0530)]
staging: rtl8723bs: Add spaces around '?', '==', '||', '!='
Use spaces around most binary operators
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 15:17:05 +0000 (20:47 +0530)]
staging: rtl8723bs: Add spaces around '+', '|', '*'
Use one space around most binary operators
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sun, 10 Sep 2017 15:15:28 +0000 (20:45 +0530)]
staging: rtl8723bs: Add spaces around '='
Use one space around (on each side of) '=' operator
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Fri, 8 Sep 2017 14:24:28 +0000 (19:54 +0530)]
staging: pi433: Fixes minor typo errors
Fixes checkpatch warning -- "occured" and "succesfully" are misspelled
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Sun, 10 Sep 2017 15:32:17 +0000 (21:02 +0530)]
Staging: speakup: Replace symbolic permission
Replace S_IRUGO by 0444 in module parameter declaration. 0444 is more
readable and matches the style used in other declarations nearby.
Problem found using checkpatch.
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sat, 9 Sep 2017 15:01:21 +0000 (20:31 +0530)]
staging: rtl8723bs: Do not initialise statics to 0
Static variables are initialised to 0 by gcc
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joe Perches [Sat, 9 Sep 2017 20:14:54 +0000 (13:14 -0700)]
staging: rtl8723bs: Remove unnecessary rtw_z?malloc casts
These functions now return void * and no longer need casts.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joe Perches [Sat, 9 Sep 2017 20:14:52 +0000 (13:14 -0700)]
staging: rtl8723bs: convert private allocation functions to return void *
Using char * for a return from allocation functions means the
code has to cast generic allocations to specific types.
Allow the compiler to not need casts on the allocations.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joe Perches [Sat, 9 Sep 2017 20:14:51 +0000 (13:14 -0700)]
staging: rtl8723bs: Convert LIST_CONTAINOR to use kernel container_of
These are similar macros so use the normal kernel one.
As well, there are odd games being played with casting a plist to
a union recv_frame by using LIST_CONTAINOR. Just use a direct cast
to union recv_frame instead.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Mon, 11 Sep 2017 13:09:18 +0000 (18:39 +0530)]
Staging: rtl8712: Remove multiple blank lines
Remove extra blank line.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Sun, 10 Sep 2017 11:23:09 +0000 (16:53 +0530)]
Staging: xgifb: XGI_main_26.c: Fix alignment to match parentheses
Fix alignment so that it matches open parentheses.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harsha Sharma [Sat, 9 Sep 2017 10:34:47 +0000 (16:04 +0530)]
staging: sm750fb: Remove extra blank lines
This was reported by checkpatch.pl
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Meghana Madhyastha [Sun, 10 Sep 2017 04:27:32 +0000 (09:57 +0530)]
Staging: vc04_services: bcm2835-camera: Fix spelling mistake
Fixes a spelling mistake in the comments.
Problem found using checkpatch.
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 5 Sep 2017 06:53:44 +0000 (16:53 +1000)]
staging: rtlwifi: remove unused functions
Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the
driver. Both functions call rtl_addr_delay(), this function is unused
outside of these call sites.The driver (and kernel) code base is cleaner
if unused functions are removed.
Remove unused functions.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 5 Sep 2017 06:53:43 +0000 (16:53 +1000)]
staging: rtlwifi: use kcalloc instead of multiply
checkpatch emits multiple warnings of type
WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply
Replace two calls to kzalloc() with calls to kcalloc().
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Sat, 9 Sep 2017 07:48:51 +0000 (13:18 +0530)]
Staging: ccree: Merge assignment with return
Merge the assignment and the return statements to return the value
directly. Done using coccinelle.
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gilad Ben-Yossef [Thu, 7 Sep 2017 09:00:16 +0000 (12:00 +0300)]
staging: ccree: remove BUG macro usage
Replace BUG() macro usage that crash the kernel with alternatives
that signal error and/or try to recover.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gilad Ben-Yossef [Thu, 7 Sep 2017 09:00:15 +0000 (12:00 +0300)]
staging: ccree: replace noop macro with inline
Replace noop macro with a noop inline function
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gilad Ben-Yossef [Thu, 7 Sep 2017 09:00:14 +0000 (12:00 +0300)]
staging: ccree: move over to BIT macro for bit defines
Use BIT macro for bit definitions where needed.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gilad Ben-Yossef [Thu, 7 Sep 2017 09:00:13 +0000 (12:00 +0300)]
staging: ccree: remove unused completion
icache_setup_completion is no longer used. Remove it.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gilad Ben-Yossef [Thu, 7 Sep 2017 09:00:12 +0000 (12:00 +0300)]
staging: ccree: simplify resource release on error
The resource release on probe/init error was being handled
in an awkward manner and possibly leaking memory on certain
(unlikely) error path.
Fix it by simplifying the error resource release and making
it easier to track.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suniel Mahesh [Thu, 7 Sep 2017 09:00:11 +0000 (12:00 +0300)]
staging: ccree: Use platform_get_irq and devm_request_irq
It is recommended to use managed function devm_request_irq(),
which simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace platform_get_resource(), request_irq() and corresponding
error handling with platform_get_irq() and devm_request_irq().
(b) remove struct resource pointer(res_irq) in struct ssi_drvdata as
it seems redundant.
(c) change type of member irq in struct ssi_drvdata from unsigned int
to int, as return type of platform_get_irq is int and can be used in
error handling.
(d) remove irq_registered variable from driver probe as it seems
redundant.
(e) free_irq is not required any more, devm_request_irq() free's it
on driver detach.
(f) adjust log messages accordingly and remove any blank lines.
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suniel Mahesh [Thu, 7 Sep 2017 09:00:10 +0000 (12:00 +0300)]
staging: ccree: Convert to devm_ioremap_resource for map, unmap
It is recommended to use managed function devm_ioremap_resource(),
which simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace request_mem_region(), ioremap() and corresponding error
handling with devm_ioremap_resource().
(b) remove struct resource pointer(res_mem) in struct ssi_drvdata as it
seems redundant, use struct resource pointer which is defined locally and
adjust return value of platform_get_resource() accordingly.
(c) release_mem_region() and iounmap() are dropped, since devm_ioremap_
resource() releases and unmaps mem region on driver detach.
(d) adjust log messages accordingly and remove any blank lines.
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
[gby: rebase on top of latest coding style fixes changes]
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suniel Mahesh [Thu, 7 Sep 2017 09:00:09 +0000 (12:00 +0300)]
staging: ccree: Replace kzalloc with devm_kzalloc
It is recommended to use managed function devm_kzalloc, which
simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace kzalloc with devm_kzalloc.
(b) drop kfree(), because memory allocated with devm_kzalloc() is
automatically freed on driver detach, otherwise it leads to a double
free.
(c) remove unnecessary blank lines.
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
[gby: rebase on top of latest coding style fixes changes]
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Srishti Sharma [Thu, 7 Sep 2017 07:49:21 +0000 (13:19 +0530)]
Staging: ccree: Remove unused variable.
Remove the local variable inflight_counter as it is never used.
Signed-off-by: Srishti Sharma <srishtishar@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Justin Skists [Wed, 6 Sep 2017 12:14:25 +0000 (13:14 +0100)]
staging/speakup: fix checkpatch.pl warning in speak_char()
correct the following warning from checkpatch.pl:-
WARNING: Prefer using '"%s...", __func__' to using 'speak_char', this
function's name, in a string
Signed-off-by: Justin Skists <j.skists@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Sankara Babu [Tue, 5 Sep 2017 12:52:20 +0000 (18:22 +0530)]
staging:rtl8188eu:core Fix code Indent
This patch is created to solve the code indentation issue
Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Sankara Babu [Tue, 5 Sep 2017 12:35:20 +0000 (18:05 +0530)]
staging:rtl8188eu Remove unneccessary parenthesis
This patch is creates in order to correct the coding style issues. It
removes the unwanted parenthesis from the code.
Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Sankara Babu [Tue, 5 Sep 2017 10:36:36 +0000 (16:06 +0530)]
staging:rtl8188eu Fix coding style issues
This patch aims to solve coding style issues by placing constants on the
right side of the test
Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Janani Sankara Babu [Tue, 5 Sep 2017 10:25:21 +0000 (15:55 +0530)]
staging:rtl8188eu Fix use __func__ for function name
This patch fixes the WARNING: Prefer using '"%s...", __func__' to using
this function's name, in a string
Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Tue, 5 Sep 2017 07:33:32 +0000 (09:33 +0200)]
staging: rts5208: fix gcc-8 logic error warning
As gcc-8 points out, the bit mask check makes no sense here:
drivers/staging/rts5208/sd.c: In function 'ext_sd_send_cmd_get_rsp':
drivers/staging/rts5208/sd.c:4130:25: error: bitwise comparison always evaluates to true [-Werror=tautological-compare]
However, the code is even more bogus, as we have already
checked for the SD_RSP_TYPE_R0 case earlier in the function
and returned success. As seen in the mmc/sd driver core,
SD_RSP_TYPE_R0 means "no response" anyway, so checking for
a particular response would not help either.
This just removes the nonsensical code to get rid of the
warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 5 Sep 2017 06:53:42 +0000 (16:53 +1000)]
staging: rtlwifi: fix parenthesis alignment
Checkpatch emits multiple warnings of type
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
Fix parenthesis alignment in line with checkpatch suggestion.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sat, 16 Sep 2017 22:47:51 +0000 (15:47 -0700)]
Linux 4.14-rc1
Linus Torvalds [Sat, 16 Sep 2017 19:08:10 +0000 (12:08 -0700)]
Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs
Pull UBI updates from Richard Weinberger:
"Minor improvements"
* tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs:
UBI: Fix two typos in comments
ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"
ubi: pr_err() strings should end with newlines
ubi: pr_err() strings should end with newlines
ubi: pr_err() strings should end with newlines
Linus Torvalds [Sat, 16 Sep 2017 19:03:25 +0000 (12:03 -0700)]
Merge branch 'for-linus-4.14-rc1' of git://git./linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger:
- minor improvements
- fixes for Debian's new gcc defaults (pie enabled by default)
- fixes for XSTATE/XSAVE to make UML work again on modern systems
* 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
um: return negative in tuntap_open_tramp()
um: remove a stray tab
um: Use relative modversions with LD_SCRIPT_DYN
um: link vmlinux with -no-pie
um: Fix CONFIG_GCOV for modules.
Fix minor typos and grammar in UML start_up help
um: defconfig: Cleanup from old Kconfig options
um: Fix FP register size for XSTATE/XSAVE
Linus Torvalds [Sat, 16 Sep 2017 18:28:59 +0000 (11:28 -0700)]
Merge git://git./linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger.
2) Fix double-free in rmnet driver, from Dan Carpenter.
3) INET connection socket layer can double put request sockets, fix
from Eric Dumazet.
4) Don't match collect metadata-mode tunnels if the device is down,
from Haishuang Yan.
5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in
be2net driver, from Suresh Reddy.
6) Fix scaling error in gen_estimator, from Eric Dumazet.
7) Fix 64-bit statistics deadlock in systemport driver, from Florian
Fainelli.
8) Fix use-after-free in sctp_sock_dump, from Xin Long.
9) Reject invalid BPF_END instructions in verifier, from Edward Cree.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
Documentation: link in networking docs
tcp: fix data delivery rate
bpf/verifier: reject BPF_ALU64|BPF_END
sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
sctp: fix an use-after-free issue in sctp_sock_dump
netvsc: increase default receive buffer size
tcp: update skb->skb_mstamp more carefully
net: ipv4: fix l3slave check for index returned in IP_PKTINFO
net: smsc911x: Quieten netif during suspend
net: systemport: Fix 64-bit stats deadlock
net: vrf: avoid gcc-4.6 warning
qed: remove unnecessary call to memset
tg3: clean up redundant initialization of tnapi
tls: make tls_sw_free_resources static
sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
MAINTAINERS: review Renesas DT bindings as well
net_sched: gen_estimator: fix scaling error in bytes/packets samples
nfp: wait for the NSP resource to appear on boot
nfp: wait for board state before talking to the NSP
...
Linus Torvalds [Sat, 16 Sep 2017 18:24:26 +0000 (11:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
Pull more input updates from Dmitry Torokhov:
"A second round of updates for the input subsystem:
- a new driver for PWM-controlled vibrators
- ucb1400 touchscreen driver had completely busted suspend/resume
handling
- we now handle "home" button found on some devices with Goodix
touchscreens
- assorted other fixups"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: i8042 - add Gigabyte P57 to the keyboard reset table
Input: xpad - validate USB endpoint type during probe
Input: ucb1400_ts - fix suspend and resume handling
Input: edt-ft5x06 - fix access to non-existing register
Input: elantech - make arrays debounce_packet static, reduces object code size
Input: surface3_spi - make const array header static, reduces object code size
Input: goodix - add support for capacitive home button
Input: add a driver for PWM controllable vibrators
Input: adi - make array seq static, reduces object code size
Markus Trippelsdorf [Sat, 16 Sep 2017 09:01:16 +0000 (11:01 +0200)]
firmware: Restore support for built-in firmware
Commit
5620a0d1aac ("firmware: delete in-kernel firmware") removed the
entire firmware directory. Unfortunately it thereby also removed the
support for built-in firmware.
This restores the ability to build firmware directly into the kernel by
pruning the original Makefile to the necessary minimum. The default for
EXTRA_FIRMWARE_DIR is now the standard directory /lib/firmware/.
Fixes:
5620a0d1aac ("firmware: delete in-kernel firmware")
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Acked-by: Greg K-H <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ido Schimmel [Fri, 15 Sep 2017 13:31:07 +0000 (15:31 +0200)]
mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
The driver doesn't support events from address families other than IPv4
and IPv6, so ignore them. Otherwise, we risk queueing a work item before
it's initialized.
This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES
is enabled, as the VRF driver will try to add an l3mdev rule for the
IPMR family.
Fixes:
65e65ec137f4 ("mlxsw: spectrum_router: Don't ignore IPv6 notifications")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Andreas Rammhold <andreas@rammhold.de>
Reported-by: Florian Klink <flokli@flokli.de>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Machek [Sat, 16 Sep 2017 14:28:02 +0000 (16:28 +0200)]
Documentation: link in networking docs
Fix link in filter.txt.
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 15 Sep 2017 23:47:42 +0000 (16:47 -0700)]
tcp: fix data delivery rate
Now skb->mstamp_skb is updated later, we also need to call
tcp_rate_skb_sent() after the update is done.
Fixes:
8c72c65b426b ("tcp: update skb->skb_mstamp more carefully")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Sat, 16 Sep 2017 03:43:33 +0000 (20:43 -0700)]
Merge branch '4.14-features' of git://git.linux-mips.org/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"This is the main pull request for 4.14 for MIPS; below a summary of
the non-merge commits:
CM:
- Rename mips_cm_base to mips_gcr_base
- Specify register size when generating accessors
- Use BIT/GENMASK for register fields, order & drop shifts
- Add cluster & block args to mips_cm_lock_other()
CPC:
- Use common CPS accessor generation macros
- Use BIT/GENMASK for register fields, order & drop shifts
- Introduce register modify (set/clear/change) accessors
- Use change_*, set_* & clear_* where appropriate
- Add CM/CPC 3.5 register definitions
- Use GlobalNumber macros rather than magic numbers
- Have asm/mips-cps.h include CM & CPC headers
- Cluster support for topology functions
- Detect CPUs in secondary clusters
CPS:
- Read GIC_VL_IDENT directly, not via irqchip driver
DMA:
- Consolidate coherent and non-coherent dma_alloc code
- Don't use dma_cache_sync to implement fd_cacheflush
FPU emulation / FP assist code:
- Another series of 14 commits fixing corner cases such as NaN
propgagation and other special input values.
- Zero bits 32-63 of the result for a CLASS.D instruction.
- Enhanced statics via debugfs
- Do not use bools for arithmetic. GCC 7.1 moans about this.
- Correct user fault_addr type
Generic MIPS:
- Enhancement of stack backtraces
- Cleanup from non-existing options
- Handle non word sized instructions when examining frame
- Fix detection and decoding of ADDIUSP instruction
- Fix decoding of SWSP16 instruction
- Refactor handling of stack pointer in get_frame_info
- Remove unreachable code from force_fcr31_sig()
- Convert to using %pOF instead of full_name
- Remove the R6000 support.
- Move FP code from *_switch.S to *_fpu.S
- Remove unused ST_OFF from r2300_switch.S
- Allow platform to specify multiple its.S files
- Add #includes to various files to ensure code builds reliable and
without warning..
- Remove __invalidate_kernel_vmap_range
- Remove plat_timer_setup
- Declare various variables & functions static
- Abstract CPU core & VP(E) ID access through accessor functions
- Store core & VP IDs in GlobalNumber-style variable
- Unify checks for sibling CPUs
- Add CPU cluster number accessors
- Prevent direct use of generic_defconfig
- Make CONFIG_MIPS_MT_SMP default y
- Add __ioread64_copy
- Remove unnecessary inclusions of linux/irqchip/mips-gic.h
GIC:
- Introduce asm/mips-gic.h with accessor functions
- Use new GIC accessor functions in mips-gic-timer
- Remove counter access functions from irq-mips-gic.c
- Remove gic_read_local_vp_id() from irq-mips-gic.c
- Simplify shared interrupt pending/mask reads in irq-mips-gic.c
- Simplify gic_local_irq_domain_map() in irq-mips-gic.c
- Drop gic_(re)set_mask() functions in irq-mips-gic.c
- Remove gic_set_polarity(), gic_set_trigger(), gic_set_dual_edge(),
gic_map_to_pin() and gic_map_to_vpe() from irq-mips-gic.c.
- Convert remaining shared reg access, local int mask access and
remaining local reg access to new accessors
- Move GIC_LOCAL_INT_* to asm/mips-gic.h
- Remove GIC_CPU_INT* macros from irq-mips-gic.c
- Move various definitions to the driver
- Remove gic_get_usm_range()
- Remove __gic_irq_dispatch() forward declaration
- Remove gic_init()
- Use mips_gic_present() in place of gic_present and remove
gic_present
- Move gic_get_c0_*_int() to asm/mips-gic.h
- Remove linux/irqchip/mips-gic.h
- Inline __gic_init()
- Inline gic_basic_init()
- Make pcpu_masks a per-cpu variable
- Use pcpu_masks to avoid reading GIC_SH_MASK*
- Clean up mti, reserved-cpu-vectors handling
- Use cpumask_first_and() in gic_set_affinity()
- Let the core set struct irq_common_data affinity
microMIPS:
- Fix microMIPS stack unwinding on big endian systems
MIPS-GIC:
- SYNC after enabling GIC region
NUMA:
- Remove the unused parent_node() macro
R6:
- Constify r2_decoder_tables
- Add accessor & bit definitions for GlobalNumber
SMP:
- Constify smp ops
- Allow boot_secondary SMP op to return errors
VDSO:
- Drop gic_get_usm_range() usage
- Avoid use of linux/irqchip/mips-gic.h
Platform changes:
Alchemy:
- Add devboard machine type to cpuinfo
- update cpu feature overrides
- Threaded carddetect irqs for devboards
AR7:
- allow NULL clock for clk_get_rate
BCM63xx:
- Fix ENETDMA_6345_MAXBURST_REG offset
- Allow NULL clock for clk_get_rate
CI20:
- Enable GPIO and RTC drivers in defconfig
- Add ethernet and fixed-regulator nodes to DTS
Generic platform:
- Move Boston and NI 169445 FIT image source to their own files
- Include asm/bootinfo.h for plat_fdt_relocated()
- Include asm/time.h for get_c0_*_int()
- Include asm/bootinfo.h for plat_fdt_relocated()
- Include asm/time.h for get_c0_*_int()
- Allow filtering enabled boards by requirements
- Don't explicitly disable CONFIG_USB_SUPPORT
- Bump default NR_CPUS to 16
JZ4700:
- Probe the jz4740-rtc driver from devicetree
Lantiq:
- Drop check of boot select from the spi-falcon driver.
- Drop check of boot select from the lantiq-flash MTD driver.
- Access boot cause register in the watchdog driver through regmap
- Add device tree binding documentation for the watchdog driver
- Add docs for the RCU DT bindings.
- Convert the fpi bus driver to a platform_driver
- Remove ltq_reset_cause() and ltq_boot_select(
- Switch to a proper reset driver
- Switch to a new drivers/soc GPHY driver
- Add an USB PHY driver for the Lantiq SoCs using the RCU module
- Use of_platform_default_populate instead of __dt_register_buses
- Enable MFD_SYSCON to be able to use it for the RCU MFD
- Replace ltq_boot_select() with dummy implementation.
Loongson 2F:
- Allow NULL clock for clk_get_rate
Malta:
- Use new GIC accessor functions
NI 169445:
- Add support for NI 169445 board.
- Only include in 32r2el kernels
Octeon:
- Add support for watchdog of 78XX SOCs.
- Add support for watchdog of CN68XX SOCs.
- Expose support for mips32r1, mips32r2 and mips64r1
- Enable more drivers in config file
- Add support for accessing the boot vector.
- Remove old boot vector code from watchdog driver
- Define watchdog registers for 70xx, 73xx, 78xx, F75xx.
- Make CSR functions node aware.
- Allow access to CIU3 IRQ domains.
- Misc cleanups in the watchdog driver
Omega2+:
- New board, add support and defconfig
Pistachio:
- Enable Root FS on NFS in defconfig
Ralink:
- Add Mediatek MT7628A SoC
- Allow NULL clock for clk_get_rate
- Explicitly request exclusive reset control in the pci-mt7620 PCI driver.
SEAD3:
- Only include in 32 bit kernels by default
VoCore:
- Add VoCore as a vendor t0 dt-bindings
- Add defconfig file"
* '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (167 commits)
MIPS: Refactor handling of stack pointer in get_frame_info
MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems
MIPS: microMIPS: Fix decoding of swsp16 instruction
MIPS: microMIPS: Fix decoding of addiusp instruction
MIPS: microMIPS: Fix detection of addiusp instruction
MIPS: Handle non word sized instructions when examining frame
MIPS: ralink: allow NULL clock for clk_get_rate
MIPS: Loongson 2F: allow NULL clock for clk_get_rate
MIPS: BCM63XX: allow NULL clock for clk_get_rate
MIPS: AR7: allow NULL clock for clk_get_rate
MIPS: BCM63XX: fix ENETDMA_6345_MAXBURST_REG offset
mips: Save all registers when saving the frame
MIPS: Add DWARF unwinding to assembly
MIPS: Make SAVE_SOME more standard
MIPS: Fix issues in backtraces
MIPS: jz4780: DTS: Probe the jz4740-rtc driver from devicetree
MIPS: Ci20: Enable RTC driver
watchdog: octeon-wdt: Add support for 78XX SOCs.
watchdog: octeon-wdt: Add support for cn68XX SOCs.
watchdog: octeon-wdt: File cleaning.
...
Linus Torvalds [Sat, 16 Sep 2017 03:25:06 +0000 (20:25 -0700)]
Merge tag 'pci-v4.14-fixes-1' of git://git./linux/kernel/git/helgaas/pci
Pull PCI fix from Bjorn Helgaas:
"Revert an attempt to fix a race while enabling upstream bridges
because it broke iwlwifi firmware loading"
* tag 'pci-v4.14-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
Revert "PCI: Avoid race while enabling upstream bridges"
Linus Torvalds [Sat, 16 Sep 2017 00:52:52 +0000 (17:52 -0700)]
Merge tag 'drm-fixes-for-v4.14-rc1' of git://people.freedesktop.org/~airlied/linux
Pull drm AMD fixes from Dave Airlie:
"Just had a single AMD fixes pull from Alex for rc1"
* tag 'drm-fixes-for-v4.14-rc1' of git://people.freedesktop.org/~airlied/linux:
drm/amdgpu: revert "fix deadlock of reservation between cs and gpu reset v2"
drm/amdgpu: remove duplicate return statement
drm/amdgpu: check memory allocation failure
drm/amd/amdgpu: fix BANK_SELECT on Vega10 (v2)
drm/amdgpu: inline amdgpu_ttm_do_bind again
drm/amdgpu: fix amdgpu_ttm_bind
drm/amdgpu: remove the GART copy hack
drm/ttm:fix wrong decoding of bo_count
drm/ttm: fix missing inc bo_count
drm/amdgpu: set sched_hw_submission higher for KIQ (v3)
drm/amdgpu: move default gart size setting into gmc modules
drm/amdgpu: refine default gart size
drm/amd/powerplay: ACG frequency added in PPTable
drm/amdgpu: discard commands of killed processes
drm/amdgpu: fix and cleanup shadow handling
drm/amdgpu: add automatic per asic settings for gart_size
drm/amdgpu/gfx8: fix spelling typo in mqd allocation
drm/amd/powerplay: unhalt mec after loading
drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately
drm/amdgpu: Fix huge page updates with CPU