Skip to content

Commit d288204

Browse files
committed
cxl/pci: Drop shadowed variable
0day reports that wait_for_media_ready() declares an @rc variable twice. >> drivers/cxl/pci.c:439:7: warning: Local variable 'rc' shadows outer variable [shadowVariable] int rc; ^ drivers/cxl/pci.c:431:6: note: Shadowed declaration int rc, i; ^ drivers/cxl/pci.c:439:7: note: Shadow variable int rc; ^ Cc: Randy Dunlap <rdunlap@infradead.org> Fixes: 523e594 ("cxl/pci: Implement wait for media active") Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> Link: https://lore.kernel.org/r/164944636936.455177.14136200464724208233.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent e8cf229 commit d288204

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/cxl/pci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ static int wait_for_media_ready(struct cxl_dev_state *cxlds)
436436

437437
for (i = mbox_ready_timeout; i; i--) {
438438
u32 temp;
439-
int rc;
440439

441440
rc = pci_read_config_dword(
442441
pdev, d + CXL_DVSEC_RANGE_SIZE_LOW(0), &temp);

0 commit comments

Comments
 (0)