From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462Ab0EAQrT (ORCPT ); Sat, 1 May 2010 12:47:19 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:34574 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770Ab0EAQrR (ORCPT ); Sat, 1 May 2010 12:47:17 -0400 Date: Sat, 1 May 2010 09:46:15 -0700 From: Randy Dunlap To: lkml Cc: akpm , Wim Van Sebroeck Subject: [PATCH] watchdogs: fix several MODULE_PARM_DESC strings Message-Id: <20100501094615.06fc4972.randy.dunlap@oracle.com> Organization: Oracle Linux Eng. X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Auth-Type: Internal IP X-Source-IP: rcsinet15.oracle.com [148.87.113.117] X-CT-RefId: str=0001.0A090201.4BDC5B0B.00D0:SCFMA4539811,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap Fix MODULE_PARM_DESC() strings in several watchdog drivers. Some are simple as add a parenthesis. Others are problems from __stringify() being used on a variable name instead of a macro name, so the variable name is produced in the string instead of its build-time value. In these cases, create a macro for the value so that the module param description string is useful. Only pc87413_wdt has been built (due to toolchains). Signed-off-by: Randy Dunlap Cc: Wim Van Sebroeck --- BTW, in ep93xx_wdt.c, I can't find where WATCHDOG_TIMEOUT is defined. Can someone point me to it, please? (or does it not even build?) drivers/watchdog/mpc8xxx_wdt.c | 2 +- drivers/watchdog/pc87413_wdt.c | 8 +++++--- drivers/watchdog/pnx833x_wdt.c | 11 +++++++---- drivers/watchdog/s3c2410_wdt.c | 6 +++--- drivers/watchdog/shwdt.c | 2 +- drivers/watchdog/wdt977.c | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) --- lnx-2634-rc6.orig/drivers/watchdog/mpc8xxx_wdt.c +++ lnx-2634-rc6/drivers/watchdog/mpc8xxx_wdt.c @@ -53,7 +53,7 @@ static int mpc8xxx_wdt_init_late(void); static u16 timeout = 0xffff; module_param(timeout, ushort, 0); MODULE_PARM_DESC(timeout, - "Watchdog timeout in ticks. (01 for debug, (default 0)"); + "0 to reboot (default 0)"); +MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug (default 0)"); static unsigned long open_lock; static struct device *wdt_dev; /* platform device attached to */ --- lnx-2634-rc6.orig/drivers/watchdog/wdt977.c +++ lnx-2634-rc6/drivers/watchdog/wdt977.c @@ -63,7 +63,7 @@ static char expect_close; static DEFINE_SPINLOCK(spinlock); module_param(timeout, int, 0); -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300), default=" +MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300, default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")"); module_param(testmode, int, 0); MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0"); --- lnx-2634-rc6.orig/drivers/watchdog/shwdt.c +++ lnx-2634-rc6/drivers/watchdog/shwdt.c @@ -496,7 +496,7 @@ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); module_param(clock_division_ratio, int, 0); MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) " - "to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")"); + "to 0x7 (5.25ms). (default=" __MODULE_STRING(WTCSR_CKS_4096) ")"); module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat,