1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

Fix some of the issues reported by LLVM/clang's scan-build

Corresponding to flashrom svn r722.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>

This commit fixes only some of the issues, those that were
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Reinauer
2009-09-16 08:18:08 +00:00
committed by Stefan Reinauer
parent b08ee5c506
commit 9e72aa51a7
4 changed files with 20 additions and 27 deletions

View File

@ -30,28 +30,24 @@
static void protect_28sf040(chipaddr bios)
{
uint8_t tmp;
tmp = chip_readb(bios + 0x1823);
tmp = chip_readb(bios + 0x1820);
tmp = chip_readb(bios + 0x1822);
tmp = chip_readb(bios + 0x0418);
tmp = chip_readb(bios + 0x041B);
tmp = chip_readb(bios + 0x0419);
tmp = chip_readb(bios + 0x040A);
chip_readb(bios + 0x1823);
chip_readb(bios + 0x1820);
chip_readb(bios + 0x1822);
chip_readb(bios + 0x0418);
chip_readb(bios + 0x041B);
chip_readb(bios + 0x0419);
chip_readb(bios + 0x040A);
}
static void unprotect_28sf040(chipaddr bios)
{
uint8_t tmp;
tmp = chip_readb(bios + 0x1823);
tmp = chip_readb(bios + 0x1820);
tmp = chip_readb(bios + 0x1822);
tmp = chip_readb(bios + 0x0418);
tmp = chip_readb(bios + 0x041B);
tmp = chip_readb(bios + 0x0419);
tmp = chip_readb(bios + 0x041A);
chip_readb(bios + 0x1823);
chip_readb(bios + 0x1820);
chip_readb(bios + 0x1822);
chip_readb(bios + 0x0418);
chip_readb(bios + 0x041B);
chip_readb(bios + 0x0419);
chip_readb(bios + 0x041A);
}
static int erase_sector_28sf040(struct flashchip *flash, unsigned long address, int sector_size)