All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Lavra <francescolavra.fl@gmail.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v4 2/3] ab8500: re-arrange ab8500 power and temperature data tables
Date: Sat, 16 Mar 2013 10:28:39 +0000	[thread overview]
Message-ID: <51444957.9070500@gmail.com> (raw)
In-Reply-To: <1362730411-11112-3-git-send-email-hongbo.zhang@linaro.org>

Hi,

On 03/12/2013 10:44 AM, Hongbo Zhang wrote:
> On 12 March 2013 13:38, Guenter Roeck <linux@roeck-us.net> wrote:
>> On Fri, Mar 08, 2013 at 04:13:30PM +0800, Hongbo Zhang wrote:
>>> This patch moves the data tables from driver/power/ab8500_bmdata.c to a common
>>> header file include/linux/power/ab8500.h, so that other modules such as ab8500
>>> hwmon can use these data. This patch also renames these variable names to
>>> eliminate CamelCase warnings from checkpatch.pl, and adds const attribute to
>>> these data.
[...]
>> I don't think it is a good idea to define static variables in an include
>> file.
>>
> Hmm.. this part is more difficult than the hwmon itself from my point of view,

I think Guenter meant leaving the data tables inside a .c file in
drivers/power/, but declaring them as extern variables in a public
header file in include/linux/power/, instead of having extern
declarations in the importing driver (hwmon).
This is the standard practice when variables need to be shared between
drivers.

Regards,
Francesco

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2013-03-16 10:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08  8:13 [lm-sensors] [PATCH v4 2/3] ab8500: re-arrange ab8500 power and temperature data tables Hongbo Zhang
2013-03-12  5:38 ` Guenter Roeck
2013-03-12  9:44 ` Hongbo Zhang
2013-03-16 10:28 ` Francesco Lavra [this message]
2013-03-16 13:22 ` Guenter Roeck
2013-03-19  8:39 ` Hongbo Zhang

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=51444957.9070500@gmail.com \
    --to=francescolavra.fl@gmail.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.