All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Wim Van Sebroeck" <wim@iguana.be>,
	linux-watchdog@vger.kernel.org
Cc: kernel@pengutronix.de
Subject: Re: [PATCH] watchdog: gpio-wdt: be more strict about hw_algo matching
Date: Thu, 30 Jul 2015 07:40:45 -0700	[thread overview]
Message-ID: <55BA376D.7060305@roeck-us.net> (raw)
In-Reply-To: <1438248743-8722-1-git-send-email-u.kleine-koenig@pengutronix.de>

On 07/30/2015 02:32 AM, Uwe Kleine-König wrote:
> strncmp(algo, "toggle", 6) doesn't compare the trailing '\0' byte, so
> using
>
> 	hw_algo = "toggleboggle"
>
> is recognized the same way as
>
> 	hw_algo = "toggle"
>
> . While this doesn't introduce any problems for a device tree that
> sticks to the documented settings it's still ugly.
>
> Fix this by using strcmp to only match on "toggle" and "level".
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>


      reply	other threads:[~2015-07-30 14:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  9:32 [PATCH] watchdog: gpio-wdt: be more strict about hw_algo matching Uwe Kleine-König
2015-07-30 14:40 ` Guenter Roeck [this message]

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=55BA376D.7060305@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --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.