[U-Boot] [PATCH 4/5] e1000: Export core EEPROM access functions for SPI support

Tabi Timur-B04825 B04825 at freescale.com
Tue Nov 1 16:22:09 CET 2011


On Tue, Oct 18, 2011 at 4:05 PM, Kyle Moffett <Kyle.D.Moffett at boeing.com> wrote:
> A followup patch will be adding a configurable feature to enable
> programming of E1000 EEPROMs from the command line or via the generic
> U-Boot SPI interface.
>
> In order for it to work it needs access to certain E1000-internal
> functions, so export those in the e1000.h header file.
>
> Signed-off-by: Kyle Moffett <Kyle.D.Moffett at boeing.com>
> Cc: Ben Warren <biggerbadderben at gmail.com>

This patches causes a ton of build warnings:

/home/b04825/vslick/bin/vsbuild -signal 39610 -command make -s -j 3
O=1022 && syncp 1022/u-boot.bin /tftpboot/timur/1022/
VSLICKERRORPATH=/home/b04825/git/u-boot.jerry
make -s -j 3 O=1022
Generating /home/b04825/git/u-boot.jerry/1022/include/generated/asm-offsets.h
e1000.c: In function 'e1000_raise_ee_clk':
e1000.c:155:2: warning: unused variable 'x'
e1000.c: In function 'e1000_lower_ee_clk':
e1000.c:172:2: warning: unused variable 'x'
e1000.c: In function 'e1000_shift_out_ee_bits':
e1000.c:208:3: warning: unused variable 'x'
e1000.c: In function 'e1000_standby_eeprom':
e1000.c:279:3: warning: unused variable 'x'
e1000.c:285:3: warning: unused variable 'x'
e1000.c:291:3: warning: unused variable 'x'
e1000.c:297:3: warning: unused variable 'x'
e1000.c:303:3: warning: unused variable 'x'
e1000.c:307:3: warning: unused variable 'x'
e1000.c: In function 'e1000_release_eeprom':
e1000.c:689:3: warning: unused variable 'x'
e1000.c:695:3: warning: unused variable 'x'
e1000.c: In function 'e1000_reset_hw':
e1000.c:1401:2: warning: unused variable 'x'
e1000.c:1428:3: warning: unused variable 'x'
e1000.c: In function 'e1000_init_hw':
e1000.c:1635:3: warning: unused variable 'x'
e1000.c:1647:3: warning: unused variable 'x'
e1000.c:1661:3: warning: unused variable 'x'
e1000.c: In function 'e1000_setup_fiber_link':
e1000.c:2029:2: warning: unused variable 'x'
e1000.c: In function 'e1000_config_collision_dist':
e1000.c:3235:2: warning: unused variable 'x'
e1000.c: In function 'e1000_raise_mdi_clk':
e1000.c:3960:2: warning: unused variable 'x'
e1000.c: In function 'e1000_lower_mdi_clk':
e1000.c:3977:2: warning: unused variable 'x'
e1000.c: In function 'e1000_shift_out_mdi_bits':
e1000.c:4020:3: warning: unused variable 'x'
e1000.c: In function 'e1000_shift_in_mdi_bits':
e1000.c:4059:2: warning: unused variable 'x'
e1000.c: In function 'e1000_phy_hw_reset':
e1000.c:4341:3: warning: unused variable 'x'
e1000.c:4349:3: warning: unused variable 'x'
e1000.c:4362:3: warning: unused variable 'x'
e1000.c:4366:3: warning: unused variable 'x'
e1000.c: In function 'e1000_configure_rx':
e1000.c:4991:3: warning: unused variable 'x'
e1000.c: In function 'e1000_transmit':
e1000.c:5049:2: warning: unused variable 'x'
e1000.c: In function 'e1000_initialize':
e1000.c:869:14: warning: 'checksum' may be used uninitialized in this function

The problem is this macro:

#define E1000_WRITE_FLUSH(a) \
       do { uint32_t x = E1000_READ_REG(a, STATUS); } while (0)

The 'x' is never used.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list