[U-Boot] [PATCH 3/6] jffs2: rewrite jffs2 scanning code based on Linux one

Stefan Roese sr at denx.de
Wed Dec 10 14:30:43 CET 2008


Hi Ilya,

On Thursday 13 November 2008, Ilya Yanok wrote:
> Rewrites jffs2_1pass_build_lists() function in style of Linux's
> jffs2_scan_medium() and jffs2_scan_eraseblock().
> This includes:
>  - Caching flash acceses
>  - Smart dealing with free space

After this patch is now applied to the main u-boot repo, I get the
following warning when compiling my new board with OneNAND & JFFS2
support:

[stefan at kubuntu u-boot (vcth-onenand-ubi-ver3)]$ make -s -j5
jffs2_1pass.c:1411:1: warning: "min_t" redefined
In file included 
from /home/stefan/git/u-boot/u-boot/include/linux/mtd/mtd-abi.h:11,
                 from /home/stefan/git/u-boot/u-boot/include/linux/mtd/mtd.h:11,
                 from jffs2_1pass.c:275:
/home/stefan/git/u-boot/u-boot/include/linux/mtd/compat.h:34:1: warning: this is 
the location of the previous definition

As it seems you added the "min_t" define to this file (see below). Why
was this needed? I can safely remove it from my version. Do you see a
problem with removing it on your test platform?

Thanks.

<snip>

> @@ -1268,17 +1261,33 @@ dump_dirents(struct b_lists *pL)
>  }
>  #endif
>
> +#define min_t(type, x, y) ({                    \
> +	type __min1 = (x);                      \
> +	type __min2 = (y);                      \
> +	__min1 < __min2 ? __min1: __min2; })
> +
> +#define DEFAULT_EMPTY_SCAN_SIZE	4096

...

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list