From: Matthias Brugger <matthias.bgg@gmail.com>
To: YueHaibing <yuehaibing@huawei.com>,
sean.wang@kernel.org, linus.walleij@linaro.org,
light.hsieh@mediatek.com
Cc: linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-arm-kernel@listd.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] pinctrl: mediatek: remove set but not used variable 'e'
Date: Tue, 18 Feb 2020 17:27:57 +0100 [thread overview]
Message-ID: <87f87073-6f0c-0b54-2f77-eaab1147eb28@gmail.com> (raw)
In-Reply-To: <20200218023625.14324-1-yuehaibing@huawei.com>
On 18/02/2020 03:36, YueHaibing wrote:
> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c: In function mtk_hw_pin_field_lookup:
> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:70:39: warning:
> variable e set but not used [-Wunused-but-set-variable]
>
> Since commit 3de7deefce69 ("pinctrl: mediatek: Check gpio pin
> number and use binary search in mtk_hw_pin_field_lookup()"),
> it is not used any more, so remove it, also remove redundant
> assignment to variable c, it will be assigned a new value later
> before used.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> index 1da9425..d3169a8 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> @@ -67,7 +67,7 @@ static int mtk_hw_pin_field_lookup(struct mtk_pinctrl *hw,
> const struct mtk_pin_desc *desc,
> int field, struct mtk_pin_field *pfd)
> {
> - const struct mtk_pin_field_calc *c, *e;
> + const struct mtk_pin_field_calc *c;
> const struct mtk_pin_reg_calc *rc;
> int start = 0, end, check;
> bool found = false;
> @@ -82,8 +82,6 @@ static int mtk_hw_pin_field_lookup(struct mtk_pinctrl *hw,
> }
>
> end = rc->nranges - 1;
> - c = rc->range;
> - e = c + rc->nranges;
>
> while (start <= end) {
> check = (start + end) >> 1;
>
next prev parent reply other threads:[~2020-02-18 16:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 2:36 [PATCH -next] pinctrl: mediatek: remove set but not used variable 'e' YueHaibing
2020-02-18 16:27 ` Matthias Brugger [this message]
2020-02-20 15:14 ` Linus Walleij
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=87f87073-6f0c-0b54-2f77-eaab1147eb28@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=light.hsieh@mediatek.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@listd.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=sean.wang@kernel.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).