linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Li Yang <leoyang.li@nxp.com>
To: Roy Pledge <Roy.Pledge@nxp.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Lee Jones <lee.jones@linaro.org>,
	YueHaibing <yuehaibing@huawei.com>,
	lkml <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 25/25] soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq'
Date: Mon, 23 Nov 2020 18:49:53 -0600	[thread overview]
Message-ID: <CADRPPNTguTHuRVhB_4QmN4N3Jorqi8y0gzm4Ew9D=qOuXqu=4g@mail.gmail.com> (raw)
In-Reply-To: <20201103152838.1290217-26-lee.jones@linaro.org>

Hi Roy,

On Tue, Nov 3, 2020 at 9:31 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/soc/fsl/qbman/qman.c: In function ‘qman_shutdown_fq’:
>  drivers/soc/fsl/qbman/qman.c:2700:8: warning: variable ‘dequeue_wq’ set but not used [-Wunused-but-set-variable]
>
> Cc: Li Yang <leoyang.li@nxp.com>
> Cc: YueHaibing <yuehaibing@huawei.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/soc/fsl/qbman/qman.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
> index 9888a70618730..62b182c3a8b04 100644
> --- a/drivers/soc/fsl/qbman/qman.c
> +++ b/drivers/soc/fsl/qbman/qman.c
> @@ -2622,7 +2622,7 @@ int qman_shutdown_fq(u32 fqid)
>         union qm_mc_command *mcc;
>         union qm_mc_result *mcr;
>         int orl_empty, drain = 0, ret = 0;
> -       u32 channel, wq, res;
> +       u32 channel, res;
>         u8 state;
>
>         p = get_affine_portal();
> @@ -2655,7 +2655,7 @@ int qman_shutdown_fq(u32 fqid)
>         DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ);
>         /* Need to store these since the MCR gets reused */
>         channel = qm_fqd_get_chan(&mcr->queryfq.fqd);
> -       wq = qm_fqd_get_wq(&mcr->queryfq.fqd);
> +       qm_fqd_get_wq(&mcr->queryfq.fqd);

This probably is not needed also.

>
>         if (channel < qm_channel_pool1) {
>                 channel_portal = get_portal_for_channel(channel);
> @@ -2697,7 +2697,6 @@ int qman_shutdown_fq(u32 fqid)
>                          * to dequeue from the channel the FQ is scheduled on
>                          */
>                         int found_fqrn = 0;
> -                       u16 dequeue_wq = 0;
>
>                         /* Flag that we need to drain FQ */
>                         drain = 1;
> @@ -2705,11 +2704,8 @@ int qman_shutdown_fq(u32 fqid)
>                         if (channel >= qm_channel_pool1 &&
>                             channel < qm_channel_pool1 + 15) {
>                                 /* Pool channel, enable the bit in the portal */
> -                               dequeue_wq = (channel -
> -                                             qm_channel_pool1 + 1)<<4 | wq;
>                         } else if (channel < qm_channel_pool1) {
>                                 /* Dedicated channel */
> -                               dequeue_wq = wq;

With these gone, these if statements seem to be redundant.  Can you
propose an additional patch to further cleanup the code here?  Thanks.

>                         } else {
>                                 dev_err(dev, "Can't recover FQ 0x%x, ch: 0x%x",
>                                         fqid, channel);
> --
> 2.25.1
>

  reply	other threads:[~2020-11-24  0:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 15:28 [PATCH 00/25] Rid W=1 warnings in SoC Lee Jones
2020-11-03 15:28 ` [PATCH 04/25] soc: fsl: dpio: qbman-portal: Fix a bunch of kernel-doc misdemeanours Lee Jones
2020-11-03 15:28 ` [PATCH 11/25] soc: fsl: qe: qe_common: Fix misnamed function attribute 'addr' Lee Jones
2020-11-12 10:33   ` Lee Jones
2020-11-12 23:12     ` Leo Li
2020-11-13  7:15       ` Lee Jones
2020-11-03 15:28 ` [PATCH 25/25] soc: fsl: qbman: qman: Remove unused variable 'dequeue_wq' Lee Jones
2020-11-24  0:49   ` Li Yang [this message]
2020-11-11  5:25 ` [PATCH 00/25] Rid W=1 warnings in SoC Bjorn Andersson
2020-11-12 11:16 ` Heiko Stuebner
2020-11-24  0:44 ` Li Yang

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='CADRPPNTguTHuRVhB_4QmN4N3Jorqi8y0gzm4Ew9D=qOuXqu=4g@mail.gmail.com' \
    --to=leoyang.li@nxp.com \
    --cc=Roy.Pledge@nxp.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --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;
as well as URLs for NNTP newsgroup(s).