From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 16/17 v2] hwmon: (wm831x-hwmon) fix
Date: Sun, 08 Jan 2012 18:55:07 +0000 [thread overview]
Message-ID: <20120108185507.GA23747@ericsson.com> (raw)
In-Reply-To: <1326047660-20539-16-git-send-email-fransmeulenbroeks@gmail.com>
On Sun, Jan 08, 2012 at 01:34:19PM -0500, Frans Meulenbroeks wrote:
> fixed:
> WARNING: static const char * array should probably be static const char * const
> #43: FILE: wm831x-hwmon.c:43:
> +static const char *input_names[] = {
>
> not fixed (will probably provide separate fix later)
> ERROR: Macros with multiple statements should be enclosed in a do - while loop
> #98: FILE: wm831x-hwmon.c:98:
> +#define WM831X_NAMED_VOLTAGE(id, name) \
> + WM831X_VOLTAGE(id, name); \
> + static SENSOR_DEVICE_ATTR(in##id##_label, S_IRUGO, show_label, \
> + NULL, name)
>
This is really a false positive, or at least one that can not be fixed by enclosing it
in a while loop, since the macro does not define a sequence of operations.
While I don't like the style much, not sure how to fix a problem like this except by
unwinding the macro - and that might end up being a bit clumsy.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2012-01-08 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-08 18:34 [lm-sensors] [PATCH 16/17 v2] hwmon: (wm831x-hwmon) fix checkpatch Frans Meulenbroeks
2012-01-08 18:55 ` 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=20120108185507.GA23747@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@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.