[U-Boot] [PATCH 01/23] net: cosmetic: Change IPaddr_t to struct in_addr

Simon Glass sjg at chromium.org
Wed Apr 8 03:26:55 CEST 2015


Hi Joe,

On 3 April 2015 at 15:14, Joe Hershberger <joe.hershberger at ni.com> wrote:
> This patch is simply clean-up to make the IPv4 type that is used match
> what Linux uses. It also attempts to move all variables that are IP
> addresses use good naming instead of CamelCase. No functional change.
>
> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
> ---

I see the following breakage on this patch (my build is incomplete,
but it looks like it is just one problem in cmd_net.c).

02: net: cosmetic: Change IPaddr_t to struct in_addr
      mips:  +   qemu_mips64el qemu_mips64
  blackfin:  +   bf561-acvilon cm-bf561 bct-brettl2 cm-bf527 ip04
bf537-stamp bf527-ezkit-v2 cm-bf537e tcm-bf518 cm-bf537u bf527-ezkit
cm-bf533 pr1 bf533-ezkit ibf-dsp561 bf537-pnav cm-bf548 bf538f-ezkit
bf548-ezkit tcm-bf537 bf533-stamp bf518f-ezbrd bf526-ezbrd bf561-ezkit
       arm:  +   ethernut5
      m68k:  +   M5329AFEE M5208EVBE M5475FFE M5475GFE M5485BFE
M5329BFEE M5475EFE M5475CFE M5485AFE M5475AFE M5485HFE M5485DFE
M5475DFE M53017EVB M5475BFE M5485GFE M5485EFE M5485FFE M5373EVB
M5485CFE
   powerpc:  +   a4m2k a3m071
-(taihu) powerpc-linux-ld.bfd: section .resetvec loaded at
[fffffffc,ffffffff] overlaps section .u_boot_list loaded at
[fffffd88,00000687]
-(taihu) powerpc-linux-ld.bfd: u-boot: section .resetvec lma
0xfffffffc adjusted to 0x688
-(openrd_base)   actual: 412684 bytes
-(openrd_base)   excess: 19468 bytes
-(taishan) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff24f] overlaps section .data loaded at
[ffffd288,fffff95b]
-(taishan) powerpc-linux-ld.bfd: section .resetvec loaded at
[fffffffc,ffffffff] overlaps section .u_boot_list loaded at
[fffff95c,000002cb]
-(taishan) powerpc-linux-ld.bfd: u-boot: section .bootpg lma
0xfffff000 adjusted to 0xfffff95c
-(taishan) powerpc-linux-ld.bfd: u-boot: section .u_boot_list lma
0xfffff95c adjusted to 0xfffffbac
-(ocotea) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff24f] overlaps section .data loaded at
[ffffccac,fffff4b3]
-(ocotea) powerpc-linux-ld.bfd: u-boot: section .bootpg lma 0xfffff000
adjusted to 0xfffff4b4
-(ocotea) powerpc-linux-ld.bfd: u-boot: section .u_boot_list lma
0xfffff4b4 adjusted to 0xfffff704
-(ocotea) powerpc-linux-ld.bfd: u-boot: section .data.init lma
0xfffffe00 adjusted to 0xffffff5c
-(openrd_ultimate)   actual: 412736 bytes
-(openrd_ultimate)   excess: 19520 bytes
-(openrd_client)   actual: 412756 bytes
-(openrd_client)   excess: 19540 bytes
-(ebony) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff23f] overlaps section .u_boot_list loaded at
[ffffeb28,fffff37f]
-(ebony) powerpc-linux-ld.bfd: u-boot: section .bootpg lma 0xfffff000
adjusted to 0xfffff380
-(ebony) powerpc-linux-ld.bfd: u-boot: section .data.init lma
0xfffff400 adjusted to 0xfffff5c0
-(alpr) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff27f] overlaps section .data loaded at
[ffffba08,fffff0e7]
-(alpr) powerpc-linux-ld.bfd: section .u_boot_list loaded at
[fffff0e8,fffff63b] overlaps section .bootpg loaded at
[fffff000,fffff27f]
-(alpr) powerpc-linux-ld.bfd: u-boot: section .bootpg lma 0xfffff000
adjusted to 0xfffff0e8
-(alpr) powerpc-linux-ld.bfd: u-boot: section .u_boot_list lma
0xfffff0e8 adjusted to 0xfffff368
-(alpr) powerpc-linux-ld.bfd: u-boot: section .data.init lma
0xfffff700 adjusted to 0xfffff8bc
+(bf561-acvilon,cm-bf561,ip04,bct-brettl2,ibf-dsp561,cm-bf533,bf561-ezkit)
../net/arp.c: In function ‘ArpReceive’:
+(bf561-acvilon,cm-bf561,ip04,bct-brettl2,ibf-dsp561,cm-bf533,bf561-ezkit)
../net/arp.c:196: error: invalid operands to binary == (have ‘struct
in_addr’ and ‘struct in_addr’)
+(bf561-acvilon,cm-bf561,ip04,bct-brettl2,ibf-dsp561,cm-bf533,bf561-ezkit)
make[2]: *** [net/arp.o] Error 1
+(bf561-acvilon,M5329AFEE,cm-bf561,M5208EVBE,a4m2k,ethernut5,ip04,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,qemu_mips64el,bct-brettl2,ibf-dsp561,M5485DFE,M5475DFE,M5485CFE,M5475FFE,qemu_mips64,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,cm-bf533,M5475GFE,M5475AFE,a3m071,bf561-ezkit)
make[1]: *** [net] Error 2
+(M5329AFEE,M5208EVBE,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,M5485DFE,M5475DFE,M5485CFE,M5475FFE,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,M5475GFE,M5475AFE)
../net/net.c: In function 'net_process_received_packet':
+(M5329AFEE,M5208EVBE,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,M5485DFE,M5475DFE,M5485CFE,M5475FFE,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,M5475GFE,M5475AFE)
../net/net.c:1173:4: error: aggregate value used where an integer was
expected
+(M5329AFEE,M5208EVBE,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,M5485DFE,M5475DFE,M5485CFE,M5475FFE,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,M5475GFE,M5475AFE)
../net/net.c:1174:4: error: aggregate value used where an integer was
expected
+(M5329AFEE,M5208EVBE,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,M5485DFE,M5475DFE,M5485CFE,M5475FFE,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,M5475GFE,M5475AFE)
../net/net.c:1175:4: error: aggregate value used where an integer was
expected
+(M5329AFEE,M5208EVBE,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,M5485DFE,M5475DFE,M5485CFE,M5475FFE,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,M5475GFE,M5475AFE)
../net/net.c:1176:4: error: aggregate value used where an integer was
expected
+(M5329AFEE,M5208EVBE,M5485AFE,M5485BFE,M5475EFE,M5475CFE,M53017EVB,M5485HFE,M5485DFE,M5475DFE,M5485CFE,M5475FFE,M5475BFE,M5485GFE,M5373EVB,M5485EFE,M5485FFE,M5329BFEE,M5475GFE,M5475AFE)
make[2]: *** [net/net.o] Error 1
+(taihu) powerpc-linux-ld.bfd: section .resetvec loaded at
[fffffffc,ffffffff] overlaps section .u_boot_list loaded at
[fffffe84,00000783]
+(taihu) powerpc-linux-ld.bfd: u-boot: section .resetvec lma
0xfffffffc adjusted to 0x784
+(bf533-stamp,cm-bf527,bf537-stamp,bf527-ezkit-v2,tcm-bf518,cm-bf537u,cm-bf537e,tcm-bf537,bf527-ezkit,pr1,bf533-ezkit,bf537-pnav,cm-bf548,bf538f-ezkit,bf548-ezkit,bf518f-ezbrd,bf526-ezbrd)
../common/cmd_net.c: In function ‘netboot_update_env’:
+(bf533-stamp,cm-bf527,bf537-stamp,bf527-ezkit-v2,tcm-bf518,cm-bf537u,cm-bf537e,tcm-bf537,bf527-ezkit,pr1,bf533-ezkit,bf537-pnav,cm-bf548,bf538f-ezkit,bf548-ezkit,bf518f-ezbrd,bf526-ezbrd)
../common/cmd_net.c:169: error: ‘net_ntp_ip’ undeclared (first use in
this function)
+(bf533-stamp,cm-bf527,bf537-stamp,bf527-ezkit-v2,tcm-bf518,cm-bf537u,cm-bf537e,tcm-bf537,bf527-ezkit,pr1,bf533-ezkit,bf537-pnav,cm-bf548,bf538f-ezkit,bf548-ezkit,bf518f-ezbrd,bf526-ezbrd)
../common/cmd_net.c:169: error: (Each undeclared identifier is
reported only once
+(bf533-stamp,cm-bf527,bf537-stamp,bf527-ezkit-v2,tcm-bf518,cm-bf537u,cm-bf537e,tcm-bf537,bf527-ezkit,pr1,bf533-ezkit,bf537-pnav,cm-bf548,bf538f-ezkit,bf548-ezkit,bf518f-ezbrd,bf526-ezbrd)
../common/cmd_net.c:169: error: for each function it appears in.)
+(bf533-stamp,cm-bf527,bf537-stamp,bf527-ezkit-v2,tcm-bf518,cm-bf537u,cm-bf537e,tcm-bf537,bf527-ezkit,pr1,bf533-ezkit,bf537-pnav,cm-bf548,bf538f-ezkit,bf548-ezkit,bf518f-ezbrd,bf526-ezbrd)
make[2]: *** [common/cmd_net.o] Error 1
+(bf533-stamp,cm-bf527,bf537-stamp,bf527-ezkit-v2,tcm-bf518,cm-bf537u,cm-bf537e,tcm-bf537,bf527-ezkit,pr1,bf533-ezkit,bf537-pnav,cm-bf548,bf538f-ezkit,bf548-ezkit,bf518f-ezbrd,bf526-ezbrd)
make[1]: *** [common] Error 2
+(a4m2k,a3m071) ../net/link_local.c: In function 'pick':
+(a4m2k,a3m071) ../net/link_local.c:74:17: error: conversion to
non-scalar type requested
+(a4m2k,a3m071) ../net/link_local.c: In function 'link_local_timeout':
+(a4m2k,a3m071) ../net/link_local.c:138:4: error: incompatible type
for argument 1 of 'arp_raw_request'
+(a4m2k,a3m071) ../net/arp.h:26:6: note: expected 'struct in_addr' but
argument is of type 'int'
+(a4m2k,a3m071) make[2]: *** [net/link_local.o] Error 1
+(ethernut5) ../net/rarp.c: In function ‘rarp_receive’:
+(ethernut5) ../net/rarp.c:47:21: error: invalid operands to binary ==
(have ‘struct in_addr’ and ‘int’)
+(ethernut5,qemu_mips64el,qemu_mips64) make[2]: *** [net/rarp.o] Error 1
+(openrd_base)   actual: 412600 bytes
+(openrd_base)   excess: 19384 bytes
+(taishan) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff24f] overlaps section .data loaded at
[ffffd388,fffffa57]
+(taishan) powerpc-linux-ld.bfd: section .resetvec loaded at
[fffffffc,ffffffff] overlaps section .u_boot_list loaded at
[fffffa58,000003c7]
+(taishan) powerpc-linux-ld.bfd: u-boot: section .bootpg lma
0xfffff000 adjusted to 0xfffffa58
+(taishan) powerpc-linux-ld.bfd: u-boot: section .u_boot_list lma
0xfffffa58 adjusted to 0xfffffca8
+(ocotea) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff24f] overlaps section .data loaded at
[ffffcdac,fffff5af]
+(ocotea) powerpc-linux-ld.bfd: u-boot: section .bootpg lma 0xfffff000
adjusted to 0xfffff5b0
+(ocotea) powerpc-linux-ld.bfd: u-boot: section .u_boot_list lma
0xfffff5b0 adjusted to 0xfffff800
+(ocotea) powerpc-linux-ld.bfd: u-boot: section .data.init lma
0xffffff00 adjusted to 0x58
+(ocotea) powerpc-linux-ld.bfd: u-boot: section .resetvec lma
0xfffffffc adjusted to 0x60
+(qemu_mips64el,qemu_mips64) ../net/rarp.c: In function 'rarp_receive':
+(qemu_mips64el,qemu_mips64) ../net/rarp.c:47:21: error: invalid
operands to binary == (have 'struct in_addr' and 'int')
+(openrd_ultimate)   actual: 412652 bytes
+(openrd_ultimate)   excess: 19436 bytes
+(openrd_client)   actual: 412672 bytes
+(openrd_client)   excess: 19456 bytes
+(ebony) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff23f] overlaps section .u_boot_list loaded at
[ffffec24,fffff47b]
+(ebony) powerpc-linux-ld.bfd: u-boot: section .bootpg lma 0xfffff000
adjusted to 0xfffff47c
+(ebony) powerpc-linux-ld.bfd: u-boot: section .data.init lma
0xfffff500 adjusted to 0xfffff6bc
+(alpr) powerpc-linux-ld.bfd: section .bootpg loaded at
[fffff000,fffff27f] overlaps section .data loaded at
[ffffbb08,fffff1e3]
+(alpr) powerpc-linux-ld.bfd: section .u_boot_list loaded at
[fffff1e4,fffff737] overlaps section .bootpg loaded at
[fffff000,fffff27f]
+(alpr) powerpc-linux-ld.bfd: u-boot: section .bootpg lma 0xfffff000
adjusted to 0xfffff1e4
+(alpr) powerpc-linux-ld.bfd: u-boot: section .u_boot_list lma
0xfffff1e4 adjusted to 0xfffff464
+(alpr) powerpc-linux-ld.bfd: u-boot: section .data.init lma
0xfffff800 adjusted to 0xfffff9b8
w+(a4m2k,a3m071) ../net/link_local.c: In function 'pick':
w+(a4m2k,a3m071) ../net/link_local.c:75:1: warning: control reaches
end of non-void function [-Wreturn-type]

Regards,
Simon


More information about the U-Boot mailing list