Skip to content

Commit 92d26d1

Browse files
Zheng YongjunKalle Valo
authored andcommitted
drivers: bcma: remove set but not used variable addrh and sizeh
Fixes gcc '-Wunused-but-set-variable' warning: drivers/bcma/scan.c: In function 'bcma_erom_get_addr_desc': drivers/bcma/scan.c:219 warning: variable `addrh` and `sizeh` set but not used [-Wunused-but-set-variable] Signed-off-by: Zheng Yongjun <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 20e6421 commit 92d26d1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/bcma/scan.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ static s32 bcma_erom_get_mst_port(struct bcma_bus *bus, u32 __iomem **eromptr)
219219
static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr,
220220
u32 type, u8 port)
221221
{
222-
u32 addrl, addrh, sizeh = 0;
222+
u32 addrl;
223223
u32 size;
224224

225225
u32 ent = bcma_erom_get_ent(bus, eromptr);
@@ -233,14 +233,12 @@ static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr,
233233

234234
addrl = ent & SCAN_ADDR_ADDR;
235235
if (ent & SCAN_ADDR_AG32)
236-
addrh = bcma_erom_get_ent(bus, eromptr);
237-
else
238-
addrh = 0;
236+
bcma_erom_get_ent(bus, eromptr);
239237

240238
if ((ent & SCAN_ADDR_SZ) == SCAN_ADDR_SZ_SZD) {
241239
size = bcma_erom_get_ent(bus, eromptr);
242240
if (size & SCAN_SIZE_SG32)
243-
sizeh = bcma_erom_get_ent(bus, eromptr);
241+
bcma_erom_get_ent(bus, eromptr);
244242
}
245243

246244
return addrl;

0 commit comments

Comments
 (0)