From: "H. Peter Anvin" <hpa@zytor.com>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>, Len Brown <lenb@kernel.org>,
Chen Gong <gong.chen@linux.intel.com>,
Jean Delvare <khali@linux-fr.org>,
Huaxu Wan <huaxu.wan@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
lm-sensors <lm-sensors@lm-sensors.org>
Subject: Re: [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver
Date: Fri, 30 Jul 2010 20:04:10 -0700 [thread overview]
Message-ID: <b908df2f-5264-4680-bb3f-1fe427c02eeb@email.android.com> (raw)
In-Reply-To: <20100731011339.GB28386@ericsson.com>
With the typedef keyword (see coretemp.c) it would be a typename... which is different from a tag in C (but not C++).
"Guenter Roeck" <guenter.roeck@ericsson.com> wrote:
>On Fri, Jul 30, 2010 at 08:57:56PM -0400, H. Peter Anvin wrote:
>> On 07/29/2010 05:13 PM, Fenghua Yu wrote:
>> > +
>> > +enum { SHOW_TEMP, SHOW_TJMAX, SHOW_TTARGET, SHOW_LABEL, SHOW_NAME } SHOW;
>> > +
>>
>> This conflicts with an equally poorly named global variable in
>> drivers/hwmon/via-cputemp.c, and the conflict is causing a build failure.
>>
>> I think both these drivers have the same bug: a missing "typedef" before
>> the enum keyword, as present in coretemp.c. Of course, one can question
>> if it should be given a typename at all since in none of these drivers
>
>Especially since it isn't really a type name, but a global variable named SHOW.
>Type name (also called tag) would be enum SHOW { ... }; .
>
>Guenter
>
>> they are actually referenced by type, and instead the enumeration is
>> just used as a source of constants, which can perfectly well be handled
>> with an unnamed enum:
>>
>> enum { SHOW_TEMP, SHOW_TJMAX, SHOW_TTARGET, SHOW_LABEL, SHOW_NAME };
>>
>> -hpa
--
Sent from my mobile phone. Please pardon any lack of formatting.
next prev parent reply other threads:[~2010-07-31 3:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 0:13 [PATCH V3 0/5] Package Level Thermal Control and Power Limit Notification Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 1/5] Package Level Thermal Control and Power Limit Notification: enable features Fenghua Yu
2010-07-30 23:33 ` [tip:x86/cpu] x86, cpu: Package Level Thermal Control, Power Limit Notification definitions tip-bot for Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver Fenghua Yu
2010-07-31 0:57 ` H. Peter Anvin
2010-07-31 1:13 ` Guenter Roeck
2010-07-31 3:04 ` H. Peter Anvin [this message]
2010-07-31 2:22 ` Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 3/5] Package Level Thermal Control and Power Limit Notification: thermal throttling handler Fenghua Yu
2010-08-04 0:01 ` [tip:x86/hwmon] x86, hwmon: Package Level Thermal/Power: " tip-bot for Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 4/5] Package Level Thermal Control and Power Limit Notification: power limit Fenghua Yu
2010-08-04 0:01 ` [tip:x86/hwmon] x86, hwmon: Package Level Thermal/Power: " tip-bot for Fenghua Yu
2010-07-30 0:13 ` [PATCH V3 5/5] Package Level Thermal Control and Power Limit Notification: pkgtemp doc Fenghua Yu
2010-08-04 0:01 ` [tip:x86/hwmon] x86, hwmon: Package Level Thermal/Power: pkgtemp documentation tip-bot for Fenghua Yu
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=b908df2f-5264-4680-bb3f-1fe427c02eeb@email.android.com \
--to=hpa@zytor.com \
--cc=fenghua.yu@intel.com \
--cc=gong.chen@linux.intel.com \
--cc=guenter.roeck@ericsson.com \
--cc=huaxu.wan@intel.com \
--cc=khali@linux-fr.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
Powered by JetHome