[RFC] [PATCH] watchdog_info separation and constify
    Joe Perches 
    joe at perches.com
       
    Wed Jan 20 09:36:11 EST 2010
    
    
  
On Tue, 2010-01-19 at 22:16 +0000, Mark Brown wrote:
> On Tue, Jan 19, 2010 at 01:42:31PM -0800, Joe Perches wrote:
> > Maybe a standard #define WATCHDOG_NAME <foo>
> > .identity = WATCHGOD_NAME
> 
> I don't really see that the indrection via the #define would buy us
> anything?
Maybe not, just a suggestion.
There are already 17 uses though.
It might have some value like DRV_NAME does or
any other frequent #define used in printks or
#include code.
It may be useful standardization prior to or post
some generic watchdog code consolidation.
$ grep -r --include=*.[ch] -Poh "^#define\s*\w+NAME\b" drivers | \
  sed -r -e 's/\s+/ /g' | sort | uniq -c | sort -rn | head -10
    334 #define DRV_NAME
    137 #define DRIVER_NAME
     59 #define MODULE_NAME
     25 #define DRVNAME
     21 #define DRV_MODULE_NAME
     18 #define DEVICE_NAME
     17 #define WATCHDOG_NAME
     15 #define MY_NAME
     12 #define BOARD_MAP_NAME
     11 #define DSS_SUBSYS_NAME
    
    
More information about the Linuxppc-dev
mailing list