mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Kill one superfluous variable and improve code readability
Corresponding to flashrom svn r489. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
parent
97d6b09209
commit
8b4f8e0453
@ -82,7 +82,6 @@ int read_memmapped(struct flashchip *flash, uint8_t *buf)
|
|||||||
|
|
||||||
struct flashchip *probe_flash(struct flashchip *first_flash, int force)
|
struct flashchip *probe_flash(struct flashchip *first_flash, int force)
|
||||||
{
|
{
|
||||||
volatile uint8_t *bios;
|
|
||||||
struct flashchip *flash;
|
struct flashchip *flash;
|
||||||
unsigned long base = 0, size;
|
unsigned long base = 0, size;
|
||||||
|
|
||||||
@ -114,7 +113,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
base = flashbase ? flashbase : (0xffffffff - size + 1);
|
base = flashbase ? flashbase : (0xffffffff - size + 1);
|
||||||
flash->virtual_memory = bios = physmap("flash chip", base, size);
|
flash->virtual_memory = physmap("flash chip", base, size);
|
||||||
|
|
||||||
if (force)
|
if (force)
|
||||||
break;
|
break;
|
||||||
@ -127,7 +126,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
notfound:
|
notfound:
|
||||||
physunmap((void *)bios, size);
|
physunmap((void *)flash->virtual_memory, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flash || !flash->name)
|
if (!flash || !flash->name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user