All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Éric Piel" <eric.piel@tremplin-utc.net>
Cc: Matthew Garrett <mjg@redhat.com>,
	Christian Lamparter <chunkeey@googlemail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 01/10] lis3lv02d: avoid divide by zero due to unchecked
Date: Mon, 1 Aug 2011 13:29:06 -0700	[thread overview]
Message-ID: <20110801132906.2d4cd28e.akpm@linux-foundation.org> (raw)
In-Reply-To: <4E2D88C7.30409@tremplin-utc.net>

On Mon, 25 Jul 2011 17:16:23 +0200
__ric Piel <eric.piel@tremplin-utc.net> wrote:

> +static int lis3lv02d_get_pwron_wait(struct lis3lv02d *lis3)
> +{
> +	int div = lis3lv02d_get_odr();
> +
> +	if (WARN_ONCE(div == 0, "device returned spurious data"))
> +		return -ENXIO;
> +
> +	/* LIS3 power on delay is quite long */
> +	msleep(lis3->pwron_delay / div);
> +	return 0;
> +}

The WARN_ONCE may not be very useful.  The user gets worried, might
report it (often to a distro, not to you!).  But we won't actually *do*
anything with the information?

  reply	other threads:[~2011-08-01 20:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 15:14 [PATCH 00/10] lis3: various fixes and enhancements Éric Piel
2011-07-25 15:16 ` [PATCH 01/10] lis3lv02d: avoid divide by zero due to unchecked Éric Piel
2011-07-25 15:16   ` Éric Piel
2011-08-01 20:29   ` Andrew Morton [this message]
2011-08-01 21:11     ` Christian Lamparter
2011-08-01 21:29       ` Andrew Morton
2011-08-03 13:21         ` Éric Piel
2011-07-25 15:17 ` [PATCH 02/10] lis3: update maintainer information Éric Piel
2011-07-25 15:18 ` [PATCH 03/10] lis3: add support for HP EliteBook 2730p Éric Piel
2011-07-25 15:19 ` [PATCH 04/10] lis3: add support for HP EliteBook 8540w Éric Piel
2011-07-25 15:19 ` [PATCH 05/10] hp_accel: Add HP ProBook 655x Éric Piel
2011-07-25 15:20 ` [PATCH 06/10] CONFIG_HP_ACCEL: Fix help text Éric Piel
2011-07-25 15:21 ` [PATCH 07/10] lis3: Free regulators if probe() fails Éric Piel
2011-07-25 15:22 ` [PATCH 08/10] lis3: Change naming to consistent Éric Piel
2011-07-25 15:23 ` [PATCH 09/10] lis3: Change exported function to use given Éric Piel
2011-07-25 15:24 ` [PATCH 10/10] lis3: Remove the references to the global variable in core driver Éric Piel
2011-08-03 13:47   ` [PATCH 10/10 v2] " Éric Piel

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=20110801132906.2d4cd28e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chunkeey@googlemail.com \
    --cc=eric.piel@tremplin-utc.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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.