All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	linux-watchdog@vger.kernel.org
Cc: Wim Van Sebroeck <wim@iguana.be>,
	linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com
Subject: Re: [PATCH 2/4] watchdog: max63xx: cleanup
Date: Fri, 30 Jan 2015 06:47:48 -0800	[thread overview]
Message-ID: <54CB9994.1020503@roeck-us.net> (raw)
In-Reply-To: <1422551745-29101-3-git-send-email-vivien.didelot@savoirfairelinux.com>

On 01/29/2015 09:15 AM, Vivien Didelot wrote:
> This patch cleans up the MAX63xx driver with the following:
>
>    * better device description;
>    * put module parameter just above their declaration for clarity;
>    * remove global variables in favor of a driver data structure;
>    * fix "quoted string split across lines" warning from checkpatch.pl;
>    * constify timeouts;
>    * factorize the SET write operations;
>    * few typos and comments...
>
> This will help introduce new features to the driver.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>   drivers/watchdog/Kconfig       |   7 +-
>   drivers/watchdog/max63xx_wdt.c | 207 ++++++++++++++++++++---------------------
>   2 files changed, 108 insertions(+), 106 deletions(-)
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 40ea835..fc10451 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -408,11 +408,14 @@ config TS72XX_WATCHDOG
>   	  module will be called ts72xx_wdt.
>
>   config MAX63XX_WATCHDOG
> -	tristate "Max63xx watchdog"
> +	tristate "Maxim MAX6369 Pin-Selectable Watchdog Timer and compatibles"
>   	depends on HAS_IOMEM
>   	select WATCHDOG_CORE
>   	help
> -	  Support for memory mapped max63{69,70,71,72,73,74} watchdog timer.
> +	  Support for MAX6369, MAX6370, MAX6371, MAX6372, MAX6373, and MAX6374.
> +
> +	  To compile this driver as a module, choose M here:
> +	  the module will be called max63xx_wdt.
>
>   config IMX2_WDT
>   	tristate "IMX2+ Watchdog"
> diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c
> index 08da311..1d77669 100644
> --- a/drivers/watchdog/max63xx_wdt.c
> +++ b/drivers/watchdog/max63xx_wdt.c
> @@ -1,7 +1,5 @@
>   /*
> - * drivers/char/watchdog/max63xx_wdt.c
> - *
> - * Driver for max63{69,70,71,72,73,74} watchdog timers
> + * Maxim MAX6369 Pin-Selectable Watchdog Timer and compatibles
>    *
>    * Copyright (C) 2009 Marc Zyngier <maz@misterjones.org>
>    *
> @@ -26,23 +24,33 @@
>   #include <linux/io.h>
>   #include <linux/slab.h>
>
> -#define DEFAULT_HEARTBEAT 60
> -#define MAX_HEARTBEAT     60
> +#define DEFAULT_HEARTBEAT	60
> +#define MAX_HEARTBEAT		60
>
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> -static bool nowayout  = WATCHDOG_NOWAYOUT;
> +#define MAX63XX_DISABLED	3
>
> -/*
> - * Memory mapping: a single byte, 3 first lower bits to select bit 3
> - * to ping the watchdog.
> - */
> -#define MAX6369_WDSET	(7 << 0)
> -#define MAX6369_WDI	(1 << 3)

Not really sure I understand why you remove those constants.
that is personal preference, not cleanup. Someone else might
submit another cleanup later on and re-introduce them.

Guenter


  reply	other threads:[~2015-01-30 14:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 17:15 [PATCH 0/4] watchdog: MAX63xx cleanup and platform settings Vivien Didelot
2015-01-29 17:15 ` [PATCH 1/4] watchdog: MAX63XX_WATCHDOG does not depend on ARM Vivien Didelot
2015-05-01  4:56   ` [1/4] " Guenter Roeck
2015-01-29 17:15 ` [PATCH 2/4] watchdog: max63xx: cleanup Vivien Didelot
2015-01-30 14:47   ` Guenter Roeck [this message]
2015-01-30 15:28     ` Vivien Didelot
2015-01-29 17:15 ` [PATCH 3/4] watchdog: max63xx: add GPIO support Vivien Didelot
2015-01-29 17:15 ` [PATCH 4/4] watchdog: max63xx: add heartbeat to platform data Vivien Didelot
2015-04-16 16:37 ` [PATCH 0/4] watchdog: MAX63xx cleanup and platform settings Vivien Didelot

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=54CB9994.1020503@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.