lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 Jul 2010 20:04:10 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Guenter Roeck <guenter.roeck@...csson.com>
CC:	Fenghua Yu <fenghua.yu@...el.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Len Brown <lenb@...nel.org>,
	Chen Gong <gong.chen@...ux.intel.com>,
	Jean Delvare <khali@...ux-fr.org>,
	Huaxu Wan <huaxu.wan@...el.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	lm-sensors <lm-sensors@...sensors.org>
Subject: Re: [PATCH V3 2/5] Package Level Thermal Control and Power Limit Notification: pkgtemp hwmon driver

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@...csson.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ