From mboxrd@z Thu Jan 1 00:00:00 1970 From: Holger Brunck Date: Fri, 18 Jan 2013 09:07:32 +0100 Subject: [U-Boot] [PATCH 04/15] km82xx, km83xx: move ethernet_present() from common to cpu specific In-Reply-To: <20130117182317.523cfb4c958fd3de664977d4@freescale.com> References: <1358426881-24117-1-git-send-email-holger.brunck@keymile.com><1358426881-24117-5-git-send-email-holger.brunck@keymile.com> <20130117182317.523cfb4c958fd3de664977d4@freescale.com> Message-ID: <50F902C4.6010505@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/18/2013 01:23 AM, Kim Phillips wrote: > On Thu, 17 Jan 2013 13:47:50 +0100 > Holger Brunck wrote: > >> +int piggy_present(void) >> +{ >> + struct km_bec_fpga *base = >> + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE; >> + >> + return in_8(&base->bprth) & PIGGY_PRESENT; >> +} > > this change produces two new sparse warnings: > > km83xx.c:137:22: warning: incorrect type in argument 1 (different address spaces) > km83xx.c:137:22: expected unsigned char const volatile [noderef] *addr > km83xx.c:137:22: got unsigned char * > km83xx.c:132:5: warning: symbol 'piggy_present' was not declared. Should it be static? > > so make the function static, and add __iomem annotation to the > assignment of 'base'. > ok will do. Just out of curiosity which compiler throws these warnings? I use powerpc-gcc (GCC) 4.7.2 and don't see them. Anyway I send a v2 for this patch. Regards Holger