Skip to content

Commit a678164

Browse files
maciej-w-rozyckiKAGA-KOKO
authored andcommitted
x86/EISA: Dereference memory directly instead of using readl()
Sparse expect an __iomem pointer, but after converting the EISA probe to memremap() the pointer is a regular memory pointer. Access it directly instead. [ tglx: Converted it to fix the already applied version ] Fixes: 80a4da0 ("x86/EISA: Use memremap() to probe for the EISA BIOS signature") Signed-off-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent cc5e03f commit a678164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/eisa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
static __init int eisa_bus_probe(void)
1313
{
14-
void *p;
14+
u32 *p;
1515

1616
if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
1717
return 0;
1818

1919
p = memremap(0x0FFFD9, 4, MEMREMAP_WB);
20-
if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
20+
if (p && *p == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
2121
EISA_bus = 1;
2222
memunmap(p);
2323
return 0;

0 commit comments

Comments
 (0)