* [PATCH] ide: remove set but not used variable 'hwif'
@ 2019-10-26 1:57 Wang Hai
2020-01-20 13:39 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wang Hai @ 2019-10-26 1:57 UTC (permalink / raw)
To: davem, benh, paulus, mpe; +Cc: linux-ide, wanghai38, linuxppc-dev, linux-kernel
Fix the following gcc warning:
drivers/ide/pmac.c: In function pmac_ide_setup_device:
drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used
[-Wunused-but-set-variable]
Fixes: d58b0c39e32f ("powerpc/macio: Rework hotplug media bay support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
drivers/ide/pmac.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index b5647e3..ea0b064 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1019,7 +1019,6 @@ static int pmac_ide_setup_device(pmac_ide_hwif_t *pmif, struct ide_hw *hw)
struct device_node *np = pmif->node;
const int *bidp;
struct ide_host *host;
- ide_hwif_t *hwif;
struct ide_hw *hws[] = { hw };
struct ide_port_info d = pmac_port_info;
int rc;
@@ -1075,7 +1074,7 @@ static int pmac_ide_setup_device(pmac_ide_hwif_t *pmif, struct ide_hw *hw)
rc = -ENOMEM;
goto bail;
}
- hwif = pmif->hwif = host->ports[0];
+ pmif->hwif = host->ports[0];
if (on_media_bay(pmif)) {
/* Fixup bus ID for media bay */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ide: remove set but not used variable 'hwif'
2019-10-26 1:57 [PATCH] ide: remove set but not used variable 'hwif' Wang Hai
@ 2020-01-20 13:39 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-01-20 13:39 UTC (permalink / raw)
To: wanghai38; +Cc: linux-kernel, linux-ide, paulus, linuxppc-dev
From: Wang Hai <wanghai38@huawei.com>
Date: Sat, 26 Oct 2019 09:57:38 +0800
> Fix the following gcc warning:
>
> drivers/ide/pmac.c: In function pmac_ide_setup_device:
> drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used
> [-Wunused-but-set-variable]
>
> Fixes: d58b0c39e32f ("powerpc/macio: Rework hotplug media bay support")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-20 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 1:57 [PATCH] ide: remove set but not used variable 'hwif' Wang Hai
2020-01-20 13:39 ` David Miller
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).