[U-Boot-Users] [PATCH V2] onenand: fix error: static declaration of 'memcpy' follows non-static declaration

Wolfgang Denk wd at denx.de
Thu May 1 22:22:08 CEST 2008


In message <1209671826-31404-1-git-send-email-plagnioj at jcrosoft.com> you wrote:
> by Align with word(16-bit) size
> as done in Linux
> 
> in
> - onenand_read_bufferram
> - onenand_sync_read_bufferram
> - onenand_write_bufferram

This is much more intrusive than the simple rename patch;  I  suggest
we  do  the rename now to fix the immediate compile problem, and wait
with this more complex patch for the next merge window.

>  static const unsigned char ffchars[] = {
>  	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
>  	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,	/* 16 */
> @@ -358,6 +345,17 @@ static int onenand_read_bufferram(struct mtd_info *mtd, int area,
>  	bufferram = this->base + area;
>  	bufferram += onenand_bufferram_offset(mtd, area);
>  
> +	if (ONENAND_CHECK_BYTE_ACCESS(count)) {
> +		unsigned short word;
> +
> +		/* Align with word(16-bit) size */
> +		count--;
> +
> +		/* Read word and save byte */
> +		word = this->read_word(bufferram + offset + count);
> +		buffer[count] = (word & 0xff);

Don't we have a byteorder issue here?  


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Save yourself!  Reboot in 5 seconds!




More information about the U-Boot mailing list