All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "H. Peter Anvin" <hpa@zytor.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: [lm-sensors] [PATCH V3 2/5] Package Level Thermal Control and
Date: Sat, 31 Jul 2010 01:13:39 +0000	[thread overview]
Message-ID: <20100731011339.GB28386@ericsson.com> (raw)
In-Reply-To: <4C537514.9090109@zytor.com>

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

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

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "H. Peter Anvin" <hpa@zytor.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 18:13:39 -0700	[thread overview]
Message-ID: <20100731011339.GB28386@ericsson.com> (raw)
In-Reply-To: <4C537514.9090109@zytor.com>

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

  reply	other threads:[~2010-07-31  1:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  0:13 [lm-sensors] [PATCH V3 0/5] Package Level Thermal Control and Power Fenghua Yu
2010-07-30  0:13 ` [PATCH V3 0/5] Package Level Thermal Control and Power Limit Notification Fenghua Yu
2010-07-30  0:13 ` [lm-sensors] [PATCH V3 1/5] Package Level Thermal Control and Power 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 ` [lm-sensors] [PATCH V3 2/5] Package Level Thermal Control and Power 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   ` [lm-sensors] [PATCH V3 2/5] Package Level Thermal Control and H. Peter Anvin
2010-07-31  0:57     ` [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver H. Peter Anvin
2010-07-31  1:13     ` Guenter Roeck [this message]
2010-07-31  1:13       ` Guenter Roeck
2010-07-31  3:04       ` [lm-sensors] [PATCH V3 2/5] Package Level Thermal Control and H. Peter Anvin
2010-07-31  3:04         ` [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver H. Peter Anvin
2010-07-31  2:22     ` [lm-sensors] [PATCH V3 2/5] Package Level Thermal Control and Fenghua Yu
2010-07-31  2:22       ` [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver Fenghua Yu
2010-07-30  0:13 ` [lm-sensors] [PATCH V3 3/5] Package Level Thermal Control and Power 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 ` [lm-sensors] [PATCH V3 4/5] Package Level Thermal Control and Power 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 ` [lm-sensors] [PATCH V3 5/5] Package Level Thermal Control and Power 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=20100731011339.GB28386@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=fenghua.yu@intel.com \
    --cc=gong.chen@linux.intel.com \
    --cc=hpa@zytor.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 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.