From: Joe Perches <joe@perches.com>
To: Mike Rapoport <mike@compulab.co.il>
Cc: Wim Van Sebroeck <wim@iguana.be>,
LKML <linux-kernel@vger.kernel.org>,
Andrey Panin <pazke@centrinvest.ru>,
Denis Turischev <denis@compulab.co.il>
Subject: Re: [PATCH] add SBC-FITPC2 watchdog driver
Date: Mon, 20 Jul 2009 09:43:09 -0700 [thread overview]
Message-ID: <1248108189.31365.40.camel@Joe-Laptop.home> (raw)
In-Reply-To: <4A6492EB.1080709@compulab.co.il>
On Mon, 2009-07-20 at 18:53 +0300, Mike Rapoport wrote:
> diff -Nru linux-2.6.31-rc3.orig/drivers/watchdog/sbc_fitpc2_wdt.c linux-2.6.31-rc3/drivers/watchdog/sbc_fitpc2_wdt.c
> --- linux-2.6.31-rc3.orig/drivers/watchdog/sbc_fitpc2_wdt.c 1970-01-01 02:00:00.000000000 +0200
> +++ linux-2.6.31-rc3/drivers/watchdog/sbc_fitpc2_wdt.c 2009-07-20 16:08:40.000000000 +0300
Hi. Some trivial comments below:
[]
> +static ssize_t
> +fitpc2_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos)
> +{
> + if (len) {
> + if (!nowayout) {
> + size_t i;
using
if (!len)
return 0;
if (nowayout) {
wdt_enable();
return 0;
}
would reduce the indent a couple of levels.
[]
> +static int fitpc2_wdt_release(struct inode *inode, struct file *file)
> +{
> + if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) {
> + wdt_disable();
> + printk(KERN_CRIT "WATCHDOG: Device disabled\n");
I think you should verify the printk KERN_CRIT uses.
This seems like this one should be KERN_INFO.
[]
> +static int __init fitpc2_wdt_init(void)
[]
> + printk(KERN_CRIT "WATCHDOG: board name is: %s. Should be SBC-FITPC2\n",
> + dmi_get_system_info(DMI_BOARD_NAME));
[]
> + printk(KERN_CRIT "WATCHDOG: I/O address 0x%04x already in use\n",
> + COMMAND_PORT);
[]
> + printk(KERN_CRIT "WATCHDOG: I/O address 0x%04x already in use\n",
> + DATA_PORT);
[]
> + printk(KERN_CRIT "WATCHDOG: margin must be in range 31 - 255"
> + " seconds, you tried to set %d\n", margin);
Maybe all of these should be KERN_ERR.
You could use:
#define pr_fmt(fmt) KBUILD_MODNAME " WATCHDOG: " fmt
and convert the printk(KERN_<level> "WATCHDOG: " etc...)
to pr_<level>(etc...)
next prev parent reply other threads:[~2009-07-20 16:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 15:53 Mike Rapoport
2009-07-20 16:43 ` Joe Perches [this message]
2009-07-21 4:34 ` [PATCH 0/3] drivers/watchdog: Use pr_<level> Joe Perches
2009-07-21 4:35 ` [PATCH 1/3] include/linux: kernel.h dynamic_debug.h device.h - Use section fmts Joe Perches
2009-07-21 4:35 ` [PATCH 2/3] drivers/watchdog: Convert printk(KERN_<level> to pr_<level>( Joe Perches
2009-07-21 4:35 ` [PATCH 3/3] drivers/watchdog: use pr_fmt Joe Perches
2009-11-05 11:32 ` SBC-FITPC2 watchdog driver fix Denis Turischev
2009-11-05 11:51 ` Wim Van Sebroeck
2010-01-21 14:10 ` Denis Turischev
2010-04-22 16:50 ` I/O operations order fix for SBC-FITPC2 watchdog Denis Turischev
2010-04-22 16:54 ` "scheduling while atomic" bug in " Denis Turischev
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=1248108189.31365.40.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=denis@compulab.co.il \
--cc=linux-kernel@vger.kernel.org \
--cc=mike@compulab.co.il \
--cc=pazke@centrinvest.ru \
--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
all inboxes | Powered by JetHome®