Commit Graph

123 Commits

Author SHA1 Message Date
Manoj Sawai 3cea2b2154 Staging: ks7010: ks7010_stio.h: fixed coding style error
Fixed 2 coding style errors about trailing whitespaces.

Signed-off-by: Manoj Sawai <mas@iitkgp.ac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-06 10:20:03 +01:00
Yamanappagouda Patil f416e26457 staging: ks7010: fixed 'space prohibited after that *' erros.
Fixed checkpatch.pl errors related to "space prohibited after that '*'
or '&'" in ks_wlan_net.c file.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-06 10:20:03 +01:00
Yamanappagouda Patil fe49753069 staging: ks7010: Fixed 'missing blank line after declaration' warnings.
Fixed checkpatch.pl warnings 'Missing blank line after declaration'
in ks_wlan_net.c file.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-06 10:20:02 +01:00
Yamanappagouda Patil e0d648151d Staging: ks7010: Fixed {} brace warnings for single statement blocks.
Fixed checkpatch.pl warnings related to {} brace warnings for single
statement blocks.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29 21:57:14 +01:00
Punit Vara 81710951fb Staging: ks7010: Use preffered kernel types
Replace uint8_t, uint16_t and uint32_t with preferred kernel types
u8, u16 and u32 respectively suggested by checkpatch.pl

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16 08:23:23 +01:00
Punit Vara 835068d882 Staging: ks7010: Prefer using the BIT macro
Replace all occurences of (1<<x) by BIT(x) in the file
ks7010_sdio.h to get rid of checkpatch.pl "CHECK" output "Prefer
using BIT macro".

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 15:48:57 +01:00
Jiong Du c4b370efc7 staging: ks7010: add a blank line after declarations
Fixes checkpatch warning: Missing a blank line after declarations

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:19:37 +02:00
Jiong Du 091a3d58f0 staging: ks7010: split long line
Fixes checkpatch warning: line over 80 characters

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:19:37 +02:00
Jiong Du 5906d33c5f staging: ks7010: remove space before tab
Fixes checkpatch warning: space before tabs

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:19:37 +02:00
Jiong Du 84b8ae9fd5 staging: ks7010: fix complex macro error
Fixes checkpatch error: Macros with complex values should be enclosed in parentheses

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:19:37 +02:00
Jiong Du df86d641db staging: ks7010: fix spacing errors
Fixes checkpatch errors: spacing errors

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27 15:19:36 +02:00
Jiong Du 7b0f8525c3 staging: ks7010: Remove trailing whitespace
Fixes checkpatch error: tailing whitespace

Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:49 +02:00
Nick Rosbrook 20358d1384 staging: ks7010: ks7010_sdio.c: Fixing multiple assignments
Running checkpatch on ks7010_sdio.c shows two locations where
multiple assignment statements are used.

This patch modifies the assignments into single assignments.

Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:49 +02:00
Nick Rosbrook f3f2d351db staging: ks7010: Corrected a spelling mistake
This patch corrects the spelling of 'initialize' in ks7010_sdio.c.

The issue was found by checkpatch.

Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:49 +02:00
Nick Rosbrook 0966c75504 staging: ks7010: Add spaces around '*'
Added spaces around a '*' in ks7010_sdio.c. Issue found by checkpatch.

Signed-off-by: Nick Rosbrook <nrosbrook@mail.smcvt.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:49 +02:00
Wei Yongjun 0371fa4f6a staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields
Use setup_timer function instead of initializing timer with the function
and data fields

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:49 +02:00
Wei Yongjun 35092b6d9b staging: ks7010: convert list_for_each to entry variant
convert list_for_each() to list_for_each_entry() where
applicable.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:49 +02:00
Wei Yongjun 5e935b782a staging: ks7010: remove unused including <linux/version.h>
Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:59:48 +02:00
Sabitha George bd46a80110 staging: ks7010: Remove braces around single statement blocks
Fixes checkpatch warning: braces{} are not necessary for
single statment blocks

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 09:55:26 +02:00
Sabitha George ab1effc095 staging: ks7010: Add blank line after declarations
Fixes checkpatch.pl warning :Missing a blank line
after declarations

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 09:55:26 +02:00
Sabitha George acefb6450d staging: ks7010: Fixes warning :do not add new typedefs
Fixes checkpatch.pl warning: do not add new typedefs in
ks_wlan_net.c

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:39 +02:00
Sabitha George aa059b3093 staging: ks7010: Replace __attribute__(aligned(x)) with __aligned(x)
Fixes checkpatch.pl warning: __aligned(size) is preferred over
__attribute__((aligned(size)) in ks7010_sdio.h

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:38 +02:00
Sabitha George 96268418f9 staging: ks7010: Fixes error "foo * bar should be foo *bar"
Fixes checkpatch warning on ks_wlan_net.c:
foo * bar should be foo *bar

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:33 +02:00
Sabitha George 99a751c74b staging: ks7010: Replace asm/uaccess.h and asm/atomic.h
Replaces  inclusion of asm/uaccess.h with linux/uaccess.h
and asm/atomic.h with linux/atomic.h in ks_wlan_net.c

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:32 +02:00
Sabitha George 4ba165e76b staging: ks7010: use netdev_* instead of printk()
1. Fixes checkpatch warning on printk usage in ks_hostif.c
2. Dropped "ks_wlan" prefix from the messages
3. Removed the "Memory squeeze,dropping packet" messages

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:48 +02:00
Akshay Mariyanna 71a476e48d staging: ks7010: fix space related style issues in ks7010_sdio.c
This fixes the following checkpatch warnings:
WARNING: Unnecessary space before function pointer arguments
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Akshay Mariyanna <akmlkcc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:47 +02:00
Akshay Mariyanna 4fdaa0d700 staging: ks7010: fix indent style in ks7010_sdio.c
This patch fixes the following checkpatch error:
ERROR: code indent should use tabs where possible

Signed-off-by: Akshay Mariyanna <akmlkcc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:46 +02:00
Sabitha George 592c61165b staging: ks7010: Replace header files
This patch replaces inclusion of asm/atomic.h with linux/atomic.h and
asm/io.h with linux/io.h to fix checkpatch warning in ks_wlan.h

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:00 +02:00
Mihaela Muraru c44893aafb Staging: ks7010: Delete unnecessary return statement
This is a patch to ks_hostif.c file that fixes up a checkpatch.pl

WARNING: void function return statements are not generally useful.

The 'return' statement is not useful here, because it is not necessary to be
forced the exit of the function.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:59 +02:00
Mihaela Muraru 31a86a533a Staging: ks7010: __packed instedad of __attribute__((packed))
Fix a issue found by  checkpatch.pl tool:

"WARNING: __packed is preferred over __attribute__((packed))".

Replace  __attribute__((packed)) with __packed.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:59 +02:00
Ebru Akagunduz e33c759a1e staging: ks7010: remove unnecessary else statement
This patch removes else statement which is not
usefull after a return. Issue found by checkpatch.pl.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:58 +02:00
Pontus Fuchs 7a98abccd2 staging: ks7010: Use printk format specifier for MAC addresses
Convert to %pM instead of custom code.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:58 +02:00
Pontus Fuchs 0af454793a staging: ks7010: Remove unnecessary cast
sdio functions takes unsigned int as address. No need to cast.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:57 +02:00
Muraru Mihaela 6b750fac60 Staging: ks7010: fix brace coding style issue
This is a patch to the ks_wlan_net.c file that fixes up a brace coding
style warning found by checkpatch.pl tool, by deleting the unnecessary braces for single statement blocks.

Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:57 +02:00
Muraru Mihaela 697f9f7f84 Staging: ks7010: add blank line after declaration
This patch fixes a coding style WARNING:
Missing a blank line after declaration, found by checkpatch.pl.
By adding a blank line after declaration of a variable.

Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:56 +02:00
Philipp Hoefflin 3f64b35e33 staging: ks7010: fix checkpatch "space after #ifdef" error
Fix checkpatch "ERROR: exactly one space required after that #ifdef"
error in ks_hostif.c.

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:55 +02:00
Philipp Hoefflin 0157403e8a staging: ks7010: reformat makro ps_confirm_wait_inc()
Reformat the makro ps_confirm_wait_inc() to fix several checkpatch
errors and warnings:
  - ERROR: space required before the open brace '{'
  - ERROR: space required before the open parenthesis '('
  - ERROR: code indent should use tabs where possible
  - ERROR: space required after that close brace '}'
  - ERROR: space required before the open parenthesis '('
  - WARNING: line over 80 characters
  - WARNING: please, no spaces at the start of a line

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:54 +02:00
Philipp Hoefflin ec9d6dcefc staging: ks7010: use tabs for indentation
Fix all occurences of checkpatch "ERROR: code indent should use tabs
where possible" errors in ks_hostif.c.

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:54 +02:00
Philipp Hoefflin 6f88006826 staging: ks7010: fix "prohibited space" errors reported by checkpatch
Fix all occurences of the following checkpatch errors in ks_hostif.c:
  - ERROR: space prohibited after that '&' (ctx:WxW)
  - ERROR: space prohibited after that open parenthesis '('
  - ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:53 +02:00
Muraru Mihaela 6315bbdb59 Staging : ks7010 : Fix block comments warninig
Move final */ to a new line, to conform to
the kernel coding style for block comments.

Issue found by checkpatch.

Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:29:11 +02:00
Sergio Paracuellos 4433459a49 staging: ks7010: declare private functions static
Private functions in ks7010_sdio.c can be declared static.

Fixes sparse warnings 'was not declared. Should it be static?'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-28 11:33:52 +02:00
Matt Kilgore 2460563fb4 staging: ks7010: Use __packed over __attribute__((packed))
This replaces uses of __attribute__((packed)) with __packed, which is
recommended to be used over the direct __attribute__.  This patch then
includes <linux/compiler.h> as necessary to use __packed.

Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:03:58 +02:00
Sabitha George 9887b5e51f staging: ks7010: Fix warnings on printk() usage
This patch fixes the following warnings on ks7010_sdio.c
1. printk() should include KERN_ facility level
2. Prefer [subsystem eg: netdev]_err([subsystem]dev, ...
then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:03:58 +02:00
Georgiana Rodica Chelu 03806ab307 staging: ks7010: ks_wlan_net: Use netdev_info instead of printk
Pass the net_device structure to print_hif_event function
in order to use netdev_info instead of printk.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:03:57 +02:00
Georgiana Rodica Chelu c8be646105 staging: ks7010: ks_wlan_net: Use netdev_ instead of printk
The checkpatch.pl script found the following warning:

WARNING: printk() should include KERN_ facility level

After adding the KERN_ facility level to printk(), the script showed
another warning:

WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

The warning is similar for KERN_ERR and KERN_DEBUG. In conclusion,
use netdev_info(), netdev_err() or netdev_dbg() when there is
a netdev device.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:03:57 +02:00
Georgiana Rodica Chelu 7a4abee97f staging: ks7010: ks_wlan_net: Remove return statement from void function
Remove the return statement from the end of a void function
to clean up the code.

Issue found by checkpatch.pl script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:37:14 +02:00
Georgiana Rodica Chelu 55adb7bf5a staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value
Remove unneeded code in order to make clear
that the function returns 0(success) in all cases.

Done using returnvar.cocci script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 12:37:14 +02:00
Baoyou Xie e4e8d968a3 Staging: ks7010: remove unused function in ks_wlan_net.c
We get 1 warning when building kernel with W=1:
drivers/staging/ks7010/ks_wlan_net.c:3520:5: warning: no previous prototype for 'ks_wlan_reset' [-Wmissing-prototypes]

In fact, these functions are unused in
ks_wlan_net.c, but should be removed.

So this patch removes the unused function.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-23 19:00:59 +02:00
Johan Svensson d30924a032 staging: ks7010: add blank line after variable declarations
Fixes warnings found by checkpatch
Missing a blank line after declarations

Signed-off-by: Johan Svensson <johan.svensson692@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-23 14:14:01 +02:00
sayli karnik 7d359a847c staging: ks7010: Remove unnecessary variable used to store return value
This patch removes an unnecessary variable used to store return values
in order to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:48 +02:00