From: Sam Ravnborg <sam@ravnborg.org>
To: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, wim@iguana.be,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Tony Lindgren <tony@atomide.com>,
Marc Zyngier <maz@misterjones.org>,
Thierry Reding <thierry.reding@avionic-design.de>
Subject: Re: [PATCH 7/7] watchdog: Add watchdog driver for OCTEON SOCs.
Date: Sat, 24 Jul 2010 05:58:26 +0200 [thread overview]
Message-ID: <20100724035826.GA27516@merkur.ravnborg.org> (raw)
In-Reply-To: <1279935707-3997-8-git-send-email-ddaney@caviumnetworks.com>
Hi David.
In general a very nicely commented piece of code!
A few nits...
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> index 72f3e20..4e7179b 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -114,6 +114,8 @@ obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o
> obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
> obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
> obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
> +obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o
> +octeon-wdt-objs := octeon-wdt-main.o octeon-wdt-nmi.o
The use of foo-objs := ... is considered old-school.
Use:
octeon-wdt-y := octeon-wdt-main.o octeon-wdt-nmi.o
It is the same functionality.
> +
> +#include <linux/bitops.h>
> +#include <linux/cpu.h>
> +#include <linux/cpumask.h>
> +#include <linux/delay.h>
> +#include <linux/fs.h>
> +#include <linux/interrupt.h>
> +#include <linux/kernel.h>
> +#include <linux/miscdevice.h>
> +#include <linux/module.h>
> +#include <linux/smp.h>
> +#include <linux/string.h>
> +#include <linux/watchdog.h>
People have started to use the "inverse christmas tree" for
include files.
But you sort is alphabetically which is also good.
The "inverse christmas tree" would look like this:
#include <linux/miscdevice.h>
#include <linux/interrupt.h>
#include <linux/watchdog.h>
#include <linux/cpumask.h>
#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/fs.h>
Both styles are fine so pick what you like.
> +module_param(heartbeat, int, 0444);
module_param(heartbeat, int, S_IRUSR | S_IRGRP | S_IROTH);
or even the shorter:
module_param(heartbeat, int, S_IRUGO);
This is a bit more descriptive - but still the same functionality.
> +module_param(nowayout, int, 0444);
ditto.
> +void octeon_wdt_nmi_stage3(uint64_t reg[32])
> +{
> + uint64_t i;
The kernel version of this type is "u64".
We usually say that the stdint types belongs to userspace.
But it is used in many places so no big deal.
Note: you use stdint types in several places,
but there is no need to repeat the comment.
Sam
next prev parent reply other threads:[~2010-07-24 3:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-24 1:41 [PATCH 0/7] Watchdog driver for Octeon SOCs David Daney
2010-07-24 1:41 ` [PATCH 1/7] MIPS: Add drotr32 and uasm_i_drotr_safe to uasm David Daney
2010-07-24 2:54 ` Ralf Baechle
2010-07-24 1:41 ` [PATCH 2/7] MIPS: Add BBIT0 and BBIT1 instructions " David Daney
2010-07-24 2:55 ` Ralf Baechle
2010-07-24 1:41 ` [PATCH 3/7] MIPS: Add option to export uasm API David Daney
2010-07-24 2:55 ` Ralf Baechle
2010-07-24 1:41 ` [PATCH 4/7] MIPS: Octeon: Export prom_putchar() David Daney
2010-07-24 2:55 ` Ralf Baechle
2010-07-24 1:41 ` [PATCH 5/7] MIPS: Export __cpu_number_map and __cpu_logical_map David Daney
2010-07-24 2:55 ` Ralf Baechle
2010-07-24 1:41 ` [PATCH 6/7] MIPS: Define ST0_NMI in asm/mipsregs.h David Daney
2010-07-24 2:55 ` Ralf Baechle
2010-07-24 1:41 ` [PATCH 7/7] watchdog: Add watchdog driver for OCTEON SOCs David Daney
2010-07-24 3:07 ` Ralf Baechle
2010-07-29 18:08 ` Wim Van Sebroeck
2010-07-24 3:58 ` Sam Ravnborg [this message]
2010-07-24 17:16 ` [PATCH] watchdog: Add watchdog driver for OCTEON SOCs (v2) David Daney
2010-08-02 12:37 ` Wim Van Sebroeck
2010-08-02 12:57 ` Ralf Baechle
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=20100724035826.GA27516@merkur.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=ddaney@caviumnetworks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=maz@misterjones.org \
--cc=ralf@linux-mips.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=thierry.reding@avionic-design.de \
--cc=tony@atomide.com \
--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®