From: Joe Perches <joe@perches.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
LKML <linux-kernel@vger.kernel.org>,
linuxppc-dev@ozlabs.org, uclinux-dist-devel@blackfin.uclinux.org,
Russell King <rmk+kernel@arm.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
linux-omap@vger.kernel.org,
Florian Fainelli <florian@openwrt.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [RFC] [PATCH] watchdog_info separation and constify
Date: Tue, 19 Jan 2010 13:42:31 -0800 [thread overview]
Message-ID: <1263937351.18117.69.camel@Joe-Laptop.home> (raw)
In-Reply-To: <20100119211759.GE3804@infomag.iguana.be>
On Tue, 2010-01-19 at 22:17 +0100, Wim Van Sebroeck wrote:
> -static struct watchdog_info at32_wdt_info = {
> +static const struct watchdog_info at32_wdt_info = {
It'd be good to use a consistent structure name:
static const struct watchdog_info ident = {
etc...
}
$ grep -Poh "struct\s*watchdog_info\s*\w+" *.[ch] | sort | uniq -c | sort -rn
65 struct watchdog_info ident
8 struct watchdog_info __user
4 struct watchdog_info info
2 struct watchdog_info sh_wdt_info
2 struct watchdog_info bfin_wdt_info
2 struct watchdog_info at91_wdt_info
1 struct watchdog_info zf_info
1 struct watchdog_info wdinfo
1 struct watchdog_info twl4030_wd_ident
1 struct watchdog_info s3c2410_wdt_ident
1 struct watchdog_info nuc900_wdt_info
1 struct watchdog_info ks8695_wdt_info
1 struct watchdog_info bcm47xx_wdt_info
1 struct watchdog_info at32_wdt_info
1 struct watchdog_info adx_wdt_info
firmware_version doesn't have to be initialized to 0.
It might be good to standardize .identity to include
either "WDT" or "watchdog" or exclude both of those.
Maybe a standard #define WATCHDOG_NAME <foo>
.identity = WATCHGOD_NAME
$ grep -Poh "\.identity\s*=\s*.*$" *.[ch] | sed -r -e 's/\s+/ /g' | sort
.identity = "ALi M1535 WatchDog Timer",
.identity = "ALiM7101",
.identity = "at32ap700x watchdog",
.identity = "at91 watchdog",
.identity = "Avionic Design Xanthos Watchdog",
.identity = "Blackfin Watchdog",
.identity = "COH 901 327 Watchdog",
.identity = "CPU5 WDT",
.identity = "DaVinci Watchdog",
.identity = DRIVER_NAME,
.identity = DRIVER_NAME,
.identity = DRIVER_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = DRV_NAME,
.identity = "EP93xx Watchdog",
.identity = ESB_MODULE_NAME,
.identity = "Footbridge Watchdog",
.identity = "GE Fanuc watchdog",
.identity = "Hardware Watchdog for PNX833x",
.identity = "Hardware Watchdog for SGI IP22",
.identity = "Hardware Watchdog for TXx9",
.identity = "HP iLO2 HW Watchdog Timer",
.identity = "IB700 WDT",
.identity = "IBM ASR",
.identity = "iop watchdog",
.identity = "IT8712F Watchdog",
.identity = "IXP2000 Watchdog",
.identity = "IXP4xx Watchdog",
.identity = "ks8695 watchdog",
.identity = LONGNAME,
.identity = "MixCOM watchdog",
.identity = "MPC8xxx",
.identity = "MPcore Watchdog",
.identity = "MTX-1 WDT",
.identity = "MV64x60 watchdog",
.identity = "NatSemi SCx200 Watchdog",
.identity = "nuc900 watchdog",
.identity = "OMAP Watchdog",
.identity = "Orion Watchdog",
.identity = "PC87307/PC97307",
.identity = "PC87413(HF/F) watchdog",
.identity = "PCI-WDT500/501",
.identity = "PCWD",
.identity = "PNX4008 Watchdog",
.identity = "PowerPC Book-E Watchdog",
.identity = "RC32434_WDT Watchdog",
.identity = "RDC321x WDT",
.identity = "S3C2410 Watchdog",
.identity = "SA1100/PXA255 Watchdog",
.identity = "SBC60xx",
.identity = "SBC7240",
.identity = "SC520",
.identity = "SH WDT",
.identity = "SiByte Watchdog",
.identity = "SMsC 37B787 Watchdog",
.identity = "Software Watchdog",
.identity = "STMP3XXX Watchdog",
.identity = "TWL4030 Watchdog",
.identity = "W83627HF WDT",
.identity = "W83697HF WDT",
.identity = "W83697UG WDT",
.identity = "W83877F",
.identity = "Wafer 5823 WDT",
.identity = WATCHDOG_DRIVER_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = WATCHDOG_NAME,
.identity = "wdrtas",
.identity = "WDT500/501",
.identity = "WDT Eurotech CPU-1220/1410",
.identity = "Winsystems EPX-C3 H/W Watchdog",
.identity = "WM831x Watchdog",
.identity = "WM8350 Watchdog",
.identity = "ZF-Logic watchdog",
Maybe a DECLARE_WATCHDOG_IDENT() macro?
next prev parent reply other threads:[~2010-01-19 21:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 21:17 [RFC] [PATCH] watchdog_info separation and constify Wim Van Sebroeck
2010-01-19 21:27 ` Alan Cox
2010-01-19 22:00 ` Wim Van Sebroeck
2010-01-19 21:42 ` Joe Perches [this message]
2010-01-19 21:52 ` Mike Frysinger
2010-01-19 22:16 ` Mark Brown
2010-01-19 22:36 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263937351.18117.69.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=florian@openwrt.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).