* [PATCH] pinctrl: bcm: remove redundant assignment to pointer log
@ 2019-09-05 14:09 Colin King
2019-09-05 16:46 ` Ray Jui
2019-09-11 9:57 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-09-05 14:09 UTC (permalink / raw)
To: Linus Walleij, Ray Jui, Scott Branden, bcm-kernel-feedback-list,
linux-gpio, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer log is being initialized with a value that is never read
and is being re-assigned a little later on. The assignment is
redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c b/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
index 44df35942a43..dcab2204c60c 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
@@ -923,7 +923,6 @@ static int cygnus_mux_log_init(struct cygnus_pinctrl *pinctrl)
if (!pinctrl->mux_log)
return -ENOMEM;
- log = pinctrl->mux_log;
for (i = 0; i < CYGNUS_NUM_IOMUX_REGS; i++) {
for (j = 0; j < CYGNUS_NUM_MUX_PER_REG; j++) {
log = &pinctrl->mux_log[i * CYGNUS_NUM_MUX_PER_REG
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: bcm: remove redundant assignment to pointer log
2019-09-05 14:09 [PATCH] pinctrl: bcm: remove redundant assignment to pointer log Colin King
@ 2019-09-05 16:46 ` Ray Jui
2019-09-11 9:57 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Ray Jui @ 2019-09-05 16:46 UTC (permalink / raw)
To: Colin King, Linus Walleij, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, linux-gpio, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
On 9/5/19 7:09 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer log is being initialized with a value that is never read
> and is being re-assigned a little later on. The assignment is
> redundant and hence can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c b/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
> index 44df35942a43..dcab2204c60c 100644
> --- a/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
> +++ b/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
> @@ -923,7 +923,6 @@ static int cygnus_mux_log_init(struct cygnus_pinctrl *pinctrl)
> if (!pinctrl->mux_log)
> return -ENOMEM;
>
> - log = pinctrl->mux_log;
Yes, this indeed looks completely redundant.
> for (i = 0; i < CYGNUS_NUM_IOMUX_REGS; i++) {
> for (j = 0; j < CYGNUS_NUM_MUX_PER_REG; j++) {
> log = &pinctrl->mux_log[i * CYGNUS_NUM_MUX_PER_REG
>
Change looks good to me. Thanks!
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: bcm: remove redundant assignment to pointer log
2019-09-05 14:09 [PATCH] pinctrl: bcm: remove redundant assignment to pointer log Colin King
2019-09-05 16:46 ` Ray Jui
@ 2019-09-11 9:57 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2019-09-11 9:57 UTC (permalink / raw)
To: Colin King
Cc: Scott Branden, Ray Jui, kernel-janitors, linux-kernel,
open list:GPIO SUBSYSTEM, bcm-kernel-feedback-list, Linux ARM
On Thu, Sep 5, 2019 at 3:09 PM Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer log is being initialized with a value that is never read
> and is being re-assigned a little later on. The assignment is
> redundant and hence can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Patch applied.
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-11 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 14:09 [PATCH] pinctrl: bcm: remove redundant assignment to pointer log Colin King
2019-09-05 16:46 ` Ray Jui
2019-09-11 9:57 ` Linus Walleij
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).