public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: djwong@us.ibm.com
Cc: linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
	mhoffman@lightlink.com
Subject: Re: [resend] [PATCH v2] ibmaem: New driver for power/energy meters in IBM System X hardware
Date: Tue, 6 May 2008 17:36:07 -0700	[thread overview]
Message-ID: <20080506173607.71eb7257.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080506223812.GF16404@tree.beaverton.ibm.com>

On Tue, 6 May 2008 15:38:13 -0700 "Darrick J. Wong" <djwong@us.ibm.com> wrote:

> [resend due to truncation]
> Refactor the registration function to shrink the macros.  Let me know if
> more aggressive de-macroing is desirable.
> ---
> New driver for power meters in IBM System X hardware, with a few
> cleanups suggested by Anthony Liguori.
> 
> ...
>
> +	int temp = simple_strtol(buf, NULL, 10); \

A checkpatch version which you might not have says

WARNING: consider using strict_strtol in preference to simple_strtol
#1015: FILE: drivers/hwmon/ibmaem.c:918:
+       int temp = simple_strtol(buf, NULL, 10); \

total: 0 errors, 1 warnings, 1221 lines checked

because the code as you have it will accept input of the form "12foo". 
strict_strtol() will error on that.

afacit the calling code would perhaps need a little changing to handle
such errors appropriately.

  parent reply	other threads:[~2008-05-07  0:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03  4:55 [PATCH] i5k_amb: Support Intel 5400 chipset Darrick J. Wong
2008-05-05 20:56 ` Andrew Morton
2008-05-05 21:22   ` [lm-sensors] " Jean Delvare
2008-05-05 21:39     ` Andrew Morton
2008-05-05 23:04   ` ibmaem driver status? Darrick J. Wong
2008-05-06 21:04     ` Andrew Morton
2008-05-06 22:38       ` [resend] [PATCH v2] ibmaem: New driver for power/energy meters in IBM System X hardware Darrick J. Wong
2008-05-07  0:32         ` Andrew Morton
2008-05-07  0:36         ` Andrew Morton [this message]
2008-05-07  6:01           ` Jean Delvare
2008-05-07  6:11             ` Andrew Morton

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=20080506173607.71eb7257.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=djwong@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=mhoffman@lightlink.com \
    /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