watchdog: Use pr_<fmt> and pr_<level>
Subsystems (12)
PATCH 1/1 watchdog: Use pr_<fmt> and pr_<level>
Use the current logging styles.
Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines. Coalesce formats.
---
Compiled x86 allyesconfig only.
drivers/watchdog/acquirewdt.c | 24 +++---- drivers/watchdog/advantechwdt.c | 30 +++----- drivers/watchdog/alim1535_wdt.c | 21 +++--- drivers/watchdog/alim7101_wdt.c | 51 +++++--------- drivers/watchdog/ar7_wdt.c | 34 ++++----- drivers/watchdog/at91rm9200_wdt.c | 10 ++- drivers/watchdog/at91sam9_wdt.c | 8 ++- drivers/watchdog/ath79_wdt.c | 5 +- drivers/watchdog/bcm47xx_wdt.c | 14 ++-- drivers/watchdog/bcm63xx_wdt.c | 7 +- drivers/watchdog/bfin_wdt.c | 27 +++----- drivers/watchdog/booke_wdt.c | 14 ++-- drivers/watchdog/cpu5wdt.c | 19 +++--- drivers/watchdog/cpwd.c | 20 +++--- drivers/watchdog/dw_wdt.c | 3 +- drivers/watchdog/ep93xx_wdt.c | 12 ++-- drivers/watchdog/eurotechwdt.c | 28 ++++---- drivers/watchdog/f71808e_wdt.c | 40 +++++------ drivers/watchdog/gef_wdt.c | 11 ++-- drivers/watchdog/geodewdt.c | 5 +- drivers/watchdog/hpwdt.c | 27 +++----- drivers/watchdog/i6300esb.c | 35 ++++----- drivers/watchdog/iTCO_vendor_support.c | 7 +- drivers/watchdog/iTCO_wdt.c | 55 ++++++-------- drivers/watchdog/ib700wdt.c | 22 +++---- drivers/watchdog/ibmasr.c | 14 ++-- drivers/watchdog/indydog.c | 20 ++--- drivers/watchdog/intel_scu_watchdog.c | 71 +++++++++---------- drivers/watchdog/intel_scu_watchdog.h | 1 - drivers/watchdog/iop_wdt.c | 11 ++-- drivers/watchdog/it8712f_wdt.c | 35 +++++----- drivers/watchdog/it87_wdt.c | 42 +++++------- drivers/watchdog/ixp2000_wdt.c | 7 +- drivers/watchdog/ixp4xx_wdt.c | 11 ++-- drivers/watchdog/ks8695_wdt.c | 6 +- drivers/watchdog/lantiq_wdt.c | 4 +- drivers/watchdog/m54xx_wdt.c | 10 ++-- drivers/watchdog/machzwd.c | 33 ++++----- drivers/watchdog/mixcomwd.c | 25 +++---- drivers/watchdog/mpc8xxx_wdt.c | 13 ++-- drivers/watchdog/mpcore_wdt.c | 11 ++-- drivers/watchdog/mv64x60_wdt.c | 11 ++-- drivers/watchdog/nv_tco.c | 42 +++++------ drivers/watchdog/octeon-wdt-main.c | 12 ++-- drivers/watchdog/of_xilinx_wdt.c | 41 +++++------ drivers/watchdog/omap_wdt.c | 4 +- drivers/watchdog/orion_wdt.c | 11 ++-- drivers/watchdog/pc87413_wdt.c | 53 ++++++-------- drivers/watchdog/pcwd.c | 123 +++++++++++++------------------- drivers/watchdog/pcwd_pci.c | 109 ++++++++++++---------------- drivers/watchdog/pcwd_usb.c | 74 +++++++++---------- drivers/watchdog/pika_wdt.c | 19 +++--- drivers/watchdog/pnx4008_wdt.c | 14 ++-- drivers/watchdog/pnx833x_wdt.c | 26 +++---- drivers/watchdog/rc32434_wdt.c | 29 +++----- drivers/watchdog/riowd.c | 10 ++- drivers/watchdog/s3c2410_wdt.c | 25 +++---- drivers/watchdog/sa1100_wdt.c | 10 ++- drivers/watchdog/sb_wdog.c | 29 ++++---- drivers/watchdog/sbc60xxwdt.c | 37 ++++------ drivers/watchdog/sbc7240_wdt.c | 40 ++++------- drivers/watchdog/sbc8360.c | 20 +++--- drivers/watchdog/sbc_epx_c3.c | 19 ++--- drivers/watchdog/sbc_fitpc2_wdt.c | 9 +-- drivers/watchdog/sc1200wdt.c | 30 ++++----- drivers/watchdog/sc520_wdt.c | 35 ++++------ drivers/watchdog/sch311x_wdt.c | 13 ++-- drivers/watchdog/scx200_wdt.c | 21 +++--- drivers/watchdog/shwdt.c | 15 +++-- drivers/watchdog/smsc37b787_wdt.c | 38 ++++------ drivers/watchdog/softdog.c | 35 ++++------ drivers/watchdog/sp5100_tco.c | 31 ++++----- drivers/watchdog/stmp3xxx_wdt.c | 6 +- drivers/watchdog/txx9wdt.c | 11 ++-- drivers/watchdog/via_wdt.c | 3 + drivers/watchdog/w83627hf_wdt.c | 34 ++++----- drivers/watchdog/w83697hf_wdt.c | 39 ++++------ drivers/watchdog/w83697ug_wdt.c | 34 ++++----- drivers/watchdog/w83877f_wdt.c | 36 ++++------ drivers/watchdog/w83977f_wdt.c | 34 ++++----- drivers/watchdog/wafer5823wdt.c | 30 +++----- drivers/watchdog/watchdog_core.c | 4 +- drivers/watchdog/watchdog_dev.c | 10 ++-- drivers/watchdog/wdrtas.c | 69 ++++++++---------- drivers/watchdog/wdt.c | 51 ++++++------- drivers/watchdog/wdt285.c | 12 ++-- drivers/watchdog/wdt977.c | 36 ++++------ drivers/watchdog/wdt_pci.c | 66 ++++++++--------- drivers/watchdog/wm8350_wdt.c | 2 + drivers/watchdog/xen_wdt.c | 25 +++---- 90 files changed, 1043 insertions(+), 1287 deletions(-)
drivers/watchdog/acquirewdt.c +10 -14
@@ -52,6 +52,8 @@* Includes, defines, variables, module parameters, ... */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +/* Includes */ #include <linux/module.h> /* For module specific items */ #include <linux/moduleparam.h> /* For new moduleparam's */
@@ -70,7 +72,6 @@/* Module information */ #define DRV_NAME "acquirewdt" -#define PFX DRV_NAME ": "#define WATCHDOG_NAME "Acquire WDT"/* There is no way to see what the correct time-out period is */ #define WATCHDOG_HEARTBEAT 0
@@ -208,8 +209,7 @@ static int acq_close(struct inode *inode, struct file *file)if (expect_close ==42 ) {acq_stop (); }else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );acq_keepalive (); }clear_bit (0 , &acq_is_open);
@@ -246,27 +246,24 @@ static int __devinit acq_probe(struct platform_device *dev)if (wdt_stop != wdt_start) {if (!request_region (wdt_stop,1 ,WATCHDOG_NAME )) { - printk(KERN_ERR PFX - "I/O address 0x%04x already in use\n", wdt_stop); +pr_err ("I/O address 0x%04x already in use\n" , wdt_stop); ret = -EIO ; goto out; } }if (!request_region (wdt_start,1 ,WATCHDOG_NAME )) { - printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", - wdt_start); +pr_err ("I/O address 0x%04x already in use\n" , wdt_start); ret = -EIO ; goto unreg_stop; } ret =misc_register (&acq_miscdev);if (ret !=0 ) { - printk(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret); goto unreg_regions; } - printk(KERN_INFO PFX "initialized. (nowayout=%d)\n", nowayout); +pr_info ("initialized. (nowayout=%d)\n" , nowayout);return 0 ; unreg_regions:
@@ -308,8 +305,7 @@ static int __init acq_init(void) {int err; -printk (KERN_INFO -"WDT driver for Acquire single board computer initialising.\n" ); +pr_info ("WDT driver for Acquire single board computer initialising\n" ); err =platform_driver_register (&acquirewdt_driver);if (err)
@@ -332,7 +328,7 @@ static void __exit acq_exit(void) {platform_device_unregister (acq_platform_device);platform_driver_unregister (&acquirewdt_driver); - printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); +pr_info ("Watchdog Module Unloaded\n" ); }module_init (acq_init);
drivers/watchdog/advantechwdt.c +12 -18
@@ -28,6 +28,8 @@* add wdt_start and wdt_stop as parameters. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -43,7 +45,6 @@#include <asm/system.h> #define DRV_NAME "advantechwdt" -#define PFX DRV_NAME ": "#define WATCHDOG_NAME "Advantech WDT"#define WATCHDOG_TIMEOUT 60/* 60 sec default timeout */
@@ -207,8 +208,7 @@ static int advwdt_close(struct inode *inode, struct file *file)if (adv_expect_close ==42 ) {advwdt_disable (); }else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );advwdt_ping (); }clear_bit (0 , &advwdt_is_open);
@@ -245,18 +245,15 @@ static int __devinit advwdt_probe(struct platform_device *dev)if (wdt_stop != wdt_start) {if (!request_region (wdt_stop,1 ,WATCHDOG_NAME )) { - printk(KERN_ERR PFX -"I/O address 0x%04x already in use\n" , - wdt_stop); +pr_err ("I/O address 0x%04x already in use\n" , + wdt_stop); ret = -EIO ; goto out; } }if (!request_region (wdt_start,1 ,WATCHDOG_NAME )) { - printk(KERN_ERR PFX -"I/O address 0x%04x already in use\n" , - wdt_start); +pr_err ("I/O address 0x%04x already in use\n" , wdt_start); ret = -EIO ; goto unreg_stop; }
@@ -265,18 +262,16 @@ static int __devinit advwdt_probe(struct platform_device *dev)* if not reset to the default */ if (advwdt_set_heartbeat (timeout)) {advwdt_set_heartbeat (WATCHDOG_TIMEOUT ); - printk(KERN_INFO PFX - "timeout value must be 1<=x<=63, using %d\n", timeout); +pr_info ("timeout value must be 1<=x<=63, using %d\n" , timeout); } ret =misc_register (&advwdt_miscdev);if (ret !=0 ) { - printk(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret); goto unreg_regions; } - printk(KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d)\n", +pr_info ("initialized. timeout=%d sec (nowayout=%d)\n" , timeout, nowayout); out:return ret;
@@ -318,8 +313,7 @@ static int __init advwdt_init(void) {int err; -printk (KERN_INFO -"WDT driver for Advantech single board computer initialising.\n" ); +pr_info ("WDT driver for Advantech single board computer initialising\n" ); err =platform_driver_register (&advwdt_driver);if (err)
@@ -343,7 +337,7 @@ static void __exit advwdt_exit(void) {platform_device_unregister (advwdt_platform_device);platform_driver_unregister (&advwdt_driver); - printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); +pr_info ("Watchdog Module Unloaded\n" ); }module_init (advwdt_init);
drivers/watchdog/alim1535_wdt.c +9 -12
@@ -7,6 +7,8 @@* 2 of the License, or (at your option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -22,7 +24,6 @@#include <linux/io.h> #define WATCHDOG_NAME "ALi_M1535" -#define PFX WATCHDOG_NAME ": "#define WATCHDOG_TIMEOUT 60/* 60 sec default timeout */ /* internal variables */
@@ -268,8 +269,7 @@ static int ali_release(struct inode *inode, struct file *file)if (ali_expect_release ==42 )ali_stop ();else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );ali_keepalive (); }clear_bit (0 , &ali_is_open);
@@ -399,9 +399,8 @@ static int __init watchdog_init(void)if not reset to the default */ if (timeout <1 || timeout >=18000 ) { timeout =WATCHDOG_TIMEOUT ; - printk(KERN_INFO PFX -"timeout value must be 0 < timeout < 18000, using %d\n" , - timeout); +pr_info ("timeout value must be 0 < timeout < 18000, using %d\n" , + timeout); }/* Calculate the watchdog's timeout */
@@ -409,20 +408,18 @@ static int __init watchdog_init(void) ret =register_reboot_notifier (&ali_notifier);if (ret !=0 ) { - printk(KERN_ERR PFX - "cannot register reboot notifier (err=%d)\n", ret); +pr_err ("cannot register reboot notifier (err=%d)\n" , ret); goto out; } ret =misc_register (&ali_miscdev);if (ret !=0 ) { - printk(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret); goto unreg_reboot; } - printk(KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d)\n", +pr_info ("initialized. timeout=%d sec (nowayout=%d)\n" , timeout, nowayout); out:
drivers/watchdog/alim7101_wdt.c +18 -33
139 lines not on this page · raw message
drivers/watchdog/ar7_wdt.c +16 -18
@@ -23,6 +23,8 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/errno.h>
@@ -39,7 +41,6 @@#include <asm/addrspace.h> #include <asm/mach-ar7/ar7.h> -#define DRVNAME "ar7_wdt"#define LONGNAME "TI AR7 Watchdog Timer"MODULE_AUTHOR ("Nicolas Thill <[email protected]>" );
@@ -93,7 +94,7 @@ static void ar7_wdt_kick(u32 value)return ; } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT kick reg\n"); +pr_err ("failed to unlock WDT kick reg\n" ); }static void ar7_wdt_prescale (u32 value)
@@ -106,7 +107,7 @@ static void ar7_wdt_prescale(u32 value)return ; } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT prescale reg\n"); +pr_err ("failed to unlock WDT prescale reg\n" ); }static void ar7_wdt_change (u32 value)
@@ -119,7 +120,7 @@ static void ar7_wdt_change(u32 value)return ; } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT change reg\n"); +pr_err ("failed to unlock WDT change reg\n" ); }static void ar7_wdt_disable (u32 value)
@@ -135,7 +136,7 @@ static void ar7_wdt_disable(u32 value) } } } - printk(KERN_ERR DRVNAME ": failed to unlock WDT disable reg\n"); +pr_err ("failed to unlock WDT disable reg\n" ); }static void ar7_wdt_update_margin (int new_margin)
@@ -151,21 +152,20 @@ static void ar7_wdt_update_margin(int new_margin) change =0xffff ;ar7_wdt_change (change); margin = change * prescale_value / vbus_rate; - printk(KERN_INFO DRVNAME -": timer margin %d seconds (prescale %d, change %d, freq %d)\n" , - margin, prescale_value, change, vbus_rate); +pr_info ("timer margin %d seconds (prescale %d, change %d, freq %d)\n" , + margin, prescale_value, change, vbus_rate); }static void ar7_wdt_enable_wdt (void ) { - printk(KERN_DEBUG DRVNAME ": enabling watchdog timer\n"); +pr_debug ("enabling watchdog timer\n" );ar7_wdt_disable (1 );ar7_wdt_kick (1 ); }static void ar7_wdt_disable_wdt (void ) { - printk(KERN_DEBUG DRVNAME ": disabling watchdog timer\n"); +pr_debug ("disabling watchdog timer\n" );ar7_wdt_disable (0 ); }
@@ -183,9 +183,7 @@ static int ar7_wdt_open(struct inode *inode, struct file *file)static int ar7_wdt_release (struct inode *inode,struct file *file) {if (!expect_close) - printk(KERN_WARNING DRVNAME -": watchdog device closed unexpectedly," -"will not disable the watchdog timer\n" ); +pr_warn ("watchdog device closed unexpectedly, will not disable the watchdog timer\n" );else if (!nowayout)ar7_wdt_disable_wdt ();clear_bit (0 , &wdt_is_open);
@@ -283,28 +281,28 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev) ar7_regs_wdt =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"regs" );if (!ar7_regs_wdt) { - printk(KERN_ERR DRVNAME ": could not get registers resource\n"); +pr_err ("could not get registers resource\n" ); rc = -ENODEV ; goto out; }if (!request_mem_region (ar7_regs_wdt->start,resource_size (ar7_regs_wdt),LONGNAME )) { - printk(KERN_WARNING DRVNAME ": watchdog I/O region busy\n"); +pr_warn ("watchdog I/O region busy\n" ); rc = -EBUSY ; goto out; } ar7_wdt =ioremap (ar7_regs_wdt->start,resource_size (ar7_regs_wdt));if (!ar7_wdt) { - printk(KERN_ERR DRVNAME ": could not ioremap registers\n"); +pr_err ("could not ioremap registers\n" ); rc = -ENXIO ; goto out_mem_region; } vbus_clk =clk_get (NULL ,"vbus" );if (IS_ERR (vbus_clk)) { - printk(KERN_ERR DRVNAME ": could not get vbus clock\n"); +pr_err ("could not get vbus clock\n" ); rc =PTR_ERR (vbus_clk); goto out_mem_region; }
@@ -315,7 +313,7 @@ static int __devinit ar7_wdt_probe(struct platform_device *pdev) rc =misc_register (&ar7_wdt_miscdev);if (rc) { - printk(KERN_ERR DRVNAME ": unable to register misc device\n"); +pr_err ("unable to register misc device\n" ); goto out_alloc; } goto out;
drivers/watchdog/at91rm9200_wdt.c +6 -4
@@ -9,6 +9,8 @@* 2 of the License, or (at your option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/bitops.h> #include <linux/errno.h> #include <linux/fs.h>
@@ -209,8 +211,8 @@ static int __devinit at91wdt_probe(struct platform_device *pdev)if (res)return res; -printk (KERN_INFO "AT91 Watchdog Timer enabled (%d seconds%s)\n" , - wdt_time, nowayout ?", nowayout" :"" ); +pr_info ("AT91 Watchdog Timer enabled (%d seconds%s)\n" , + wdt_time, nowayout ?", nowayout" :"" );return 0 ; }
@@ -268,8 +270,8 @@ static int __init at91_wdt_init(void)if not reset to the default */ if (at91_wdt_settimeout (wdt_time)) {at91_wdt_settimeout (WDT_DEFAULT_TIME ); -pr_info ("at91_wdt: wdt_time value must be 1 <= wdt_time <= 256" -", using %d\n" , wdt_time); +pr_info ("wdt_time value must be 1 <= wdt_time <= 256, using %d\n" , + wdt_time); }return platform_driver_register (&at91wdt_driver);
drivers/watchdog/at91sam9_wdt.c +5 -3
@@ -15,6 +15,8 @@* bootloader doesn't write to this register. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/errno.h> #include <linux/fs.h> #include <linux/init.h>
@@ -96,7 +98,7 @@ static void at91_ping(unsigned long data)at91_wdt_reset ();mod_timer (&at91wdt_private.timer, jiffies +WDT_TIMEOUT ); }else - printk(KERN_CRIT DRV_NAME": I will reset your machine !\n"); +pr_crit ("I will reset your machine !\n" ); }/*
@@ -140,7 +142,7 @@ static int at91_wdt_settimeout(unsigned int timeout)/* Check if disabled */ mr =wdt_read (AT91_WDT_MR );if (mr &AT91_WDT_WDDIS ) { - printk(KERN_ERR DRV_NAME": sorry, watchdog is disabled\n"); +pr_err ("sorry, watchdog is disabled\n" );return -EIO ; }
@@ -283,7 +285,7 @@ static int __init at91wdt_probe(struct platform_device *pdev)setup_timer (&at91wdt_private.timer, at91_ping,0 );mod_timer (&at91wdt_private.timer, jiffies +WDT_TIMEOUT ); - printk(KERN_INFO DRV_NAME " enabled (heartbeat=%d sec, nowayout=%d)\n", +pr_info ("enabled (heartbeat=%d sec, nowayout=%d)\n" , heartbeat, nowayout);return 0 ;
drivers/watchdog/ath79_wdt.c +3 -2
@@ -17,6 +17,8 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/bitops.h> #include <linux/errno.h> #include <linux/fs.h>
@@ -114,8 +116,7 @@ static int ath79_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_FLAGS_EXPECT_CLOSE , &wdt_flags))ath79_wdt_disable ();else { -pr_crit (DRIVER_NAME ": device closed unexpectedly, " -"watchdog timer will not stop!\n" ); +pr_crit ("device closed unexpectedly, watchdog timer will not stop!\n" );ath79_wdt_keepalive (); }
drivers/watchdog/bcm47xx_wdt.c +7 -7
@@ -10,6 +10,8 @@* 2 of the License, or (at your option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/bitops.h> #include <linux/errno.h> #include <linux/fs.h>
@@ -91,7 +93,7 @@ static void bcm47xx_timer_tick(unsigned long unused)bcm47xx_wdt_hw_start ();mod_timer (&wdt_timer, jiffies +HZ ); }else { - printk(KERN_CRIT DRV_NAME "Watchdog will fire soon!!!\n"); +pr_crit ("Watchdog will fire soon!!!\n" ); } }
@@ -140,8 +142,7 @@ static int bcm47xx_wdt_release(struct inode *inode, struct file *file)if (expect_release ==42 ) {bcm47xx_wdt_stop (); }else { - printk(KERN_CRIT DRV_NAME - ": Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );bcm47xx_wdt_start (); }
@@ -270,8 +271,7 @@ static int __init bcm47xx_wdt_init(void)if (bcm47xx_wdt_settimeout (wdt_time)) {bcm47xx_wdt_settimeout (WDT_DEFAULT_TIME ); - printk(KERN_INFO DRV_NAME ": " -"wdt_time value must be 0 < wdt_time < %d, using %d\n" , +pr_info ("wdt_time value must be 0 < wdt_time < %d, using %d\n" , (WDT_MAX_TIME +1 ), wdt_time); }
@@ -285,8 +285,8 @@ static int __init bcm47xx_wdt_init(void)return ret; } -printk (KERN_INFO "BCM47xx Watchdog Timer enabled (%d seconds%s)\n" , - wdt_time, nowayout ?", nowayout" :"" ); +pr_info ("BCM47xx Watchdog Timer enabled (%d seconds%s)\n" , + wdt_time, nowayout ?", nowayout" :"" );return 0 ; }
drivers/watchdog/bcm63xx_wdt.c +4 -3
@@ -10,6 +10,8 @@* 2 of the License, or (at your option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/bitops.h> #include <linux/errno.h> #include <linux/fs.h>
@@ -82,7 +84,7 @@ static void bcm63xx_timer_tick(unsigned long unused)bcm63xx_wdt_hw_start ();mod_timer (&bcm63xx_wdt_device.timer, jiffies +HZ ); }else - printk(KERN_CRIT PFX ": watchdog will restart system\n"); +pr_crit ("watchdog will restart system\n" ); }static void bcm63xx_wdt_pet (void )
@@ -126,8 +128,7 @@ static int bcm63xx_wdt_release(struct inode *inode, struct file *file)if (expect_close ==42 )bcm63xx_wdt_pause ();else { - printk(KERN_CRIT PFX - ": Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );bcm63xx_wdt_start (); }clear_bit (0 , &bcm63xx_wdt_device.inuse);
drivers/watchdog/bfin_wdt.c +10 -17
@@ -11,6 +11,8 @@* Licensed under the GPL-2 or later. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/platform_device.h> #include <linux/module.h> #include <linux/moduleparam.h>
@@ -28,15 +30,8 @@ #define stamp(fmt, args...) \ pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)#define stampit () stamp("here i am") -#define pr_devinit(fmt, args...) \ - ({ static const __devinitconst char __fmt[] = fmt; \ - printk(__fmt, ## args); }) -#define pr_init(fmt, args...) \ - ({ static const __initconst char __fmt[] = fmt; \ - printk(__fmt, ## args); })#define WATCHDOG_NAME "bfin-wdt" -#define PFX WATCHDOG_NAME ": "/* The BF561 has two watchdogs (one per core), but since Linux * only runs on core A, we'll just work with that one.
@@ -126,7 +121,7 @@ static int bfin_wdt_set_timeout(unsigned long t)stamp ("maxtimeout=%us newtimeout=%lus (cnt=%#x)" , max_t, t, cnt);if (t > max_t) { - printk(KERN_WARNING PFX "timeout value is too large\n"); +pr_warn ("timeout value is too large\n" );return -EINVAL ; }
@@ -182,8 +177,7 @@ static int bfin_wdt_release(struct inode *inode, struct file *file)if (expect_close ==42 )bfin_wdt_stop ();else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );bfin_wdt_keepalive (); } expect_close =0 ;
@@ -368,14 +362,13 @@ static int __devinit bfin_wdt_probe(struct platform_device *pdev) ret =misc_register (&bfin_wdt_miscdev);if (ret) { - pr_devinit(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret);return ret; } - pr_devinit(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n", - timeout, nowayout); +pr_info ("initialized: timeout=%d sec (nowayout=%d)\n" , + timeout, nowayout);return 0 ; }
@@ -439,14 +432,14 @@ static int __init bfin_wdt_init(void)*/ ret =platform_driver_register (&bfin_wdt_driver);if (ret) { - pr_init(KERN_ERR PFX "unable to register driver\n"); +pr_err ("unable to register driver\n" );return ret; } bfin_wdt_device =platform_device_register_simple (WATCHDOG_NAME ,-1 ,NULL ,0 );if (IS_ERR (bfin_wdt_device)) { - pr_init(KERN_ERR PFX "unable to register device\n"); +pr_err ("unable to register device\n" );platform_driver_unregister (&bfin_wdt_driver);return PTR_ERR (bfin_wdt_device); }
drivers/watchdog/booke_wdt.c +8 -6
@@ -12,6 +12,8 @@* option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/fs.h> #include <linux/smp.h>
@@ -221,8 +223,8 @@ static int booke_wdt_open(struct inode *inode, struct file *file)if (booke_wdt_enabled ==0 ) { booke_wdt_enabled =1 ;on_each_cpu (__booke_wdt_enable,NULL ,0 ); -pr_debug ("booke_wdt: watchdog enabled (timeout = %llu sec)\n" , -period_to_sec (booke_wdt_period)); +pr_debug ("watchdog enabled (timeout = %llu sec)\n" , +period_to_sec (booke_wdt_period)); }spin_unlock (&booke_wdt_lock);
@@ -239,7 +241,7 @@ static int booke_wdt_release(struct inode *inode, struct file *file)*/ on_each_cpu (__booke_wdt_disable,NULL ,0 ); booke_wdt_enabled =0 ; -pr_debug ("booke_wdt: watchdog disabled\n" ); +pr_debug ("watchdog disabled\n" );#endif clear_bit (0 , &wdt_is_active);
@@ -271,19 +273,19 @@ static int __init booke_wdt_init(void) {int ret =0 ; -pr_info ("booke_wdt: powerpc book-e watchdog driver loaded\n" ); +pr_info ("powerpc book-e watchdog driver loaded\n" ); ident.firmware_version = cur_cpu_spec->pvr_value; ret =misc_register (&booke_wdt_miscdev);if (ret) { -pr_err ("booke_wdt: cannot register device (minor=%u, ret=%i)\n" , +pr_err ("cannot register device (minor=%u, ret=%i)\n" ,WATCHDOG_MINOR , ret);return ret; }spin_lock (&booke_wdt_lock);if (booke_wdt_enabled ==1 ) { -pr_info ("booke_wdt: watchdog enabled (timeout = %llu sec)\n" , +pr_info ("watchdog enabled (timeout = %llu sec)\n" ,period_to_sec (booke_wdt_period));on_each_cpu (__booke_wdt_enable,NULL ,0 ); }
drivers/watchdog/cpu5wdt.c +10 -9
@@ -19,6 +19,8 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -71,7 +73,7 @@ static struct {static void cpu5wdt_trigger (unsigned long unused) {if (verbose >2 ) - printk(KERN_DEBUG PFX "trigger at %i ticks\n", ticks); +pr_debug ("trigger at %i ticks\n" , ticks);if (cpu5wdt_device.running) ticks--;
@@ -96,7 +98,7 @@ static void cpu5wdt_reset(void) ticks = cpu5wdt_device.default_ticks;if (verbose) - printk(KERN_DEBUG PFX "reset (%i ticks)\n", (int) ticks); +pr_debug ("reset (%i ticks)\n" , (int ) ticks); }
@@ -129,7 +131,7 @@ static int cpu5wdt_stop(void) ticks = cpu5wdt_device.default_ticks;spin_unlock_irqrestore (&cpu5wdt_lock, flags);if (verbose) - printk(KERN_CRIT PFX "stop not possible\n"); +pr_crit ("stop not possible\n" );return -EIO ; }
@@ -219,8 +221,7 @@ static int __devinit cpu5wdt_init(void)int err;if (verbose) - printk(KERN_DEBUG PFX -"port=0x%x, verbose=%i\n" , port, verbose); +pr_debug ("port=0x%x, verbose=%i\n" , port, verbose);init_completion (&cpu5wdt_device.stop); cpu5wdt_device.queue =0 ;
@@ -228,7 +229,7 @@ static int __devinit cpu5wdt_init(void) cpu5wdt_device.default_ticks = ticks;if (!request_region (port,CPU5WDT_EXTENT ,PFX )) { - printk(KERN_ERR PFX "request_region failed\n"); +pr_err ("request_region failed\n" ); err = -EBUSY ; goto no_port; }
@@ -237,16 +238,16 @@ static int __devinit cpu5wdt_init(void) val =inb (port +CPU5WDT_STATUS_REG ); val = (val >>2 ) &1 ;if (!val) - printk(KERN_INFO PFX "sorry, was my fault\n"); +pr_info ("sorry, was my fault\n" ); err =misc_register (&cpu5wdt_misc);if (err <0 ) { - printk(KERN_ERR PFX "misc_register failed\n"); +pr_err ("misc_register failed\n" ); goto no_misc; } - printk(KERN_INFO PFX "init success\n"); +pr_info ("init success\n" );return 0 ; no_misc:
drivers/watchdog/cpwd.c +10 -10
@@ -14,6 +14,8 @@* Copyright (C) 2008 David S. Miller <[email protected]> */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/module.h> #include <linux/fs.h>
@@ -35,7 +37,6 @@#include <asm/watchdog.h> #define DRIVER_NAME "cpwd" -#define PFX DRIVER_NAME ": "#define WD_OBPNAME "watchdog"#define WD_BADMODEL "SUNW,501-5336"
@@ -385,8 +386,7 @@ static int cpwd_open(struct inode *inode, struct file *f)if (!p->initialized) {if (request_irq (p->irq, &cpwd_interrupt,IRQF_SHARED ,DRIVER_NAME , p)) { - printk(KERN_ERR PFX "Cannot register IRQ %d\n", - p->irq); +pr_err ("Cannot register IRQ %d\n" , p->irq);mutex_unlock (&cpwd_mutex);return -EBUSY ; }
@@ -542,7 +542,7 @@ static int __devinit cpwd_probe(struct platform_device *op) p =kzalloc (sizeof (*p),GFP_KERNEL ); err = -ENOMEM ;if (!p) { - printk(KERN_ERR PFX "Unable to allocate struct cpwd.\n"); +pr_err ("Unable to allocate struct cpwd\n" ); goto out; }
@@ -553,14 +553,14 @@ static int __devinit cpwd_probe(struct platform_device *op) p->regs =of_ioremap (&op->resource[0 ],0 ,4 *WD_TIMER_REGSZ ,DRIVER_NAME );if (!p->regs) { - printk(KERN_ERR PFX "Unable to map registers.\n"); +pr_err ("Unable to map registers\n" ); goto out_free; } options =of_find_node_by_path ("/options" ); err = -ENODEV ;if (!options) { - printk(KERN_ERR PFX "Unable to find /options node.\n"); +pr_err ("Unable to find /options node\n" ); goto out_iounmap; }
@@ -605,8 +605,8 @@ static int __devinit cpwd_probe(struct platform_device *op) err =misc_register (&p->devs[i].misc);if (err) { -printk (KERN_ERR "Could not register misc device for " -"dev %d\n" , i); +pr_err ("Could not register misc device for dev %d\n" , + i); goto out_unregister; } }
@@ -617,8 +617,8 @@ static int __devinit cpwd_probe(struct platform_device *op) cpwd_timer.data = (unsigned long ) p; cpwd_timer.expires =WD_BTIMEOUT ; - printk(KERN_INFO PFX "PLD defect workaround enabled for " - "model " WD_BADMODEL ".\n"); +pr_info ("PLD defect workaround enabled for model %s\n" , +WD_BADMODEL ); }dev_set_drvdata (&op->dev, p);
drivers/watchdog/dw_wdt.c +2 -1
@@ -16,7 +16,8 @@* If we receive an expected close for the watchdog then we keep the timer * running, otherwise the timer is stopped and the watchdog will expire. */ -#define pr_fmt (fmt) "dw_wdt: " fmt + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/bitops.h> #include <linux/clk.h>
drivers/watchdog/ep93xx_wdt.c +5 -7
@@ -23,6 +23,8 @@* - Add a few missing ioctls */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/fs.h> #include <linux/miscdevice.h>
@@ -33,7 +35,6 @@#include <mach/hardware.h> #define WDT_VERSION "0.3" -#define PFX "ep93xx_wdt: "/* default timeout (secs) */ #define WDT_TIMEOUT 30
@@ -173,8 +174,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_OK_TO_CLOSE , &wdt_status))wdt_shutdown ();else - printk(KERN_CRIT PFX -"Device closed unexpectedly - timer will not stop\n" ); +pr_crit ("Device closed unexpectedly - timer will not stop\n" );clear_bit (WDT_IN_USE , &wdt_status);clear_bit (WDT_OK_TO_CLOSE , &wdt_status);
@@ -214,15 +214,13 @@ static int __init ep93xx_wdt_init(void) boot_status =__raw_readl (EP93XX_WDT_WATCHDOG ) &0x01 ?1 :0 ; - printk(KERN_INFO PFX "EP93XX watchdog, driver version " -WDT_VERSION "%s\n" , +pr_info ("EP93XX watchdog, driver version " WDT_VERSION "%s\n" , (__raw_readl (EP93XX_WDT_WATCHDOG ) &0x08 ) ?" (nCS1 disable detected)" :"" );if (timeout <1 || timeout >3600 ) { timeout =WDT_TIMEOUT ; - printk(KERN_INFO PFX -"timeout value must be 1<=x<=3600, using %d\n" , +pr_info ("timeout value must be 1<=x<=3600, using %d\n" , timeout); }
drivers/watchdog/eurotechwdt.c +13 -15
@@ -45,6 +45,8 @@* of the on-board SUPER I/O device SMSC FDC 37B782. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/interrupt.h> #include <linux/module.h> #include <linux/moduleparam.h>
@@ -144,11 +146,11 @@ static void eurwdt_activate_timer(void)/* Setting interrupt line */ if (irq ==2 || irq >15 || irq <0 ) { -printk (KERN_ERR ": invalid irq number\n" ); +pr_err ("invalid irq number\n" ); irq =0 ;/* if invalid we disable interrupt */ }if (irq ==0 ) -printk (KERN_INFO ": interrupt disabled\n" ); +pr_info ("interrupt disabled\n" );eurwdt_write_reg (WDT_TIMER_CFG , irq <<4 );
@@ -163,12 +165,12 @@ static void eurwdt_activate_timer(void)static irqreturn_t eurwdt_interrupt (int irq,void *dev_id) { -printk (KERN_CRIT "timeout WDT timeout\n" ); +pr_crit ("timeout WDT timeout\n" );#ifdef ONLY_TESTING -printk (KERN_CRIT "Would Reboot.\n" ); +pr_crit ("Would Reboot\n" );#else -printk (KERN_CRIT "Initiating system reboot.\n" ); +pr_crit ("Initiating system reboot\n" );emergency_restart ();#endif return IRQ_HANDLED ;
@@ -335,8 +337,7 @@ static int eurwdt_release(struct inode *inode, struct file *file)if (eur_expect_close ==42 )eurwdt_disable_timer ();else { -printk (KERN_CRIT -"eurwdt: Unexpected close, not stopping watchdog!\n" ); +pr_crit ("Unexpected close, not stopping watchdog!\n" );eurwdt_ping (); }clear_bit (0 , &eurwdt_is_open);
@@ -429,35 +430,32 @@ static int __init eurwdt_init(void) ret =request_irq (irq, eurwdt_interrupt,0 ,"eurwdt" ,NULL );if (ret) { -printk (KERN_ERR "eurwdt: IRQ %d is not free.\n" , irq); +pr_err ("IRQ %d is not free\n" , irq); goto out; }if (!request_region (io,2 ,"eurwdt" )) { -printk (KERN_ERR "eurwdt: IO %X is not free.\n" , io); +pr_err ("IO %X is not free\n" , io); ret = -EBUSY ; goto outirq; } ret =register_reboot_notifier (&eurwdt_notifier);if (ret) { -printk (KERN_ERR -"eurwdt: can't register reboot notifier (err=%d)\n" , ret); +pr_err ("can't register reboot notifier (err=%d)\n" , ret); goto outreg; } ret =misc_register (&eurwdt_miscdev);if (ret) { -printk (KERN_ERR "eurwdt: can't misc_register on minor=%d\n" , -WATCHDOG_MINOR ); +pr_err ("can't misc_register on minor=%d\n" ,WATCHDOG_MINOR ); goto outreboot; }eurwdt_unlock_chip (); ret =0 ; -printk (KERN_INFO "Eurotech WDT driver 0.01 at %X (Interrupt %d)" -" - timeout event: %s\n" , +pr_info ("Eurotech WDT driver 0.01 at %X (Interrupt %d) - timeout event: %s\n" , io, irq, (!strcmp ("int" , ev) ?"int" :"reboot" )); out:
drivers/watchdog/f71808e_wdt.c +17 -23
@@ -19,6 +19,8 @@* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/err.h> #include <linux/fs.h> #include <linux/init.h>
@@ -189,8 +191,7 @@ static inline int superio_enter(int base) {/* Don't step on other drivers' I/O space by accident */ if (!request_muxed_region (base,2 ,DRVNAME )) { - printk(KERN_ERR DRVNAME ": I/O address 0x%04x already in use\n", - (int)base); +pr_err ("I/O address 0x%04x already in use\n" , (int )base);return -EBUSY ; }
@@ -217,7 +218,7 @@ static int watchdog_set_timeout(int timeout) {if (timeout <=0 || timeout > max_timeout) { - printk(KERN_ERR DRVNAME ": watchdog timeout out of range\n"); +pr_err ("watchdog timeout out of range\n" );return -EINVAL ; }
@@ -252,7 +253,7 @@ static int watchdog_set_pulse_width(unsigned int pw) }else if (pw <=5000 ) { watchdog.pulse_val =3 ; }else { - printk(KERN_ERR DRVNAME ": pulse width out of range\n"); +pr_err ("pulse width out of range\n" ); err = -EINVAL ; goto exit_unlock; }
@@ -309,8 +310,7 @@ static int f71862fg_pin_configure(unsigned short ioaddr)if (ioaddr)superio_set_bit (ioaddr,SIO_REG_MFUNCT1 ,1 ); }else { - printk(KERN_ERR DRVNAME ": Invalid argument f71862fg_pin=%d\n", - f71862fg_pin); +pr_err ("Invalid argument f71862fg_pin=%d\n" , f71862fg_pin);return -EINVAL ; }return 0 ;
@@ -487,8 +487,7 @@ static int watchdog_release(struct inode *inode, struct file *file)if (!watchdog.expect_close) {watchdog_keepalive (); - printk(KERN_CRIT DRVNAME - ": Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" ); }else if (!nowayout) {watchdog_stop (); }
@@ -672,25 +671,22 @@ static int __init watchdog_init(int sioaddr) err =misc_register (&watchdog_miscdev);if (err) { - printk(KERN_ERR DRVNAME -": cannot register miscdev on minor=%d\n" , - watchdog_miscdev.minor); +pr_err ("cannot register miscdev on minor=%d\n" , + watchdog_miscdev.minor); goto exit_reboot; }if (start_withtimeout) {if (start_withtimeout <=0 || start_withtimeout > max_timeout) { - printk(KERN_ERR DRVNAME - ": starting timeout out of range\n"); +pr_err ("starting timeout out of range\n" ); err = -EINVAL ; goto exit_miscdev; } err =watchdog_start ();if (err) { - printk(KERN_ERR DRVNAME - ": cannot start watchdog timer\n"); +pr_err ("cannot start watchdog timer\n" ); goto exit_miscdev; }
@@ -720,8 +716,7 @@ static int __init watchdog_init(int sioaddr)if (nowayout)__module_get (THIS_MODULE ); - printk(KERN_INFO DRVNAME -": watchdog started with initial timeout of %u sec\n" , +pr_info ("watchdog started with initial timeout of %u sec\n" , start_withtimeout); }
@@ -746,7 +741,7 @@ static int __init f71808e_find(int sioaddr) devid =superio_inw (sioaddr,SIO_REG_MANID );if (devid !=SIO_FINTEK_ID ) { -pr_debug (DRVNAME ": Not a Fintek device\n" ); +pr_debug ("Not a Fintek device\n" ); err = -ENODEV ; goto exit; }
@@ -774,13 +769,13 @@ static int __init f71808e_find(int sioaddr) err = -ENODEV ; goto exit;default : - printk(KERN_INFO DRVNAME ": Unrecognized Fintek device: %04x\n", - (unsigned int)devid); +pr_info ("Unrecognized Fintek device: %04x\n" , + (unsigned int )devid); err = -ENODEV ; goto exit; } - printk(KERN_INFO DRVNAME ": Found %s watchdog chip, revision %d\n", +pr_info ("Found %s watchdog chip, revision %d\n" , f71808e_names[watchdog.type], (int )superio_inb (sioaddr,SIO_REG_DEVREV )); exit:
@@ -808,8 +803,7 @@ static int __init f71808e_init(void) static void __exit f71808e_exit(void) {if (watchdog_is_running ()) { - printk(KERN_WARNING DRVNAME - ": Watchdog timer still running, stopping it\n"); +pr_warn ("Watchdog timer still running, stopping it\n" );watchdog_stop (); }misc_deregister (&watchdog_miscdev);
drivers/watchdog/gef_wdt.c +6 -5
@@ -24,6 +24,8 @@* capabilities) a kernel-based watchdog. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/compiler.h> #include <linux/init.h>
@@ -110,7 +112,7 @@ static void gef_wdt_handler_enable(void)if (gef_wdt_toggle_wdc (GEF_WDC_ENABLED_FALSE ,GEF_WDC_ENABLE_SHIFT )) {gef_wdt_service (); -printk (KERN_NOTICE "gef_wdt: watchdog activated\n" ); +pr_notice ("watchdog activated\n" ); } }
@@ -118,7 +120,7 @@ static void gef_wdt_handler_disable(void) {if (gef_wdt_toggle_wdc (GEF_WDC_ENABLED_TRUE ,GEF_WDC_ENABLE_SHIFT )) -printk (KERN_NOTICE "gef_wdt: watchdog deactivated\n" ); +pr_notice ("watchdog deactivated\n" ); }static void gef_wdt_set_timeout (unsigned int timeout)
@@ -234,8 +236,7 @@ static int gef_wdt_release(struct inode *inode, struct file *file)if (expect_close ==42 )gef_wdt_handler_disable ();else { -printk (KERN_CRIT -"gef_wdt: unexpected close, not stopping timer!\n" ); +pr_crit ("unexpected close, not stopping timer!\n" );gef_wdt_service (); } expect_close =0 ;
@@ -313,7 +314,7 @@ static struct platform_driver gef_wdt_driver = {static int __init gef_wdt_init (void ) { -printk (KERN_INFO "GE watchdog driver\n" ); +pr_info ("GE watchdog driver\n" );return platform_driver_register (&gef_wdt_driver); }
drivers/watchdog/geodewdt.c +3 -2
@@ -9,6 +9,7 @@* 2 of the License, or (at your option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/module.h> #include <linux/moduleparam.h>
@@ -100,7 +101,7 @@ static int geodewdt_release(struct inode *inode, struct file *file)geodewdt_disable ();module_put (THIS_MODULE ); }else { -printk (KERN_CRIT "Unexpected close - watchdog is not stopping.\n" ); +pr_crit ("Unexpected close - watchdog is not stopping\n" );geodewdt_ping ();set_bit (WDT_FLAGS_ORPHAN , &wdt_flags);
@@ -220,7 +221,7 @@ static int __devinit geodewdt_probe(struct platform_device *dev) wdt_timer =cs5535_mfgpt_alloc_timer (MFGPT_TIMER_ANY ,MFGPT_DOMAIN_WORKING );if (!wdt_timer) { -printk (KERN_ERR "geodewdt: No timers were available\n" ); +pr_err ("No timers were available\n" );return -ENODEV ; }
drivers/watchdog/hpwdt.c +10 -17
@@ -13,6 +13,8 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/device.h> #include <linux/fs.h> #include <linux/init.h>
@@ -235,8 +237,7 @@ static int __devinit cru_detect(unsigned long map_entry,asminline_call (&cmn_regs, bios32_entrypoint);if (cmn_regs.u1.ral !=0 ) { -printk (KERN_WARNING -"hpwdt: Call succeeded but with an error: 0x%x\n" , +pr_warn ("Call succeeded but with an error: 0x%x\n" , cmn_regs.u1.ral); }else { physical_bios_base = cmn_regs.u2.rebx;
@@ -256,14 +257,10 @@ static int __devinit cru_detect(unsigned long map_entry, } } -printk (KERN_DEBUG "hpwdt: CRU Base Address: 0x%lx\n" , - physical_bios_base); -printk (KERN_DEBUG "hpwdt: CRU Offset Address: 0x%lx\n" , - physical_bios_offset); -printk (KERN_DEBUG "hpwdt: CRU Length: 0x%lx\n" , - cru_length); -printk (KERN_DEBUG "hpwdt: CRU Mapped Address: %p\n" , - &cru_rom_addr); +pr_debug ("CRU Base Address: 0x%lx\n" , physical_bios_base); +pr_debug ("CRU Offset Address: 0x%lx\n" , physical_bios_offset); +pr_debug ("CRU Length: 0x%lx\n" , cru_length); +pr_debug ("CRU Mapped Address: %p\n" , &cru_rom_addr); }iounmap (bios32_map);return retval;
@@ -458,16 +455,13 @@ static void hpwdt_ping(void)static int hpwdt_change_timer (int new_margin) {if (new_margin <1 || new_margin >HPWDT_MAX_TIMER ) { -printk (KERN_WARNING -"hpwdt: New value passed in is invalid: %d seconds.\n" , +pr_warn ("New value passed in is invalid: %d seconds\n" , new_margin);return -EINVAL ; } soft_margin = new_margin; -printk (KERN_DEBUG -"hpwdt: New timer passed in is %d seconds.\n" , - new_margin); +pr_debug ("New timer passed in is %d seconds\n" , new_margin); reload =SECS_TO_TICKS (soft_margin);return 0 ;
@@ -535,8 +529,7 @@ static int hpwdt_release(struct inode *inode, struct file *file)if (expect_release ==42 ) {hpwdt_stop (); }else { -printk (KERN_CRIT -"hpwdt: Unexpected close, not stopping watchdog!\n" ); +pr_crit ("Unexpected close, not stopping watchdog!\n" );hpwdt_ping (); }
drivers/watchdog/i6300esb.c +16 -19
@@ -27,6 +27,8 @@* Includes, defines, variables, module parameters, ... */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h>
@@ -44,7 +46,6 @@#define ESB_VERSION "0.05"#define ESB_MODULE_NAME "i6300ESB timer"#define ESB_DRIVER_NAME ESB_MODULE_NAME ", v" ESB_VERSION -#define PFX ESB_MODULE_NAME ": "/* PCI configuration registers */ #define ESB_CONFIG_REG 0x60/* Config register */
@@ -213,8 +214,7 @@ static int esb_release(struct inode *inode, struct file *file)if (esb_expect_close ==42 )esb_timer_stop ();else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); +pr_crit ("Unexpected close, not stopping watchdog!\n" );esb_timer_keepalive (); }clear_bit (0 , &timer_alive);
@@ -347,19 +347,19 @@ MODULE_DEVICE_TABLE(pci, esb_pci_tbl);static unsigned char __devinit esb_getdevice (struct pci_dev *pdev) {if (pci_enable_device (pdev)) { - printk(KERN_ERR PFX "failed to enable device\n"); +pr_err ("failed to enable device\n" ); goto err_devput; }if (pci_request_region (pdev,0 ,ESB_MODULE_NAME )) { - printk(KERN_ERR PFX "failed to request region\n"); +pr_err ("failed to request region\n" ); goto err_disable; }BASEADDR =pci_ioremap_bar (pdev,0 );if (BASEADDR ==NULL ) {/* Something's wrong here, BASEADDR has to be set */ - printk(KERN_ERR PFX "failed to get BASEADDR\n"); +pr_err ("failed to get BASEADDR\n" ); goto err_release; }
@@ -397,7 +397,7 @@ static void __devinit esb_initdevice(void)/* Check that the WDT isn't already locked */ pci_read_config_byte (esb_pci,ESB_LOCK_REG , &val1);if (val1 &ESB_WDT_LOCK ) - printk(KERN_WARNING PFX "nowayout already set\n"); +pr_warn ("nowayout already set\n" );/* Set the timer to watchdog mode and disable it for now */ pci_write_config_byte (esb_pci,ESB_LOCK_REG ,0x00 );
@@ -423,11 +423,11 @@ static int __devinit esb_probe(struct pci_dev *pdev, cards_found++;if (cards_found ==1 ) - printk(KERN_INFO PFX "Intel 6300ESB WatchDog Timer Driver v%s\n", +pr_info ("Intel 6300ESB WatchDog Timer Driver v%s\n" ,ESB_VERSION );if (cards_found >1 ) { - printk(KERN_ERR PFX "This driver only supports 1 device\n"); +pr_err ("This driver only supports 1 device\n" );return -ENODEV ; }
@@ -439,9 +439,8 @@ static int __devinit esb_probe(struct pci_dev *pdev,if not reset to the default */ if (heartbeat <0x1 || heartbeat >2 *0x03ff ) { heartbeat =WATCHDOG_HEARTBEAT ; - printk(KERN_INFO PFX -"heartbeat value must be 1<heartbeat<2046, using %d\n" , - heartbeat); +pr_info ("heartbeat value must be 1<heartbeat<2046, using %d\n" , + heartbeat); }/* Initialize the watchdog and make sure it does not run */
@@ -450,14 +449,12 @@ static int __devinit esb_probe(struct pci_dev *pdev,/* Register the watchdog so that userspace has access to it */ ret =misc_register (&esb_miscdev);if (ret !=0 ) { - printk(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret); goto err_unmap; } - printk(KERN_INFO PFX -"initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n" , - BASEADDR, heartbeat, nowayout); +pr_info ("initialized (0x%p). heartbeat=%d sec (nowayout=%d)\n" , +BASEADDR , heartbeat, nowayout);return 0 ; err_unmap:
@@ -503,7 +500,7 @@ static int __init watchdog_init(void) static void __exit watchdog_cleanup(void) {pci_unregister_driver (&esb_driver); - printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); +pr_info ("Watchdog Module Unloaded\n" ); }module_init (watchdog_init);
drivers/watchdog/iTCO_vendor_support.c +4 -3
@@ -17,10 +17,11 @@* Includes, defines, variables, module parameters, ... */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +/* Module and version information */ #define DRV_NAME "iTCO_vendor_support"#define DRV_VERSION "1.04" -#define PFX DRV_NAME ": "/* Includes */ #include <linux/module.h> /* For module specific items */
@@ -355,13 +356,13 @@ EXPORT_SYMBOL(iTCO_vendor_check_noreboot_on);static int __init iTCO_vendor_init_module (void ) { - printk(KERN_INFO PFX "vendor-support=%d\n", vendorsupport); +pr_info ("vendor-support=%d\n" , vendorsupport);return 0 ; } static void __exit iTCO_vendor_exit_module(void) { - printk(KERN_INFO PFX "Module Unloaded\n"); +pr_info ("Module Unloaded\n" ); }module_init (iTCO_vendor_init_module);
drivers/watchdog/iTCO_wdt.c +23 -32
141 lines not on this page · raw message
drivers/watchdog/ib700wdt.c +9 -13
@@ -31,6 +31,8 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/types.h> #include <linux/miscdevice.h>
@@ -53,7 +55,6 @@ static char expect_close;/* Module information */ #define DRV_NAME "ib700wdt" -#define PFX DRV_NAME ": "/* *
@@ -246,8 +247,7 @@ static int ibwdt_close(struct inode *inode, struct file *file)if (expect_close ==42 ) {ibwdt_disable (); }else { - printk(KERN_CRIT PFX - "WDT device closed unexpectedly. WDT will not stop!\n"); +pr_crit ("WDT device closed unexpectedly. WDT will not stop!\n" );ibwdt_ping (); }clear_bit (0 , &ibwdt_is_open);
@@ -284,16 +284,14 @@ static int __devinit ibwdt_probe(struct platform_device *dev)#if WDT_START !=WDT_STOP if (!request_region (WDT_STOP ,1 ,"IB700 WDT" )) { - printk(KERN_ERR PFX "STOP method I/O %X is not available.\n", - WDT_STOP); +pr_err ("STOP method I/O %X is not available\n" ,WDT_STOP ); res = -EIO ; goto out_nostopreg; }#endif if (!request_region (WDT_START ,1 ,"IB700 WDT" )) { - printk(KERN_ERR PFX "START method I/O %X is not available.\n", - WDT_START); +pr_err ("START method I/O %X is not available\n" ,WDT_START ); res = -EIO ; goto out_nostartreg; }
@@ -302,13 +300,12 @@ static int __devinit ibwdt_probe(struct platform_device *dev)* if not reset to the default */ if (ibwdt_set_heartbeat (timeout)) {ibwdt_set_heartbeat (WATCHDOG_TIMEOUT ); - printk(KERN_INFO PFX - "timeout value must be 0<=x<=30, using %d\n", timeout); +pr_info ("timeout value must be 0<=x<=30, using %d\n" , timeout); } res =misc_register (&ibwdt_miscdev);if (res) { - printk(KERN_ERR PFX "failed to register misc device\n"); +pr_err ("failed to register misc device\n" ); goto out_nomisc; }return 0 ;
@@ -353,8 +350,7 @@ static int __init ibwdt_init(void) {int err; - printk(KERN_INFO PFX - "WDT driver for IB700 single board computer initialising.\n"); +pr_info ("WDT driver for IB700 single board computer initialising\n" ); err =platform_driver_register (&ibwdt_driver);if (err)
@@ -378,7 +374,7 @@ static void __exit ibwdt_exit(void) {platform_device_unregister (ibwdt_platform_device);platform_driver_unregister (&ibwdt_driver); - printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); +pr_info ("Watchdog Module Unloaded\n" ); }module_init (ibwdt_init);
drivers/watchdog/ibmasr.c +6 -8
@@ -10,6 +10,8 @@* of the GNU Public License, incorporated herein by reference. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/fs.h> #include <linux/kernel.h> #include <linux/module.h>
@@ -31,8 +33,6 @@ enum { ASMTYPE_SPRUCE, }; -#define PFX "ibmasr: " -#define TOPAZ_ASR_REG_OFFSET 4#define TOPAZ_ASR_TOGGLE 0x40#define TOPAZ_ASR_DISABLE 0x80
@@ -234,12 +234,11 @@ static int __init asr_get_base_address(void) }if (!request_region (asr_base, asr_length,"ibmasr" )) { - printk(KERN_ERR PFX "address %#x already in use\n", - asr_base); +pr_err ("address %#x already in use\n" , asr_base);return -EBUSY ; } - printk(KERN_INFO PFX "found %sASR @ addr %#x\n", type, asr_base); +pr_info ("found %sASR @ addr %#x\n" , type, asr_base);return 0 ; }
@@ -332,8 +331,7 @@ static int asr_release(struct inode *inode, struct file *file)if (asr_expect_close ==42 )asr_disable ();else { - printk(KERN_CRIT PFX - "unexpected close, not stopping watchdog!\n"); +pr_crit ("unexpected close, not stopping watchdog!\n" );asr_toggle (); }clear_bit (0 , &asr_is_open);
@@ -393,7 +391,7 @@ static int __init ibmasr_init(void) rc =misc_register (&asr_miscdev);if (rc <0 ) {release_region (asr_base, asr_length); - printk(KERN_ERR PFX "failed to register misc device\n"); +pr_err ("failed to register misc device\n" );return rc; }
drivers/watchdog/indydog.c +8 -12
@@ -12,6 +12,8 @@* based on softdog.c by Alan Cox <[email protected]> */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -26,7 +28,6 @@#include <linux/uaccess.h> #include <asm/sgi/mc.h> -#define PFX "indydog: "static unsigned long indydog_alive;static DEFINE_SPINLOCK (indydog_lock);
@@ -60,7 +61,7 @@ static void indydog_stop(void) sgimc->cpuctrl0 = mc_ctrl0;spin_unlock (&indydog_lock); - printk(KERN_INFO PFX "Stopped watchdog timer.\n"); +pr_info ("Stopped watchdog timer\n" ); }static void indydog_ping (void )
@@ -83,7 +84,7 @@ static int indydog_open(struct inode *inode, struct file *file)indydog_start ();indydog_ping (); -printk (KERN_INFO "Started watchdog timer.\n" ); +pr_info ("Started watchdog timer\n" );return nonseekable_open (inode, file); }
@@ -178,30 +179,25 @@ static struct notifier_block indydog_notifier = { .notifier_call = indydog_notify_sys, }; -static char banner[]__initdata = - KERN_INFO PFX "Hardware Watchdog Timer for SGI IP22: 0.3\n"; -static int __init watchdog_init (void ) {int ret; ret =register_reboot_notifier (&indydog_notifier);if (ret) { - printk(KERN_ERR PFX - "cannot register reboot notifier (err=%d)\n", ret); +pr_err ("cannot register reboot notifier (err=%d)\n" , ret);return ret; } ret =misc_register (&indydog_miscdev);if (ret) { - printk(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret);unregister_reboot_notifier (&indydog_notifier);return ret; } -printk (banner); +pr_info ("Hardware Watchdog Timer for SGI IP22: 0.3\n" );return 0 ; }
drivers/watchdog/intel_scu_watchdog.c +34 -37
175 lines not on this page · raw message
drivers/watchdog/intel_scu_watchdog.h +0 -1
@@ -25,7 +25,6 @@#ifndef __INTEL_SCU_WATCHDOG_H#define __INTEL_SCU_WATCHDOG_H -#define PFX "Intel_SCU: "#define WDT_VER "0.3"/* minimum time between interrupts */
drivers/watchdog/iop_wdt.c +6 -5
@@ -24,6 +24,8 @@* Dan Williams <[email protected]> */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/kernel.h> #include <linux/fs.h>
@@ -85,7 +87,7 @@ static int wdt_disable(void)write_wdtcr (IOP_WDTCR_DIS );clear_bit (WDT_ENABLED , &wdt_status);spin_unlock (&wdt_lock); -printk (KERN_INFO "WATCHDOG: Disabled\n" ); +pr_info ("Disabled\n" );return 0 ; }else return 1 ;
@@ -197,8 +199,8 @@ static int iop_wdt_release(struct inode *inode, struct file *file)*/ if (state !=0 ) {wdt_enable (); -printk (KERN_CRIT "WATCHDOG: Device closed unexpectedly - " -"reset in %lu seconds\n" ,iop_watchdog_timeout ()); +pr_crit ("Device closed unexpectedly - reset in %lu seconds\n" , +iop_watchdog_timeout ()); }clear_bit (WDT_IN_USE , &wdt_status);
@@ -238,8 +240,7 @@ static int __init iop_wdt_init(void)with an open */ ret =misc_register (&iop_wdt_miscdev);if (ret ==0 ) -printk (KERN_INFO "iop watchdog timer: timeout %lu sec\n" , -iop_watchdog_timeout ()); +pr_info ("timeout %lu sec\n" ,iop_watchdog_timeout ());return ret; }
drivers/watchdog/it8712f_wdt.c +17 -18
@@ -20,6 +20,8 @@* software is provided AS-IS with no warranties. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h>
@@ -33,6 +35,7 @@#include <linux/io.h> #include <linux/ioport.h> +#define DEBUG #define NAME "it8712f_wdt"MODULE_AUTHOR ("Jorge Boncompte - DTI2 <[email protected]>" );
@@ -158,10 +161,10 @@ static void it8712f_wdt_update_margin(void)*/ if (units <= max_units) { config |=WDT_UNIT_SEC ;/* else UNIT is MINUTES */ - printk(KERN_INFO NAME ": timer margin %d seconds\n", units); +pr_info ("timer margin %d seconds\n" , units); }else { units /=60 ; - printk(KERN_INFO NAME ": timer margin %d minutes\n", units); +pr_info ("timer margin %d minutes\n" , units); }superio_outb (config,WDT_CONFIG );
@@ -184,7 +187,7 @@ static int it8712f_wdt_enable(void)if (ret)return ret; - printk(KERN_DEBUG NAME ": enabling watchdog timer\n"); +pr_debug ("enabling watchdog timer\n" );superio_select (LDN_GPIO );superio_outb (wdt_control_reg,WDT_CONTROL );
@@ -204,7 +207,7 @@ static int it8712f_wdt_disable(void)if (ret)return ret; - printk(KERN_DEBUG NAME ": disabling watchdog timer\n"); +pr_debug ("disabling watchdog timer\n" );superio_select (LDN_GPIO );superio_outb (0 ,WDT_CONFIG );
@@ -331,12 +334,10 @@ static int it8712f_wdt_open(struct inode *inode, struct file *file)static int it8712f_wdt_release (struct inode *inode,struct file *file) {if (expect_close !=42 ) { - printk(KERN_WARNING NAME -": watchdog device closed unexpectedly, will not" - " disable the watchdog timer\n"); +pr_warn ("watchdog device closed unexpectedly, will not disable the watchdog timer\n" ); }else if (!nowayout) {if (it8712f_wdt_disable ()) - printk(KERN_WARNING NAME "Watchdog disable failed\n"); +pr_warn ("Watchdog disable failed\n" ); } expect_close =0 ;clear_bit (0 , &wdt_open);
@@ -374,13 +375,13 @@ static int __init it8712f_wdt_find(unsigned short *address)superio_select (LDN_GAME );superio_outb (1 ,ACT_REG );if (!(superio_inb (ACT_REG ) &0x01 )) { - printk(KERN_ERR NAME ": Device not activated, skipping\n"); +pr_err ("Device not activated, skipping\n" ); goto exit; } *address =superio_inw (BASE_REG );if (*address ==0 ) { - printk(KERN_ERR NAME ": Base address not set, skipping\n"); +pr_err ("Base address not set, skipping\n" ); goto exit; }
@@ -394,8 +395,7 @@ static int __init it8712f_wdt_find(unsigned short *address)if (margin > (max_units *60 )) margin = (max_units *60 ); - printk(KERN_INFO NAME ": Found IT%04xF chip revision %d - " -"using DogFood address 0x%x\n" , +pr_info ("Found IT%04xF chip revision %d - using DogFood address 0x%x\n" , chip_type, revision, *address); exit:
@@ -411,27 +411,26 @@ static int __init it8712f_wdt_init(void)return -ENODEV ;if (!request_region (address,1 ,"IT8712F Watchdog" )) { - printk(KERN_WARNING NAME ": watchdog I/O region busy\n"); +pr_warn ("watchdog I/O region busy\n" );return -EBUSY ; } err =it8712f_wdt_disable ();if (err) { - printk(KERN_ERR NAME ": unable to disable watchdog timer.\n"); +pr_err ("unable to disable watchdog timer\n" ); goto out; } err =register_reboot_notifier (&it8712f_wdt_notifier);if (err) { - printk(KERN_ERR NAME ": unable to register reboot notifier\n"); +pr_err ("unable to register reboot notifier\n" ); goto out; } err =misc_register (&it8712f_wdt_miscdev);if (err) { - printk(KERN_ERR NAME -": cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, err); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , err); goto reboot_out; }
drivers/watchdog/it87_wdt.c +17 -25
101 lines not on this page · raw message
drivers/watchdog/ixp2000_wdt.c +4 -3
@@ -16,6 +16,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -158,8 +160,7 @@ static int ixp2000_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_OK_TO_CLOSE , &wdt_status))wdt_disable ();else -printk (KERN_CRIT "WATCHDOG: Device closed unexpectedly - " -"timer will not stop\n" ); +pr_crit ("Device closed unexpectedly - timer will not stop\n" );clear_bit (WDT_IN_USE , &wdt_status);clear_bit (WDT_OK_TO_CLOSE , &wdt_status);
@@ -185,7 +186,7 @@ static struct miscdevice ixp2000_wdt_miscdev = {static int __init ixp2000_wdt_init (void ) {if ((*IXP2000_PRODUCT_ID &0x001ffef0 ) ==0x00000000 ) { -printk (KERN_INFO "Unable to use IXP2000 watchdog due to IXP2800 erratum #25.\n" ); +pr_info ("Unable to use IXP2000 watchdog due to IXP2800 erratum #25\n" );return -EIO ; } wdt_tick_rate = (*IXP2000_T1_CLD *HZ ) /256 ;
drivers/watchdog/ixp4xx_wdt.c +5 -6
@@ -13,6 +13,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -147,8 +149,7 @@ static int ixp4xx_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_OK_TO_CLOSE , &wdt_status))wdt_disable ();else -printk (KERN_CRIT "WATCHDOG: Device closed unexpectedly - " -"timer will not stop\n" ); +pr_crit ("Device closed unexpectedly - timer will not stop\n" );clear_bit (WDT_IN_USE , &wdt_status);clear_bit (WDT_OK_TO_CLOSE , &wdt_status);
@@ -176,8 +177,7 @@ static int __init ixp4xx_wdt_init(void)int ret;if (!(read_cpuid_id () &0xf ) && !cpu_is_ixp46x ()) { -printk (KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected" -" - watchdog disabled\n" ); +pr_err ("Rev. A0 IXP42x CPU detected - watchdog disabled\n" );return -ENODEV ; }
@@ -185,8 +185,7 @@ static int __init ixp4xx_wdt_init(void) WDIOF_CARDRESET :0 ; ret =misc_register (&ixp4xx_wdt_miscdev);if (ret ==0 ) -printk (KERN_INFO "IXP4xx Watchdog Timer: heartbeat %d sec\n" , - heartbeat); +pr_info ("timer heartbeat %d sec\n" , heartbeat);return ret; }
drivers/watchdog/ks8695_wdt.c +4 -2
@@ -8,6 +8,8 @@* published by the Free Software Foundation. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/bitops.h> #include <linux/errno.h> #include <linux/fs.h>
@@ -233,8 +235,8 @@ static int __devinit ks8695wdt_probe(struct platform_device *pdev)if (res)return res; -printk (KERN_INFO "KS8695 Watchdog Timer enabled (%d seconds%s)\n" , - wdt_time, nowayout ?", nowayout" :"" ); +pr_info ("KS8695 Watchdog Timer enabled (%d seconds%s)\n" , + wdt_time, nowayout ?", nowayout" :"" );return 0 ; }
drivers/watchdog/lantiq_wdt.c +3 -1
@@ -7,6 +7,8 @@* Based on EP93xx wdt driver */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/fs.h> #include <linux/miscdevice.h>
@@ -160,7 +162,7 @@ ltq_wdt_release(struct inode *inode, struct file *file)if (ltq_wdt_ok_to_close)ltq_wdt_disable ();else -pr_err ("ltq_wdt: watchdog closed without warning\n" ); +pr_err ("watchdog closed without warning\n" ); ltq_wdt_ok_to_close =0 ;clear_bit (0 , <q_wdt_in_use);
drivers/watchdog/m54xx_wdt.c +5 -5
@@ -16,6 +16,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -166,8 +168,7 @@ static int m54xx_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_OK_TO_CLOSE , &wdt_status))wdt_disable ();else { -printk (KERN_CRIT "WATCHDOG: Device closed unexpectedly - " -"timer will not stop\n" ); +pr_crit ("Device closed unexpectedly - timer will not stop\n" );wdt_keepalive (); }clear_bit (WDT_IN_USE , &wdt_status);
@@ -196,11 +197,10 @@ static int __init m54xx_wdt_init(void) {if (!request_mem_region (MCF_MBAR +MCF_GPT_GCIR0 ,4 ,"Coldfire M54xx Watchdog" )) { -printk (KERN_WARNING -"Coldfire M54xx Watchdog : I/O region busy\n" ); +pr_warn ("I/O region busy\n" );return -EBUSY ; } -printk (KERN_INFO "ColdFire watchdog driver is loaded.\n" ); +pr_info ("driver is loaded\n" );return misc_register (&m54xx_wdt_miscdev); }
drivers/watchdog/machzwd.c +15 -18
@@ -28,6 +28,8 @@* Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -141,10 +143,10 @@ static unsigned long next_heartbeat;#define ZF_CTIMEOUT 0xffff#ifndef ZF_DEBUG -# define dprintk(format, args...) +#define dprintk(format, args...)#else -# define dprintk(format, args...) printk(KERN_DEBUG PFX \ - ":%s:%d: " format, __func__, __LINE__ , ## args) +#define dprintk(format, args...) \ + pr_debug(":%s:%d: " format, __func__, __LINE__ , ## args)#endif
@@ -203,7 +205,7 @@ static void zf_timer_off(void)zf_set_control (ctrl_reg);spin_unlock_irqrestore (&zf_port_lock, flags); - printk(KERN_INFO PFX ": Watchdog timer is now disabled\n"); +pr_info ("Watchdog timer is now disabled\n" ); }
@@ -233,7 +235,7 @@ static void zf_timer_on(void)zf_set_control (ctrl_reg);spin_unlock_irqrestore (&zf_port_lock, flags); - printk(KERN_INFO PFX ": Watchdog timer is now enabled\n"); +pr_info ("Watchdog timer is now enabled\n" ); }
@@ -263,7 +265,7 @@ static void zf_ping(unsigned long data)mod_timer (&zf_timer, jiffies +ZF_HW_TIMEO ); }else - printk(KERN_CRIT PFX ": I will reset your machine\n"); +pr_crit ("I will reset your machine\n" ); } static ssize_t zf_write(struct file *file, const char __user *buf, size_t count,
@@ -342,8 +344,7 @@ static int zf_close(struct inode *inode, struct file *file)zf_timer_off (); else {del_timer (&zf_timer); - printk(KERN_ERR PFX ": device file closed unexpectedly. " - "Will not stop the WDT!\n"); +pr_err ("device file closed unexpectedly. Will not stop the WDT!\n" ); }clear_bit (0 , &zf_is_open); zf_expect_close =0 ;
@@ -390,19 +391,18 @@ static void __init zf_show_action(int act) {static const char *const str[] = {"RESET" ,"SMI" ,"NMI" ,"SCI" }; - printk(KERN_INFO PFX ": Watchdog using action = %s\n", str[act]); +pr_info ("Watchdog using action = %s\n" , str[act]); }static int __init zf_init (void ) {int ret; - printk(KERN_INFO PFX - ": MachZ ZF-Logic Watchdog driver initializing.\n"); +pr_info ("MachZ ZF-Logic Watchdog driver initializing\n" ); ret =zf_get_ZFL_version ();if (!ret || ret ==0xffff ) { - printk(KERN_WARNING PFX ": no ZF-Logic found\n"); +pr_warn ("no ZF-Logic found\n" );return -ENODEV ; }
@@ -414,23 +414,20 @@ static int __init zf_init(void)zf_show_action (action);if (!request_region (ZF_IOBASE ,3 ,"MachZ ZFL WDT" )) { -printk (KERN_ERR "cannot reserve I/O ports at %d\n" , -ZF_IOBASE ); +pr_err ("cannot reserve I/O ports at %d\n" ,ZF_IOBASE ); ret = -EBUSY ; goto no_region; } ret =register_reboot_notifier (&zf_notifier);if (ret) { -printk (KERN_ERR "can't register reboot notifier (err=%d)\n" , - ret); +pr_err ("can't register reboot notifier (err=%d)\n" , ret); goto no_reboot; } ret =misc_register (&zf_miscdev);if (ret) { -printk (KERN_ERR "can't misc_register on minor=%d\n" , -WATCHDOG_MINOR ); +pr_err ("can't misc_register on minor=%d\n" ,WATCHDOG_MINOR ); goto no_misc; }
drivers/watchdog/mixcomwd.c +10 -15
@@ -39,9 +39,10 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#define VERSION "0.6"#define WATCHDOG_NAME "mixcomwd" -#define PFX WATCHDOG_NAME ": "#include <linux/module.h> #include <linux/moduleparam.h>
@@ -156,15 +157,13 @@ static int mixcomwd_release(struct inode *inode, struct file *file) {if (expect_close ==42 ) {if (mixcomwd_timer_alive) { - printk(KERN_ERR PFX - "release called while internal timer alive"); +pr_err ("release called while internal timer alive\n" );return -EBUSY ; } mixcomwd_timer_alive =1 ;mod_timer (&mixcomwd_timer, jiffies +5 *HZ ); }else - printk(KERN_CRIT PFX -"WDT device closed unexpectedly. WDT will not stop!\n" ); +pr_crit ("WDT device closed unexpectedly. WDT will not stop!\n" );clear_bit (0 , &mixcomwd_opened); expect_close =0 ;
@@ -274,22 +273,19 @@ static int __init mixcomwd_init(void) }if (!found) { - printk(KERN_ERR PFX - "No card detected, or port not available.\n"); +pr_err ("No card detected, or port not available\n" );return -ENODEV ; } ret =misc_register (&mixcomwd_miscdev);if (ret) { - printk(KERN_ERR PFX -"cannot register miscdev on minor=%d (err=%d)\n" , - WATCHDOG_MINOR, ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret); goto error_misc_register_watchdog; } -printk (KERN_INFO -"MixCOM watchdog driver v%s, watchdog port at 0x%3x\n" , -VERSION , watchdog_port); +pr_info ("MixCOM watchdog driver v%s, watchdog port at 0x%3x\n" , +VERSION , watchdog_port);return 0 ;
@@ -303,8 +299,7 @@ static void __exit mixcomwd_exit(void) {if (!nowayout) {if (mixcomwd_timer_alive) { - printk(KERN_WARNING PFX "I quit now, hardware will" - " probably reboot!\n"); +pr_warn ("I quit now, hardware will probably reboot!\n" );del_timer_sync (&mixcomwd_timer); mixcomwd_timer_alive =0 ; }
drivers/watchdog/mpc8xxx_wdt.c +7 -6
@@ -17,6 +17,8 @@* option) any later version. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/fs.h> #include <linux/init.h> #include <linux/kernel.h>
@@ -96,7 +98,7 @@ static void mpc8xxx_wdt_timer_ping(unsigned long arg)static void mpc8xxx_wdt_pr_warn (const char *msg) { -pr_crit ("mpc8xxx_wdt: %s, expect the %s soon!\n" , msg, +pr_crit ("%s, expect the %s soon!\n" , msg, reset ?"reset" :"machine check exception" ); }
@@ -209,7 +211,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) enabled =in_be32 (&wd_base->swcrr) &SWCRR_SWEN ;if (!enabled && wdt_type->hw_enabled) { -pr_info ("mpc8xxx_wdt: could not be enabled in software\n" ); +pr_info ("could not be enabled in software\n" ); ret = -ENOSYS ; goto err_unmap; }
@@ -226,9 +228,8 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) goto err_unmap;#endif -pr_info ("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " -"(%d seconds)\n" , reset ?"reset" :"interrupt" , timeout, - timeout_sec); +pr_info ("WDT driver for MPC8xxx initialized. mode:%s timeout=%d (%d seconds)\n" , + reset ?"reset" :"interrupt" , timeout, timeout_sec);/* * If the watchdog was previously enabled or we're running on
@@ -303,7 +304,7 @@ static int mpc8xxx_wdt_init_late(void) ret =misc_register (&mpc8xxx_wdt_miscdev);if (ret) {pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , -WATCHDOG_MINOR , ret); +WATCHDOG_MINOR , ret);return ret; }return 0 ;
drivers/watchdog/mpcore_wdt.c +6 -5
@@ -19,6 +19,9 @@* (c) Copyright 1995 Alan Cox <[email protected]> * */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -442,9 +445,6 @@ static struct platform_driver mpcore_wdt_driver = { }, }; -static char banner[]__initdata =KERN_INFO "MPcore Watchdog Timer: 0.1. " -"mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n" ; -static int __init mpcore_wdt_init (void ) {/*
@@ -453,11 +453,12 @@ static int __init mpcore_wdt_init(void)*/ if (mpcore_wdt_set_heartbeat (mpcore_margin)) {mpcore_wdt_set_heartbeat (TIMER_MARGIN ); -printk (KERN_INFO "mpcore_margin value must be 0 < mpcore_margin < 65536, using %d\n" , +pr_info ("mpcore_margin value must be 0 < mpcore_margin < 65536, using %d\n" ,TIMER_MARGIN ); } -printk (banner, mpcore_noboot, mpcore_margin, nowayout); +pr_info ("MPcore Watchdog Timer: 0.1. mpcore_noboot=%d mpcore_margin=%d sec (nowayout= %d)\n" , + mpcore_noboot, mpcore_margin, nowayout);return platform_driver_register (&mpcore_wdt_driver); }
drivers/watchdog/mv64x60_wdt.c +6 -5
@@ -15,6 +15,8 @@* or implied. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/fs.h> #include <linux/init.h> #include <linux/kernel.h>
@@ -100,7 +102,7 @@ static void mv64x60_wdt_handler_enable(void)if (mv64x60_wdt_toggle_wdc (MV64x60_WDC_ENABLED_FALSE, MV64x60_WDC_ENABLE_SHIFT)) {mv64x60_wdt_service (); -printk (KERN_NOTICE "mv64x60_wdt: watchdog activated\n" ); +pr_notice ("watchdog activated\n" ); } }
@@ -108,7 +110,7 @@ static void mv64x60_wdt_handler_disable(void) {if (mv64x60_wdt_toggle_wdc (MV64x60_WDC_ENABLED_TRUE, MV64x60_WDC_ENABLE_SHIFT)) -printk (KERN_NOTICE "mv64x60_wdt: watchdog deactivated\n" ); +pr_notice ("watchdog deactivated\n" ); }static void mv64x60_wdt_set_timeout (unsigned int timeout)
@@ -139,8 +141,7 @@ static int mv64x60_wdt_release(struct inode *inode, struct file *file)if (expect_close ==42 )mv64x60_wdt_handler_disable ();else { -printk (KERN_CRIT -"mv64x60_wdt: unexpected close, not stopping timer!\n" ); +pr_crit ("unexpected close, not stopping timer!\n" );mv64x60_wdt_service (); } expect_close =0 ;
@@ -308,7 +309,7 @@ static struct platform_driver mv64x60_wdt_driver = {static int __init mv64x60_wdt_init (void ) { -printk (KERN_INFO "MV64x60 watchdog driver\n" ); +pr_info ("MV64x60 watchdog driver\n" );return platform_driver_register (&mv64x60_wdt_driver); }
drivers/watchdog/nv_tco.c +19 -23
130 lines not on this page · raw message
drivers/watchdog/octeon-wdt-main.c +7 -5
@@ -52,6 +52,8 @@* */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/miscdevice.h> #include <linux/interrupt.h> #include <linux/watchdog.h>
@@ -201,7 +203,7 @@ static void __init octeon_wdt_build_stage1(void)uasm_resolve_relocs (relocs, labels); len = (int )(p - nmi_stage1_insns); -pr_debug ("Synthesized NMI stage 1 handler (%d instructions).\n" , len); +pr_debug ("Synthesized NMI stage 1 handler (%d instructions)\n" , len);pr_debug ("\t.set push\n" );pr_debug ("\t.set noreorder\n" );
@@ -627,7 +629,7 @@ static int octeon_wdt_release(struct inode *inode, struct file *file) do_coundown =0 ;octeon_wdt_ping (); }else { -pr_crit ("octeon_wdt: WDT device closed unexpectedly. WDT will not stop!\n" ); +pr_crit ("WDT device closed unexpectedly. WDT will not stop!\n" ); }clear_bit (0 , &octeon_wdt_is_open); expect_close =0 ;
@@ -684,12 +686,12 @@ static int __init octeon_wdt_init(void)octeon_wdt_calc_parameters (heartbeat); -pr_info ("octeon_wdt: Initial granularity %d Sec.\n" , timeout_sec); +pr_info ("Initial granularity %d Sec\n" , timeout_sec); ret =misc_register (&octeon_wdt_miscdev);if (ret) { -pr_err ("octeon_wdt: cannot register miscdev on minor=%d (err=%d)\n" , -WATCHDOG_MINOR , ret); +pr_err ("cannot register miscdev on minor=%d (err=%d)\n" , +WATCHDOG_MINOR , ret); goto out; }
drivers/watchdog/of_xilinx_wdt.c +18 -23
116 lines not on this page · raw message
drivers/watchdog/omap_wdt.c +3 -1
@@ -26,6 +26,8 @@* Use the driver model and standard identifiers; handle bigger timeouts. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h>
@@ -183,7 +185,7 @@ static int omap_wdt_release(struct inode *inode, struct file *file)pm_runtime_put_sync (wdev->dev);#else -printk (KERN_CRIT "omap_wdt: Unexpected close, not stopping!\n" ); +pr_crit ("Unexpected close, not stopping!\n" );#endif wdev->omap_wdt_users =0 ;
drivers/watchdog/orion_wdt.c +6 -5
@@ -10,6 +10,8 @@* warranty of any kind, whether express or implied. */ +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/types.h>
@@ -209,8 +211,7 @@ static int orion_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_OK_TO_CLOSE , &wdt_status))orion_wdt_disable ();else -printk (KERN_CRIT "WATCHDOG: Device closed unexpectedly - " -"timer will not stop\n" ); +pr_crit ("Device closed unexpectedly - timer will not stop\n" );clear_bit (WDT_IN_USE , &wdt_status);clear_bit (WDT_OK_TO_CLOSE , &wdt_status);
@@ -241,7 +242,7 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev)if (pdata) { wdt_tclk = pdata->tclk; }else { -printk (KERN_ERR "Orion Watchdog misses platform data\n" ); +pr_err ("misses platform data\n" );return -ENODEV ; }
@@ -257,8 +258,8 @@ static int __devinit orion_wdt_probe(struct platform_device *pdev)if (ret)return ret; -printk (KERN_INFO "Orion Watchdog Timer: Initial timeout %d sec%s\n" , - heartbeat, nowayout ?", nowayout" :"" ); +pr_info ("Initial timeout %d sec%s\n" , + heartbeat, nowayout ?", nowayout" :"" );return 0 ; }
drivers/watchdog/pc87413_wdt.c +24 -29
105 lines not on this page · raw message
drivers/watchdog/pcwd.c +49 -74
123 lines not on this page · raw message
drivers/watchdog/pcwd_pci.c +46 -63
109 lines not on this page · raw message
drivers/watchdog/pcwd_usb.c +35 -39
74 lines not on this page · raw message
drivers/watchdog/wdrtas.c +29 -40
69 lines not on this page · raw message
drivers/watchdog/wdt.c +24 -27
51 lines not on this page · raw message
drivers/watchdog/wdt_pci.c +30 -36
66 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 6 lines · Joe Perches
Use the current logging styles.
Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines. Coalesce formats.
Ping?