lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1263937351.18117.69.camel@Joe-Laptop.home>
Date:	Tue, 19 Jan 2010 13:42:31 -0800
From:	Joe Perches <joe@...ches.com>
To:	Wim Van Sebroeck <wim@...ana.be>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Florian Fainelli <florian@...nwrt.org>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	LKML <linux-kernel@...r.kernel.org>, linuxppc-dev@...abs.org,
	uclinux-dist-devel@...ckfin.uclinux.org, linux-omap@...r.kernel.org
Subject: Re: [RFC] [PATCH] watchdog_info separation and constify

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?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ