linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: remove redundant assignment to variable is_empty
@ 2019-07-04 13:30 Colin King
  2019-07-04 15:55 ` Mark Greer
  2019-07-04 16:11 ` Vaibhav Agarwal
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-07-04 13:30 UTC (permalink / raw)
  To: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable is_empty is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/greybus/audio_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c
index c2a4af4c1d06..9b19ea9d3fa1 100644
--- a/drivers/staging/greybus/audio_manager.c
+++ b/drivers/staging/greybus/audio_manager.c
@@ -86,7 +86,7 @@ EXPORT_SYMBOL_GPL(gb_audio_manager_remove);
 void gb_audio_manager_remove_all(void)
 {
 	struct gb_audio_manager_module *module, *next;
-	int is_empty = 1;
+	int is_empty;
 
 	down_write(&modules_rwsem);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: greybus: remove redundant assignment to variable is_empty
  2019-07-04 13:30 [PATCH] staging: greybus: remove redundant assignment to variable is_empty Colin King
@ 2019-07-04 15:55 ` Mark Greer
  2019-07-04 16:11 ` Vaibhav Agarwal
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Greer @ 2019-07-04 15:55 UTC (permalink / raw)
  To: Colin King
  Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, devel, kernel-janitors,
	linux-kernel

On Thu, Jul 04, 2019 at 02:30:31PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable is_empty is being initialized with a value that is never
> read and it is being updated later with a new value. The
> initialization is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/staging/greybus/audio_manager.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c
> index c2a4af4c1d06..9b19ea9d3fa1 100644
> --- a/drivers/staging/greybus/audio_manager.c
> +++ b/drivers/staging/greybus/audio_manager.c
> @@ -86,7 +86,7 @@ EXPORT_SYMBOL_GPL(gb_audio_manager_remove);
>  void gb_audio_manager_remove_all(void)
>  {
>  	struct gb_audio_manager_module *module, *next;
> -	int is_empty = 1;
> +	int is_empty;
>  
>  	down_write(&modules_rwsem);

Reviewed-by: Mark Greer <mgreer@animalcreek.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: greybus: remove redundant assignment to variable is_empty
  2019-07-04 13:30 [PATCH] staging: greybus: remove redundant assignment to variable is_empty Colin King
  2019-07-04 15:55 ` Mark Greer
@ 2019-07-04 16:11 ` Vaibhav Agarwal
  1 sibling, 0 replies; 3+ messages in thread
From: Vaibhav Agarwal @ 2019-07-04 16:11 UTC (permalink / raw)
  To: Colin King
  Cc: Mark Greer, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
	greybus-dev, devel, kernel-janitors, linux-kernel

On Thu, Jul 4, 2019 at 7:00 PM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable is_empty is being initialized with a value that is never
> read and it is being updated later with a new value. The
> initialization is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/staging/greybus/audio_manager.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/greybus/audio_manager.c b/drivers/staging/greybus/audio_manager.c
> index c2a4af4c1d06..9b19ea9d3fa1 100644
> --- a/drivers/staging/greybus/audio_manager.c
> +++ b/drivers/staging/greybus/audio_manager.c
> @@ -86,7 +86,7 @@ EXPORT_SYMBOL_GPL(gb_audio_manager_remove);
>  void gb_audio_manager_remove_all(void)
>  {
>         struct gb_audio_manager_module *module, *next;
> -       int is_empty = 1;
> +       int is_empty;
>
>         down_write(&modules_rwsem);
>
> --
> 2.20.1
>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-04 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 13:30 [PATCH] staging: greybus: remove redundant assignment to variable is_empty Colin King
2019-07-04 15:55 ` Mark Greer
2019-07-04 16:11 ` Vaibhav Agarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).