mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
staging: rtl8723bs: Cleanups for rtw_inc_and_chk_continual_io_error
There's a warning when using checkpatch.pl check rtw_io.c:
WARNING: Missing a blank line after declarations
146: FILE: drivers/staging/rtl8723bs/core/rtw_io.c:146:
int value = atomic_inc_return(&dvobj->continual_io_error);
if (value > MAX_CONTINUAL_IO_ERR)
The patch fixes it.
In addition, also rename 'value' variable to 'error_count' and drop
'ret' variable.
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241205021610.523528-1-zhaochenguang@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f9e7f3f962
commit
a99e5c8853
|
|
@ -141,12 +141,12 @@ int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapt
|
|||
*/
|
||||
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
|
||||
{
|
||||
int ret = false;
|
||||
int value = atomic_inc_return(&dvobj->continual_io_error);
|
||||
if (value > MAX_CONTINUAL_IO_ERR)
|
||||
ret = true;
|
||||
int error_count = atomic_inc_return(&dvobj->continual_io_error);
|
||||
|
||||
return ret;
|
||||
if (error_count > MAX_CONTINUAL_IO_ERR)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user