public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: nsaenzjulienne@suse.de, gregkh@linuxfoundation.org,
	wahrenst@gmx.net, jamal.k.shareef@gmail.com,
	marcgonzalez@google.com, nishkadg.linux@gmail.com,
	nachukannan@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -next] staging: vc04_services: remove set but unused variable 'local_entity_uc'
Date: Tue, 11 Feb 2020 17:24:33 +0300	[thread overview]
Message-ID: <20200211142433.GG1778@kadam> (raw)
In-Reply-To: <20200211134356.59904-1-yuehaibing@huawei.com>

On Tue, Feb 11, 2020 at 09:43:56PM +0800, YueHaibing wrote:
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: In function vchiq_use_internal:
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2346:16:
>  warning: variable local_entity_uc set but not used [-Wunused-but-set-variable]
> 
> commit bd8aa2850f00 ("staging: vc04_services: Get of even more suspend/resume states")
> left behind this unused variable.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index c456ced..d30d24d 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -2343,7 +2343,7 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service,
>  	enum vchiq_status ret = VCHIQ_SUCCESS;
>  	char entity[16];
>  	int *entity_uc;
> -	int local_uc, local_entity_uc;
> +	int local_uc;
>  
>  	if (!arm_state)
>  		goto out;
> @@ -2367,7 +2367,6 @@ vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service,
>  
>  	write_lock_bh(&arm_state->susp_res_lock);
>  	local_uc = ++arm_state->videocore_use_count;
> -	local_entity_uc = ++(*entity_uc);
                          ^^
This ++ is required.

regards,
dan carpenter


  reply	other threads:[~2020-02-11 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 13:43 [PATCH -next] staging: vc04_services: remove set but unused variable 'local_entity_uc' YueHaibing
2020-02-11 14:24 ` Dan Carpenter [this message]
2020-02-11 14:28   ` Yuehaibing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200211142433.GG1778@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jamal.k.shareef@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=marcgonzalez@google.com \
    --cc=nachukannan@gmail.com \
    --cc=nishkadg.linux@gmail.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=wahrenst@gmx.net \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox