[U-Boot] [PATCH 06/14] powerpc: Remove unneccessary #ifdefs in reginfo

Christophe LEROY christophe.leroy at c-s.fr
Wed Jul 12 14:28:33 UTC 2017


Dear Wolfgang,

Le 12/07/2017 à 15:07, Wolfgang Denk a écrit :
> Dear Christophe Leroy,
> 
> In message <a0ecab632c81feb7b40679076a6165ac7050d9b8.1499629706.git.christophe.leroy at c-s.fr> you wrote:
>> reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo()
>> or mpc86xx_reginfo() based on CONFIG_ symbol.
>> As those 3 functions can't me defined at the same time, let's
>> rename them mpc8xxx_reginfo() to avoid the #ifdefs
> 
> This is indeed a tempting idea, but MPC8xx is a totally different
> thing than MPC8xxxx, so the chosen name is misleading and should be
> avoided.

Oh ? Ok. I thought it would be a possible name because for instance in 
the Linux Kernel, the watchdog driver is named that way and used also 
for the 8xx and so was also the SPI driver before its name was change to 
fsl_spi.
Isn't the 8xx an 81xx indeed ?

Any suggestion for a good name ? Would fsl_reginfo() be a good name ?


> 
>> Lets all remove the #ifdefs around the U_BOOT_CMD as this
>> file is only compiled when CONFIG_CMD_REGINFO is defined
> 
> Has this change been tested / verified against all other boards /
> architectures?

Travis-CI is not working at the time being, but what would be the issue ?

In the Makefile, it is defined as
obj-$(CONFIG_CMD_REGINFO) += reginfo.o, so if CONFIG_CMD_REGINFO is not 
defined, this file won't be compiled at all, will it ?

Regards
Christophe

> 
> Best regards,
> 
> Wolfgang Denk
> 


More information about the U-Boot mailing list