On 31/07/19 2:01 PM, Michal Simek wrote:
On 09. 07. 19 19:28, Nishka Dasgupta wrote:
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a goto from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before
On 26/07/19 4:15 PM, Mark Brown wrote:
On Fri, Jul 26, 2019 at 01:02:52PM +0530, Nishka Dasgupta wrote:
On 24/07/19 9:17 PM, Mark Brown wrote:
On Wed, Jul 24, 2019 at 02:02:31PM +0530, Nishka Dasgupta wrote:
The local variable search in regulator_of_get_init_node takes the value
returned
child is not put, which may cause a memory leak.
Hence create a new label, err_node_put, that puts child and then returns
the required value; edit the mid-loop return statements to instead go to
this new label.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Create
include the statement pm_runtime_disable() under
this label in order to avoid repetition among mid-loop return
conditions. Edit the mid-loop return statements to instead go to this
new label err_node_put.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/phy/qualcomm/phy-qcom
include the statement pm_runtime_disable() under
this label in order to avoid repetition among mid-loop return
conditions. Edit the mid-loop return statements to instead go to this
new label err_node_put.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
Changes in v3:
- Add version
Each iteration of for_each_available_child_of_node() puts the previous
node, but in the case of a goto from the middle of the loop, there is no
put, thus causing a memory leak. Hence add an of_node_put() before each
mid-loop goto.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
In function sysc_check_children, there is an if-statement checking
whether the value returned by function sysc_check_one_child is non-zero.
However, sysc_check_one_child always returns 0, and hence this check is
not needed. Hence remove this if-block.
Signed-off-by: Nishka Dasgupta
---
drivers
-off-by: Nishka Dasgupta
---
drivers/misc/sgi-xp/xpc_uv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
index 0c6de97dd347..89c4b04337d3 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a goto from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
goto.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a goto from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
goto.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/memory
modification.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
net/bluetooth/6lowpan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 9d41de1ec90f..bb55d92691b0 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net
.
Signed-off-by: Nishka Dasgupta
---
drivers/i2c/busses/i2c-stm32f7.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 266d1c269b83..d36cf08461f7 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers
Each iteration of for_each_child_of_node puts the previous node, but
in the case of a goto from the middle of the loop, there is no put,
thus causing a memory leak. Add an of_node_put before three such goto
statements.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/ata
Each iteration of for_each_child_of_node puts the previous node, but
in the case of a break from the middle of the loop, there is no put,
thus causing a memory leak. Add an of_node_put before the break.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/bus/arm-cci.c | 4
The static structures ht16k33_fb_fix and ht16k33_fb_var, of types
fb_fix_screeninfo and fb_var_screeninfo respectively, are not used
except to be copied into other variables. Hence make both of them
constant to prevent unintended modification.
Issue found with
Coccinelle.
Signed-off-by: Nishka
Remove unnecessary variable iram_tables and use its value directly.
Issue found using Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/media/tegra-vde/tegra-vde.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/tegra-vde/tegra-vde.c
Remove variable vpfe_dev and replace it with its value (since the
function otherwise uses values directly instead of local variables).
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/media/davinci_vpfe/vpfe_video.c | 6 ++
1 file changed, 2 insertions(+), 4
Remove variable runflags and use its value directly. Issue found with
checkpatch.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/comedi/comedi_fops.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c
b/drivers/staging/comedi
Delete r8712_init_mlme_priv as it does nothing except call
_init_mlme_priv, and rename _init_mlme_priv to
r8712_init_mlme_priv.
Change the type of the new r8712_init_mlme_priv (formerly _init_mlme_priv)
to (non-static) int, from static sint.
Signed-off-by: Nishka Dasgupta
---
drivers/staging
Remove function r8712_free_network_queue as it does nothing except call
_free_network_queue.
Rename _free_network_queue to r8712_free_network_queue (and change its
type to static) for continued use of the original functionality.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712
Remove function alloc_network as it does nothing except call
_r8712_alloc_network. Further, to maintain consistency with
the names of other functions, rename _r8712_alloc_network as
r8712_alloc_network.
Also change the corresponding calls to either function
accordingly.
Signed-off-by: Nishka
Remove leading p from the names of the following pointer variables:
- pregistrypriv
- pdev_network
- pie
- pbuf.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/ieee80211.c | 50 ++---
1 file changed, 25 insertions(+), 25 deletions
-by: Nishka Dasgupta
---
drivers/staging/rtl8712/rtl871x_cmd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c
b/drivers/staging/rtl8712/rtl871x_cmd.c
index 8220829b5c82..e408b15102ce 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
On 31/05/19 2:25 AM, Greg KH wrote:
On Fri, May 31, 2019 at 02:17:18AM +0530, Nishka Dasgupta wrote:
Remove variable vpfe_dev and replace it with its value (since the
function otherwise uses values directly instead of local variables).
This says _what_ you do. But we can see
On 31/05/19 3:55 PM, Ian Abbott wrote:
On 30/05/2019 21:51, Nishka Dasgupta wrote:
Remove variable runflags and use its value directly. Issue found with
checkpatch.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/comedi/comedi_fops.c | 8 ++--
1 file changed, 2 insertions(+), 6
Remove return variable bResult from function CARDbRadioPowerOff and
change the return type of the function to void as it always returns true
and the return value is never stored nor checked when called.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/vt6655
Each iteration of for_each_child_of_node puts the previous node, but
in the case of a return from the middle of the loop, there is no put,
thus causing a memory leak. Add an of_node_put before the return in
three places.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers
Each iteration of for_each_child_of_node puts the previous node, but in
the case of a return from the middle of the loop, there is no put, thus
causing a memory leak. Hence add an of_node_put before the return.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/net/dsa
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a return from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
return.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a return from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
return in two places.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a return from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
return in two places.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/regulator/of_regulator.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 397918ebba55..9112faa6a9a0 100644
--- a/drivers/regulator/of_regulator.c
From: Nishka Dasgupta
The variable retval is initialised to 0 and assigned a constant value
later. Both of these can be returned separately, hence retval can be
removed.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/pi433/pi433_if.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions
The variable retval is assigned constant values twice, and can therefore
be replaced by its values.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Add Wei Yongjun to the recipients list
- Fix From and Signed-off-by fields
drivers/staging/pi433/pi433_if.c | 5 ++---
1 file changed, 2
Remove variable frame_size as its multiple usages are all independent of
each other and so can be returned separately.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/most/usb/usb.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff
The initial value of return variable ret is never used, so it can be
removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/ks7010/ks_hostif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c
b/drivers
As the initial value of the return variable result is never used, it can
be removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/ks7010/ks7010_sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c
b
The initial value of return variable ret, -1, is never used and hence
can be removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/gdm724x/gdm_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/gdm724x/gdm_usb.c
b
found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/gdm724x/gdm_usb.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/gdm724x/gdm_usb.c
b/drivers/staging/gdm724x/gdm_usb.c
index d023f83f9097..8145ae2afba7 100644
--- a/drivers/staging
The local variable cd, used in multiple functions, is immediately passed
to another function call, whose result is returned. As that is the only
use of cd, it can be replaced with its variable.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/fieldbus/anybuss
On 24/05/19 12:22 PM, Greg KH wrote:
On Fri, May 24, 2019 at 11:26:02AM +0530, Nishka Dasgupta wrote:
As the initial value of the return variable result is never used, it can
be removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/ks7010/ks7010_sdio.c | 2
The initial value of return variable result is never used, so it can be
removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Fixed typo in commit message
- Clarified subject line to include filename
drivers/staging/ks7010/ks_hostif.c | 2 +-
1 file changed
As the initial value of the return variable result is never used, it can
be removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Clarified subject line
drivers/staging/ks7010/ks7010_sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
esult can be removed and its occurrences replaced with
ret.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/ks7010/ks_hostif.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c
b/drivers/staging/ks7010/ks_hostif.c
index 3775fd4b89ae..266
As the initial value of the return variable result is never used, it can
be removed.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
Changes in v3:
- Edited subject line and commit message
Changes in v2:
- Clarified subject line
drivers/staging/ks7010/ks7010_sdio.c | 2 +-
1
On 24/07/19 9:17 PM, Mark Brown wrote:
On Wed, Jul 24, 2019 at 02:02:31PM +0530, Nishka Dasgupta wrote:
The local variable search in regulator_of_get_init_node takes the value
returned by either of_get_child_by_name or of_node_get, both of which
get a node. If this node is not put before
On 25/07/19 5:45 PM, Lee Jones wrote:
On Tue, 09 Jul 2019, Nishka Dasgupta wrote:
Each iteration of for_each_child_of_node puts the previous node, but in
the case of a return from the middle of the loop, there is no put, thus
causing a memory leak. Hence add an of_node_put before the return
/type" or any other descriptive message. What
should I do?
On Fri, Jun 07, 2019 at 07:36:57PM +0530, Nishka Dasgupta wrote:
Change the return values of function r8712_setdatarate_cmd from _SUCCESS
and _FAIL to 0 and -ENOMEM respectively.
Change the return type of the function from
On 09/06/19 4:32 PM, Greg KH wrote:
On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
Remove variables that are declared and assigned values but not otherwise
used.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
On 10/06/19 11:19 AM, Greg KH wrote:
On Mon, Jun 10, 2019 at 10:08:21AM +0530, Nishka Dasgupta wrote:
On 09/06/19 4:32 PM, Greg KH wrote:
On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka Dasgupta wrote:
Remove variables that are declared and assigned values but not otherwise
used.
Issue found
On 10/06/19 12:55 PM, Greg KH wrote:
On Mon, Jun 10, 2019 at 12:44:05PM +0530, Nishka Dasgupta wrote:
On 10/06/19 11:19 AM, Greg KH wrote:
On Mon, Jun 10, 2019 at 10:08:21AM +0530, Nishka Dasgupta wrote:
On 09/06/19 4:32 PM, Greg KH wrote:
On Fri, Jun 07, 2019 at 12:41:23PM +0530, Nishka
On 31/07/19 7:51 PM, Michal Simek wrote:
On 31. 07. 19 15:06, Nishka Dasgupta wrote:
On 31/07/19 2:01 PM, Michal Simek wrote:
On 09. 07. 19 19:28, Nishka Dasgupta wrote:
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a goto from the middle
Remove return variable result and return the value directly.
Issue found using Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/octeon-usb/octeon-hcd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c
b/drivers/staging
Use macro DIV_ROUND_UP instead of an equivalent sequence of operations.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/kpc2000/kpc_dma/fileops.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c
b/drivers/staging/kpc2000
be changed to valid_sd_current_prior and valid_sd_speed_prior
respectively for greater clarity on the purpose of the functions.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rts5208/rtsx_chip.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging
Remove unnecessary variable last_evm in rtl8712_recv.c and use its value
directly.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/rtl8712_recv.c | 5 ++---
drivers/staging/rtl8712/rtl871x_cmd.c | 2 +-
2 files changed, 3 insertions(+), 4 deletions
The local return variable ret may be replaced directly by its value,
especially since its type (uint) is not the same as the function's
return type (int).
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++--
1 file changed, 2
Remove initialisations of multiple variables as these initial values are
never used.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/rtl871x_mp.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8712
As the function CARDbRadioPowerOff always returns true, and this value
does not appear to be used anywhere, the return variable can be entirely
removed and the function converted to type void.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/vt6655/card.c | 56
Each iteration of for_each_child_of_node puts the previous node, but in
the case of a return from the middle of the loop, there is no put, thus
causing a memory leak. Hence add an of_node_put before the return in
three places.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
Each iteration of for_each_child_of_node puts the previous node, but in
the case of a return from the middle of the loop, there is no put, thus
causing a memory leak. Hence add an of_node_put before the return in
two places.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a return from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
return in two places.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
through to the original label.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/soc/qcom/smp2p.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c
index c7300d54e444..d223e914487d 100644
On 08/08/19 5:57 PM, Mark Brown wrote:
On Thu, Aug 08, 2019 at 12:35:53PM +0530, Nishka Dasgupta wrote:
In function of_get_child_regulator(), the loop for_each_child_of_node()
contains two mid-loop return statements. Ordinarily the loop gets the
node child at the beginning of every iteration
On 08/08/19 7:25 PM, Roger Quadros wrote:
Nishka,
On 08/08/2019 10:40, Nishka Dasgupta wrote:
In function sysc_check_children, there is an if-statement checking
whether the value returned by function sysc_check_one_child is non-zero.
However, sysc_check_one_child always returns 0, and hence
On 13/08/19 11:55 AM, Roger Quadros wrote:
On 13/08/2019 07:35, Nishka Dasgupta wrote:
On 08/08/19 7:25 PM, Roger Quadros wrote:
Nishka,
On 08/08/2019 10:40, Nishka Dasgupta wrote:
In function sysc_check_children, there is an if-statement checking
whether the value returned by function
Change return type of function sysc_check_one_child() from int to void
as it always returns 0. Accordingly, at its callsite, delete the
variable that previously stored the return value.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Remove error variable entirely.
- Change return type
On 13/08/19 12:58 PM, Roger Quadros wrote:
On 13/08/2019 10:17, Nishka Dasgupta wrote:
Change return type of function sysc_check_one_child() from int to void
as it always returns 0. Accordingly, at its callsite, delete the
variable that previously stored the return value.
Signed-off
Change return type of function sysc_check_one_child() from int to void
as it always returns 0. Remove the now-unnecessary return statement as
well. Accordingly, at its call site, delete the error variable that
previously stored the return value.
Signed-off-by: Nishka Dasgupta
---
Changes in v3
Change return type of function sysc_check_children() from int to void as
it always returns 0. Remove its return statement as well.
At call site, remove the variable that was used to store the return
value, as well as the check on the return value.
Signed-off-by: Nishka Dasgupta
return blocks to instead go to this new label.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Submit this as a separate patch instead of updating a previous patch.
drivers/regulator/core.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/regulator
Change return type of functions sysc_check_one_child() and
sysc_check_children() from int to void as neither ever returns an error.
Modify call sites of both functions accordingly.
Signed-off-by: Nishka Dasgupta
---
Changes in v4:
- Merge into a single patch the two patches
to qca_proto is declared as constant. Therefore,
make qca_proto itself constant as well in order to protect it from
unintended modification.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/bluetooth/hci_qca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Remove the leading p from the following pointer variable names:
- padapter
- pusb_intf
- ppmappedfw
- praw
- pfwpriv
- pdvobj
- pregpriv
- pmappedfw (not in the same scope as ppmappedfw)
- ptmpchar
- ppayload
- ptx_desc
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers
Remove leading p from the following pointer variable names:
- padapter
- pmlmepriv
- precv_frame
- precvpriv
- pfree_recv_queue
- pattrib.
Issue found with Coccinelle
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/recv_linux.c | 50 ++--
1 file changed, 25
Remove leading 'p' from the names of the following pointer variables:
- pintfhdl
- pintf_hdl (renamed to intfhdl in keeping with the convention in other
functions)
- poption
- pops
- pintfpriv.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/usb_ops.c
Remove leading p from the names of the following pointer variables:
- padapter
- pxmitpriv
- pnetdev
- pxmitframe.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/xmit_linux.c | 50 ++--
1 file changed, 25 insertions(+), 25
Remove leading 'p' from the names of the following pointer variables:
- padapter
- precvbuf
- pintfhdl
- pregistrypriv
- precvpriv.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/usb_halinit.c | 288 +-
1 file
Remove variables that are declared and assigned values but not otherwise
used.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
Remove variables that are declared and initialised but never used.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
b/drivers
Remove local variable change_priority, as it takes the value of the
argument priority; as both of these variables are of type u8, priority
can be modified without changing the value of its copy at the call site.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging
Remove variable and use the values directly.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
b/drivers/staging
Remove the variables RegRATR and RegRRSR as they are never used after
initialisation and assignment.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/drivers/staging
Change return type of function rtw_os_recvbuf_resource_free to void as
its return value is never stored, checked or otherwise used.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/include/recv_osdep.h | 2 +-
drivers/staging/rtl8723bs/os_dep/recv_linux.c | 6 +-
2 files
Remove assignment of the return value of rtw_os_recv_resource_alloc as
this assignment at the call site is never used.
Remove return statement from rtw_os_recv_resource_alloc() as its return
variable is never used.
Change the type of the function to void.
Signed-off-by: Nishka Dasgupta
Remove return variables and return the values directly, as the functions
all return 0 in all cases.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git
is not necessary; the return value
itself can simply be passed into the conditional.)
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/rtl871x_cmd.c | 8
drivers/staging/rtl8712/rtl871x_cmd.h | 2 +-
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
3 files
will do.)
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++---
drivers/staging/rtl8712/rtl871x_cmd.h | 2 +-
drivers/staging/rtl8712/rtl871x_ioctl_set.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8712
Remove function rtw_free_network_nolock, as all it does is call
_rtw_free_network_nolock, and rename _rtw_free_network_nolock to
rtw_free_network_nolock.
Keep the new rtw_free_network_nolock a static function and remove the
old version from the header file.
Signed-off-by: Nishka Dasgupta
the type of the old
r8712_free_network_queue.
Signed-off-by: Nishka Dasgupta
---
Changes in v2:
- Amend commit message for accuracy.
drivers/staging/rtl8712/rtl871x_mlme.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c
b/drivers/staging
Remove initialisation of return variable as it is never used.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
b
Remove function rtw_free_network_nolock, as all it does is call
_rtw_free_network_nolock, and rename _rtw_free_network_nolock to
rtw_free_network_nolock.
Signed-off-by: Nishka Dasgupta
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions
92 matches
Mail list logo