24 Sep, 2016
2 commits
-
We get 2 warnings when building kernel with W=1:
drivers/staging/rtl8192u/r8192U_core.c:925:12: warning: no previous declaration for 'ieeerate2rtlrate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:958:12: warning: no previous declaration for 'rtl8192_rate2rate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:1322:11: warning: no previous declaration for 'rtl8192_IsWirelessBMode' [-Wmissing-declarations]In fact, these functions are unused in
r8192U_core.c, but should be removed.So this patch removes the unused functions.
Signed-off-by: Baoyou Xie
Signed-off-by: Greg Kroah-Hartman -
We get 5 warnings when building kernel with W=1:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:287:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:323:24: warning: no previous declaration for 'ieee80211_probe_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:643:24: warning: no previous declaration for 'ieee80211_authentication_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:981:24: warning: no previous declaration for 'ieee80211_association_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3094:24: warning: no previous declaration for 'ieee80211_disassociate_skb' [-Wmissing-declarations]In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.Signed-off-by: Baoyou Xie
Signed-off-by: Greg Kroah-Hartman
20 Sep, 2016
2 commits
-
Some type conversions like casting a pointer to a pointer of same type,
casting to the original type using addressof(&) operator etc. are not
needed. Therefore, remove them. Done using coccinelle:@@
type t;
t *p;
t a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)Signed-off-by: Bhumika Goyal
Signed-off-by: Greg Kroah-Hartman -
Fix the following warnings:
Symbolic permissions are not preferred. Consider using octal permissions.Signed-off-by: Xavier Roumegue
Signed-off-by: Greg Kroah-Hartman
12 Sep, 2016
1 commit
-
drivers/staging/rtl8192u/ieee80211/Makefile uses $(TOPDIR) to configure
an include directory, without defining this variable first. The path
which is configured is therefore "/drivers/net/wireless", which does not
seem to be the intended path.Remove the offending line.
Signed-off-by: Nicolas Iooss
Signed-off-by: Greg Kroah-Hartman
22 Aug, 2016
1 commit
-
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.staging/rtl8192u/r8192U_core.c:4150:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192u/r8192U_dm.c:646:50: error: comparison is always false due to limited range of data type [-Werror=type-limits]This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.Signed-off-by: Arnd Bergmann
Acked-by: Jes Sorensen
Signed-off-by: Greg Kroah-Hartman
15 Aug, 2016
1 commit
-
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman
19 Jun, 2016
13 commits
-
The semaphore 'rf_sem' in rtl8192u has no users, hence removing it.
Signed-off-by: Binoy Jayan
Signed-off-by: Greg Kroah-Hartman -
The semaphore 'scan_sem' in rtl8192u is a simple mutex, so it should
be written as one. Semaphores are going away in the future.Signed-off-by: Binoy Jayan
Signed-off-by: Greg Kroah-Hartman -
The semaphore 'wx_sem' in ieee80211_device is a simple mutex,
so it should be written as one. Semaphores are going away in the future.Signed-off-by: Binoy Jayan
Signed-off-by: Greg Kroah-Hartman -
The semaphore 'wx_sem' in r8192_priv is a simple mutex, so
it should be written as one. Semaphores are going away in the future.Signed-off-by: Binoy Jayan
Signed-off-by: Greg Kroah-Hartman -
Propagate errors from kzalloc and usb_control_msg and change the
return type of write_nic_dword from void to int.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
Propagate errors from kzalloc and usb_control_msg and change the
return type of write_nic_word from void to int.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
Propagate errors from kzalloc and usb_control_msg and change the
return type of write_nic_byte_E from void to int.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
Propagate errors from kzalloc and usb_control_msg and change the
return type of write_nic_byte from void to int.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
The call of rtl8192_read_eeprom_info may fail, therefore its return
value must be checked and propagated in the case of errorSigned-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
Propagate error from eprom_read and change the return type of
rtl8192_read_eeprom_info from void to int.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
The call of eprom_read may fail, therefore its return value must be
checkedSigned-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
Propagate error from eprom_r and change the return type of eprom_read
from u32 to int.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman -
The call of read_nic_word_E may fail, therefore its return value must be
checked and propagated in the case of error.Signed-off-by: Salah Triki
Signed-off-by: Greg Kroah-Hartman
21 May, 2016
1 commit
-
Pull staging and IIO driver updates from Greg KH:
"Here's the big staging and iio driver update for 4.7-rc1.I think we almost broke even with this release, only adding a few more
lines than we removed, which isn't bad overall given that there's a
bunch of new iio drivers added.The Lustre developers seem to have woken up from their sleep and have
been doing a great job in cleaning up the code and pruning unused or
old cruft, the filesystem is almost readable :)Other than that, just a lot of basic coding style cleanups in the
churn. All have been in linux-next for a while with no reported
issues"* tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
Staging: emxx_udc: emxx_udc: fixed coding style issue
staging/gdm724x: fix "alignment should match open parenthesis" issues
staging/gdm724x: Fix avoid CamelCase
staging: unisys: rename misleading var ii with frag
staging: unisys: visorhba: switch success handling to error handling
staging: unisys: visorhba: main path needs to flow down the left margin
staging: unisys: visorinput: handle_locking_key() simplifications
staging: unisys: visorhba: fail gracefully for thread creation failures
staging: unisys: visornic: comment restructuring and removing bad diction
staging: unisys: fix format string %Lx to %llx for u64
staging: unisys: remove unused struct members
staging: unisys: visorchannel: correct variable misspelling
staging: unisys: visorhba: replace functionlike macro with function
staging: dgnc: Need to check for NULL of ch
staging: dgnc: remove redundant condition check
staging: dgnc: fix 'line over 80 characters'
staging: dgnc: clean up the dgnc_get_modem_info()
staging: lustre: lnet: enable configuration per NI interface
staging: lustre: o2iblnd: properly set ibr_why
staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
...
05 May, 2016
2 commits
-
Replace all trans_start updates with netif_trans_update helper.
change was done via spatch:struct net_device *d;
@@
- d->trans_start = jiffies
+ netif_trans_update(d)Compile tested only.
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-xtensa@linux-xtensa.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: MPT-FusionLinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: linux-bluetooth@vger.kernel.org
Signed-off-by: Florian Westphal
Acked-by: Felipe Balbi
Acked-by: Mugunthan V N
Acked-by: Antonio Quartulli
Signed-off-by: David S. Miller -
a trans_start struct member exists twice:
- in struct net_device (legacy)
- in struct netdev_queueInstead of open-coding dev->trans_start usage to obtain the current
trans_start value, use dev_trans_start() instead.This is not exactly the same, as dev_trans_start also considers
the trans_start values of the netdev queues owned by the device
and provides the most recent one.For legacy devices this doesn't matter as dev_trans_start can cope
with netdev trans_start values of 0 (they are ignored).This is a prerequisite to eventual removal of dev->trans_start.
Cc: linux-rdma@vger.kernel.org
Signed-off-by: Florian Westphal
Signed-off-by: David S. Miller
30 Apr, 2016
5 commits
-
There's no net_device stashed in skb->cb, there's a net_device * there.
To make it *really* clear, also change the write of the dev pointer
into skb->cb from a memcpy() to an assignment.Fixes: 3fe563249374 ("staging: rtl8192u: r8192U_core.c: Cleaning up ...")
Signed-off-by: Ben Hutchings
Signed-off-by: Greg Kroah-Hartman -
When testing pointers, it is not necessary to explicitly compare to
NULL. Rewrite if condition as (!ptr) or (ptr) as suggested in
Documentation/CodingStyleSigned-off-by: Nicholas Sim
Signed-off-by: Greg Kroah-Hartman -
Add a blank line after function/struct/union/enum declarations for
readability, as suggested in Documentation/CodingStyleSigned-off-by: Nicholas Sim
Signed-off-by: Greg Kroah-Hartman -
Remove unneeded blank lines appearing after opening braces as suggested
by checkpatch.plSigned-off-by: Nicholas Sim
Signed-off-by: Greg Kroah-Hartman -
Remove unneeded blank lines occuring before closing braces
Signed-off-by: Nicholas Sim
Signed-off-by: Greg Kroah-Hartman
28 Mar, 2016
3 commits
-
This fixes a mis-spelled word in a few debug statements.
Signed-off-by: Nik Nyby
Signed-off-by: Greg Kroah-Hartman -
Remove unnecessary semicolon.This issue is found by coccinelle script.
Signed-off-by: Sandhya Bankar
Signed-off-by: Greg Kroah-Hartman -
This patch removes blank lines in r8192U_wx.c that were flagged by
checkpatch.plSigned-off-by: Ben Marsh
Signed-off-by: Greg Kroah-Hartman
18 Mar, 2016
1 commit
-
Pull staging driver updates from Greg KH:
"Here is the big staging driver pull request for 4.6-rc1.Lots of little things here, over 1600 patches or so. Notable is all
of the good Lustre work happening, those developers have finally woken
up and are cleaning up their code greatly. The Outreachy intern
application process is also happening, which brought in another 400 or
so patches. Full details are in the very long shortlog.All of these have been in linux-next with no reported issues"
* tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1673 commits)
staging: lustre: fix aligments in lnet selftest
staging: lustre: report minimum of two buffers for LNet selftest load test
staging: lustre: test for proper errno code in lstcon_rpc_trans_abort
staging: lustre: filter remaining extra spacing for lnet selftest
staging: lustre: remove extra spacing when setting variable for lnet selftest
staging: lustre: remove extra spacing of variable declartions for lnet selftest
staging: lustre: fix spacing issues checkpatch reported in lnet selftest
staging: lustre: remove returns in void function for lnet selftest
staging: lustre: fix bogus lst errors for lnet selftest
staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc
staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc
staging: android: ion: fix up file mode
staging: ion: debugfs invalid gfp mask
staging: rts5208: Replace pci_enable_device with pcim_enable_device
Staging: ieee80211: Place constant on right side of the test.
staging: speakup: Replace del_timer with del_timer_sync
staging: lowmemorykiller: fix 2 checks that checkpatch complained
staging: mt29f_spinand: Drop void pointer cast
staging: rdma: hfi1: file_ops: Replace ALIGN with PAGE_ALIGN
staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED
...
12 Mar, 2016
8 commits
-
Place constant on right side of the test.
Signed-off-by: Sandhya Bankar
Signed-off-by: Greg Kroah-Hartman -
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
s1Signed-off-by: Bhaktipriya Shridhar
Signed-off-by: Greg Kroah-Hartman -
The macro random_ether_addr is calling the function eth_random_addr.
Therefore, the call to random_ether_addr can be replaced with
eth_random_addr.
Remove the wrapper function ieee80211_randomize_cell and replace its
call with eth_random_addr as it is wrapping random_ether_addr.
Done using coccinelle:@@
expression addr;
@@
- random_ether_addr(addr);
+ eth_random_addr(addr);Signed-off-by: Bhumika Goyal
Signed-off-by: Greg Kroah-Hartman -
Use eth_broadcast_addr to assign the broadcast address to the given
address array instead of memset when the second argument is a broacast
address 0xff. ETH_ALEN is a macro with value 6, so 6 is treated as
ETH_ALEN if it is the third argument of memset.Done using coccinelle.
@@
expression e;
@@
- memset(e,\(0xff\|0xFF\|255\),\(ETH_ALEN\|6\));
+ eth_broadcast_addr(e);Signed-off-by: Bhumika Goyal
Signed-off-by: Greg Kroah-Hartman -
The pointer *skb2 is declared 'globally' inside ifdef NOT_YET.
It's used nowhere in the directory.
Another pointer *skb2 is declared 'locally', again inside another ifdef NOT_YET
in the function ieee80211_rx_frame_mgmt.
Hence, skb2 stays unused and has been removed.This was done using Coccinelle:
@@ type T; identifier i; constant c; @@
-T i;Signed-off-by: Bhaktipriya Shridhar
Signed-off-by: Greg Kroah-Hartman -
As kmalloc generates a backtrace on failure so there is no need of
these debug messages when kmalloc fails. Also remove unwanted {} around if
block after removal of these messages.Signed-off-by: Bhumika Goyal
Signed-off-by: Greg Kroah-Hartman -
Some functions return Null as their return value on failure. !x is
generally preferred over x==NULL or NULL==x. So make use of !x if
the value returned on failure is NULL.
Done using coccinelle:
@@
expression e;
statement S;
@@
e = \(kmalloc\|devm_kzalloc\|kmalloc_array
\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...);
- if(e==NULL)
+ if(!e)
SSigned-off-by: Bhumika Goyal
Signed-off-by: Greg Kroah-Hartman -
Removed initialisation of a varible if it is immediately reassigned.
Changes were made using Coccinelle.
@bad@
identifier i;
position p;
@@i =@p ;
@@
type T;
constant C;
expression e;
identifier i;
position p != bad.p;
@@
T i
- = C
;
i =@p e;Signed-off-by: Bhaktipriya Shridhar
Signed-off-by: Greg Kroah-Hartman