lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 01/36] tty: serdev: core: Remove unused variable 'dummy'
Date
No need to have a dummy variable here.

Fixes the following W=1 kernel build warning(s):

drivers/tty/serdev/core.c: In function ‘serdev_controller_remove’:
drivers/tty/serdev/core.c:791:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]

Cc: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/tty/serdev/core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index c5f0d936b003a..fecc28a73b3b2 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -788,13 +788,10 @@ static int serdev_remove_device(struct device *dev, void *data)
*/
void serdev_controller_remove(struct serdev_controller *ctrl)
{
- int dummy;
-
if (!ctrl)
return;

- dummy = device_for_each_child(&ctrl->dev, NULL,
- serdev_remove_device);
+ device_for_each_child(&ctrl->dev, NULL, serdev_remove_device);
pm_runtime_disable(&ctrl->dev);
device_del(&ctrl->dev);
}
--
2.25.1
\
 
 \ /
  Last update: 2020-11-04 20:37    [W:0.476 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site