Commit Graph

998632 Commits

Author SHA1 Message Date
Martin Kaiser 8a24201f82 staging: rtl8188eu: change bLeisurePs' type to bool
bLeisurePs is used as a boolean variable. Change its type from
u8 to bool.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210419201126.25633-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:42:23 +02:00
Fabio Aiuto 4ca91abbe4 staging: rtl8723bs: remove empty #ifdef block
remove #ifdef block left empty after DBG_871X_LEVEL
deletion.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c2600c9a71d4e222963cbc600b2e703fe2b1289f.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto 180b9f220a staging: rtl8723bs: remove unused DBG_871X_LEVEL macro declarations
remove unused DBG_871X_LEVEL macro declarations.

DBG_871X_LEVEL macro wraps a raw printk call which is not
recommended in a device driver context, prefer using
netdev_*() log functions.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ec371fd8a4e53b4730b45f0a1c9210106b2914f2.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto 98dc120895 staging: rtl8723bs: split too long line
fix the following post-commit hook checkpatch issue.

WARNING: line length of 103 exceeds 100 columns
30: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:711:
+
receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 0);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4e87fb741205b9f314aec739921405a7ebef908a.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto 5a94f5c842 staging: rtl8723bs: fix indentation in if block
fix following post-commit hook checkpatch issues:

WARNING: suspect code indent for conditional statements (32, 48)
323: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:708:
 				if (!ret) {
+
	netdev_dbg(padapter->pnetdev,

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7f548510ebe2427e85f3fe8b33ed937160c64e9f.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto 108b05a646 staging: rtl8723bs: fix code indent issue
fix following post-commit hook checkpatch issues:

ERROR: code indent should use tabs where possible
887: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1145:
+^I^I           "%s: ### ERROR #### driver in IPS
+		####ERROR###!!!\n",$

ERROR: code indent should use tabs where possible
888: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1146:
+^I^I           __func__);$

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2e0ba5214df41de7e46b8df4e62d2f38acea92ec.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Fabio Aiuto 79df841b43 staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*()
Replace DBG_871X_LEVEL logs with netdev_*() functions
where possible (i.e. where a pointer to netdev is easily
available).

This is not possible in correspondance of redundant
log in module initialization.

So remove those ones.

DBG_871X_LEVEL macro wraps a raw printk call which is not
recommended in a device driver context, prefer using
netdev_*() log functions.

The remove/replace operation has been done with the
following semantic patch script:

@@
expression list args;
identifier padapter;
identifier func;
symbol _drv_always_, _drv_info_, _drv_warning_;
symbol _drv_err_, _drv_emerg_;
@@

func(..., struct adapter *padapter, ...) {
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(padapter->pnetdev, args);
)
	...>
}

@rule@
identifier func, context, padapter;
@@

func(void *context)
{
	...
struct adapter *padapter = context;
	...
}

@@
expression list args;
identifier rule.padapter;
identifier rule.func, rule.context;
@@

func(void *context)
{
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(padapter->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(padapter->pnetdev, args);
)
	...>
}

@@
expression list args;
expression get_dev;
identifier func, dev;
@@

func(...)
{
	...
	struct net_device *dev = get_dev;
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(dev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(dev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(dev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(dev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(dev, args);
)
	...>
}

@@
expression list args;
identifier func, dev;
@@

func(struct net_device *dev)
{
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(dev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(dev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(dev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(dev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(dev, args);
)
	...>
}

@@
expression list args;
identifier func, dvobj;
@@

func(struct dvobj_priv *dvobj)
{
	<...
(
-	DBG_871X_LEVEL(_drv_always_, args);
+	netdev_dbg(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_info_, args);
+	netdev_info(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_warning_, args);
+	netdev_warn(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_err_, args);
+	netdev_err(dvobj->if1->pnetdev, args);
|
-	DBG_871X_LEVEL(_drv_emerg_, args);
+	netdev_emerg(dvobj->if1->pnetdev, args);
)
	...>
}

@@
@@

-	DBG_871X_LEVEL(...);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/4a02f9f5665fa4b78c0b321ce0cc62254255c9dd.1618480688.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:39:51 +02:00
Ian Kewish 5cc8364494 staging: rtl8192e: indent statement properly
Indent statement in an else branch.  Reported by checkpatch:
WARNING:SUSPECT_CODE_INDENT: suspect code indent for
conditional statements (8, 8)

Signed-off-by: Ian Kewish <iankewish@gmail.com>
Link: https://lore.kernel.org/r/20210415180645.65699-1-iankewish@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22 10:38:42 +02:00
Fabio M. De Francesco 71d3edc61e staging: rtl8723bs: Remove led_blink_hdl() and everything related
Removed useless led_blink_hdl() prototype and definition.
Removed struct LedBlink_param. Removed LedBlink entries in
rtw_cmd_callback[] and in wlancmds[]. Everything related to LedBlink is
not anymore needed. Index of slots changed in arrays comments to reflect
current positions.

Reported-by: Julia Lawall <julia.lawall@inria.fr>
Reported-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210415071731.25725-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-15 09:27:38 +02:00
Greg Kroah-Hartman 8ffdff6a8c staging: comedi: move out of staging directory
The comedi code came into the kernel back in 2008, but traces its
lifetime to much much earlier.  It's been polished and buffed and
there's really nothing preventing it from being part of the "real"
portion of the kernel.

So move it to drivers/comedi/ as it belongs there.

Many thanks to the hundreds of developers who did the work to make this
happen.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Link: https://lore.kernel.org/r/YHauop4u3sP6lz8j@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-15 09:26:25 +02:00
Bryan Brattlof 027ffa10b8 staging: rtl8723bs: remove sdio_drv_priv structure
The sdio_drv_priv structure is a small wrapper around sdio_driver in
linux/mmc/sdio_func.h with an added drv_registered integer.

drv_registered is never used anywhere in the driver and only assigned to
during the sdio registering and unregistering process. We can safely
remove sdio_drv_priv and use the sdio_driver structure directly.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210414173751.317762-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-15 09:26:00 +02:00
Fabio Aiuto 467d984209 staging: rtl8723bs: remove unused argument in function
removed unused 'void *sel' argument in rtw_odm_dbg_comp_msg()
function, after DBG_871X_SEL_NL replacement.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1bd83b936584432fdb09406f26ed8a8b66cd4c8d.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 20:54:40 +02:00
Fabio Aiuto ccbdd3fdf3 staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration
remove DBG_871X_SEL_NL obsolete macro declaration.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8839231b53881c8bf1f8a4d70953ec8acaa2fe95.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 20:54:40 +02:00
Fabio Aiuto 07d488b0c1 staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()
replace DGB_871X_SEL_NL macro with netdev_dbg().

DBG_871X_SEL_NL macro expands to a raw prink call or a
seq_printf if selected stream _is not_ a local
debug symbol set to null.
This second scenario never occurs so replace
all macro usages with netdev_dbg().

This is done with the following coccinelle script:

@@
expression sel;
expression list args;
identifier padapter;
identifier func;
@@

func(..., struct adapter *padapter, ...) {
	<...
-	DBG_871X_SEL_NL(sel, args);
+	netdev_dbg(padapter->pnetdev, args);
	...>
}

fix by hand one coccinelle output newline issue

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9d4597097d75a1900c65e4a15077eb0c8bce1c9b.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 20:54:40 +02:00
Fabio Aiuto d5c09ff069 staging: rtl8723bs: fix indentation issue introduced by long line split
fix indentation of last line in if condition.

Fixes: af6afdb63f (staging: rtl8723bs: split long lines)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210414081739.2990-1-fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:41:33 +02:00
Mitali Borkar c567fb9da3 staging: rtl8192e: removed multiple blank lines
Removed multiple blank lines to make code better and neater.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/2bfe551f152a611cc49a71a4984f41ef7ee69df5.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:55 +02:00
Mitali Borkar e3a8607981 staging: rtl8192e: remove unnecessary blank line after close brace
Removed an extra blank line after close brace '{' as it was not
necessary.
Reported by checkpatch

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/40f72a84750f402c342b4685e0a2f15d27875c9a.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:55 +02:00
Mitali Borkar c7dabf1a45 staging: rtl8192e: remove unnecessary blank line before brace
Removed an extra blank line before close brace as it was not necessary.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/cad6a7885f30dcfabaf1ccab1fd0644416fea194.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:55 +02:00
Mitali Borkar 3cc112a088 staging: rtl8192e: add spaces around binary operators
Added spaces around binary operators like '+', '*', '|', '-', '&',
to improve readability and to meet linux kernel coding style.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/28cbc4825fdfacf5d5ea8bb688a8bd6a1c65f059.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:30:54 +02:00
Fabio M. De Francesco f013209cbf staging: rtl8723bs: hal: Remove four set but not used variables
Removed four variables that were set but not used.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210414061346.11423-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:28:14 +02:00
Fabio Aiuto 77e14dfe53 staging: rtl8723bs: remove two unused functions
remove dump_drv_version() and dump_log_level() function
definitions and prototypes. Those functions are unused,
and add unnecessary wrap level to log calls.

They wrap DBG_871X_SEL_NL which will be replaced by
netdev_dbg() with coccinelle script application.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2e8dd88c053735daed95701140b2f03b4cfe2a2e.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:26:26 +02:00
Fabio Aiuto ee31d57e40 staging: rtl8723bs: remove unnecessary dump_drv_version() usage
remove unnecessary dump_drv_version() usage.

This prepares dump_drv_version() for removal, before
coccinelle script application.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9ce6559cac69eaebfdb07206921d14e99d2b1967.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:26:19 +02:00
Fabio Aiuto 69c3331aa0 staging: rtl8723bs: replace dump_drv_version() usage with netdev_dbg()
replace dump_drv_version() usage with netdev_dbg().

There's no need to further wrap a netdev_dbg() call
for such a low number of occurrences.

The string printed is the same contained in DBG_871X_SEL_NL macro
called inside dump_drv_version().

This is just preparation before bulk DBG_871X_SEL_NL macro
replacement by coccinelle, as the semantic patch that will be
used just replaces, doesn't remove.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a4df375dba6c004a22cf197ff8d498d0e4f3b52e.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:26:09 +02:00
Fabio M. De Francesco 3d7ac04029 staging: rtl8723bs: core: Remove unused but set variable
Removed "ledBlink_param" because it was set to the value of "pbuf" but was
never reused. This set was made by direct assignment (no helper had been
called), therefore it had no side effect to the location pointed by "pbuf".

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210413150517.12533-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:23:10 +02:00
Fabio M. De Francesco c3db59cfe1 staging: rtl8188eu: Move channel_table away from rtw_mlme_ext.h
Moved "static const struct channel_table[]" from include/rtw_mlme_ext.h
to core/rtw_ioctl_set.c because the latter is the only file that uses
that array of struct(s) in the whole driver. "make rtl8188eu/ W=1" output
several warnings about "'channel_table' defined but not used
[-Wunused-const-variable=]".

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210413102033.24781-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:21:19 +02:00
Mikko Talikka 174250f8d9 staging: comedi: adv_pci_dio: remove whitespace
Fixed checkpatch.pl warning:

CHECK: Blank lines aren't necessary before a close brace '}'
+
+               }

Signed-off-by: Mikko Talikka <mikko.talikka@live.com>
Link: https://lore.kernel.org/r/AM0PR01MB42597C4CAA1B9E51D4AE3D5E974F9@AM0PR01MB4259.eurprd01.prod.exchangelabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-14 10:21:00 +02:00
Tian Tao 07ff20cf17 staging: fieldbus: simplify devm_anybuss_host_common_probe
Use devm_add_action_or_reset() instead of devres_alloc() and
devres_add(), which works the same. This will simplify the
code. There is no functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1618275183-56792-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:53:41 +02:00
Mitali Borkar cc444aa522 staging: rtl8192e: remove unnecessary ftrace-like logging
Removed unncessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/460ba9cdd256bf1064c4e3a694caa046171cb60e.1618283232.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:52:26 +02:00
Bryan Brattlof 59bc0e634b staging: rtl8723bs: remove unnecessary adapter
The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv
structure but never used anywhere in the driver. This will remove all
definitions of if2

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210412172147.43509-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:48 +02:00
Beatriz Martins de Carvalho 1ec0ee058d staging: rtl8723bs: hal: Correct indentation
Correct random indentation to improve readability. This problem
was observed when working on other checkpatch reports in the
file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/68e91c54a3be0b57607101fa8b284c00bb7dff1a.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:33 +02:00
Beatriz Martins de Carvalho 8b7d276ea8 staging: rtl8723bs: hal: Remove extra blank line
Remove multiple blank lines to conform Linux kernel coding style.
Reported by checkpatch in file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/7f48b48d92b54c1f5db29f0d23c8c1c666236c43.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:33 +02:00
Beatriz Martins de Carvalho ac23a3cbcd staging: rtl8723bs: hal: remove space before tabs
Remove unnecessary space before tabs to conform with Linux kernel
coding style.
Reported by checkpatch in file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/9694aafb614bdcbb15fdea614502c1b31a534871.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:49:33 +02:00
Mitali Borkar c9d134a13b staging: vc04_services: TODO: rectify spelling mistake
Corrected the misspelled word.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/967c328610909bc010b0bb82a1f89b71a57fa7a3.1618223171.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:47:55 +02:00
Mitali Borkar 70bdf4cc49 staging: vc04_services: TODO: remove trailing whitespace
Removed trailing whitespace to adhere to linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/5a54a06bae846f1f037165c0c7ba7ffe5a55a4a8.1618223171.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-13 09:47:50 +02:00
Stefan Wahren f2f560e1bd staging: vchiq_core: split exit conditions
Some exit conditions are rather complex. So better split them up.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-11-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren fa80183c55 staging: vchiq_core: fix if alignments
This fixes the alignment of some if statements.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-10-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren a8def5034a staging: vchiq_core: introduce SLOT_QUEUE_INDEX_FROM_POS_MASKED
Define a macro which already masked the result of SLOT_QUEUE_INDEX_FROM_POS.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-9-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren 7a4da84ce8 staging: vchiq_core: use BITSET_WORD macro
Use this macro to make the index retrieval less opaque.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-8-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren 0e345d9773 staging: vchiq_core: improve readability of request_poll
Storing the index for poll services in a local var will increase the
readability of the second loop. Also we get the rid off the checkpatch
issue about the line ending with a square bracket.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-7-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren 63276d45ba staging: vchiq_core: introduce service skip
In case there is no service pointer provided, we can skip these polling.
Use a goto to reduce the indentation, which is necessary for the following
patches. Btw fix the brace alignment of the loops.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-6-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren b3582ed426 staging: vchiq_core: Exit early in 2 functions
Exit early allow us to reduce the indention in vchiq_open_service_internal()
and vchiq_set_service_option(). Btw we can avoid the multi-line assignments
of quota.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-5-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:22 +02:00
Stefan Wahren 32129ec093 staging: vchiq_core: Get the rid off curly braces around cases
Additional curly braces around cases are a bit harder to read. So
change the scope of service quota to get the rid off those braces.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-4-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:21 +02:00
Stefan Wahren e04e900830 staging: vchiq_core: Shorten var name for service quota
Readibility and following clean-ups will benefit from the shorter name.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:21 +02:00
Stefan Wahren acdb1d908f staging: vchiq_core: Simplify vchiq_send_remote_use*
There is no need for variable status. So drop it and improve readability.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:41:21 +02:00
Mitali Borkar 8333e5a958 staging: rts5208: remove unnecessary ftrace-like logging
Removed unnecessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YHMy457UGosfeaC0@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:40:13 +02:00
Fabio Aiuto 5a04ad1d1d staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c
fix following W=1 compiler issue:

drivers/staging/rtl8723bs/hal/sdio_halinit.c:
	In function '_ReadAdapterInfo8723BS':
drivers/staging/rtl8723bs/hal/sdio_halinit.c:1156:16:
warning: variable 'start' set but not used [-Wunused-but-set-variable]
1156 |  unsigned long start;
     |                ^~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ce1faa15052b519738656e11658dee93f9e91c29.1618145345.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:39:20 +02:00
Bryan Brattlof a2e2a05d5d staging: rtl8723bs: remove unnecessary goto jumps
The next instruction for both 'goto exit' jump statements is to
execute the exit jump instructions regardless. We can safely
remove all jump statements from __init rtw_drv_entry()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210411133625.38195-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:38:00 +02:00
Dmitrii Wolf 9e74999b1a Staging: rtl8192u: ieee80211: remove odd backslash.
This backslash should be deleted - looks like leftover and not needed.

Signed-off-by: Dmitrii Wolf <dev.dragon@bk.ru>
Link: https://lore.kernel.org/r/20210411120301.6549-1-dev.dragon@bk.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:47 +02:00
Fabio M. De Francesco 16ae2044e9 staging: rtl8723bs: Change controlling expressions
Change controlling expressions within 'if' statements: don't compare
with 'true'.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-5-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:15 +02:00
Fabio M. De Francesco 13c57439fe staging: rtl8723bs: include: Change the type of a variable
Change the type of fw_current_in_ps_mode from u8 to bool, because
it is used everywhere as a bool and, accordingly, it should be
declared as a bool.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-4-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 11:37:15 +02:00