[U-Boot] [PATCH v3 2/4] mtdparts: show net size in mtdparts list

Wolfgang Denk wd at denx.de
Sat Sep 18 21:42:50 CEST 2010


Dear Ben Gardiner,

In message <AANLkTim8N9jxbSO_UzcDYX6ta+qkfa-ABO4GMpC2m771 at mail.gmail.com> you wrote:
>
> Would it be acceptable to do something like the following?
>
> static void print_partition_table(...)
> {
> #if defined(CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES)
> ...
> #else /* !defined(CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES) */
> ...
> #endif /* defined(CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES) */
> }

If the whole body of the funtion is affectted, you better do:

	#if defined(xxx)
	static void print_partition_table(...)
	{
	    ...
	}
	#else
	static void print_partition_table(...)
	{
	    ...
	}
	#endif

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
The alternative to genuflecting before the  god  of  code-bumming  is
finding  a  better  algorithm.  It should be clear that none such was
available. If your code is too slow, you must make it faster.  If  no
better algorithm is available, you must trim cycles.
                                 - td at alice.UUCP (Tom Duff) 29 Aug 88


More information about the U-Boot mailing list