Re: Patch[2/2]:hwmon:Adding_Threshold_Support_to_Coretemp.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Guenter Roeck
Date: Tuesday, January 4, 2011 - 12:40 pm

On Tue, Dec 28, 2010 at 03:56:57PM +0530, R, Durgadoss wrote:

Fenghua Yu <fenghua.yu@intel.com> as driver maintainer will have to Ack this patch.

Driver fails to build if MCE is not configured.

drivers/built-in.o: In function `config_thresh_intrpt':
coretemp.c:(.devinit.text+0xd909): undefined reference to `platform_thermal_notify'
coretemp.c:(.devinit.text+0xd91b): undefined reference to `platform_thermal_notify'
make: *** [.tmp_vmlinux1] Error 1

It also fails to build if APIC is not defined. See below. After that I gave up
trying more combinations. _Please_ do your homework.


	... falls below _this_ temperature ...

This defines a global variable named attrs. Not a good idea. You do not have to specify "attrs" here.

Please keep with other function forward references. Yes, I know you need the struct,
but that doesn't have to be defined when you declare the forward references.
Or define the struct first and then all the forward declarations. 

Since the if () statement includes a comment, it is better to add { } to improve 
readability.


That blank line isn't really needed.


Info with each interrupt seems to be excessive. I would suggest to make it a debug message
if you really think it is needed. And __func__ should not be needed at all.


Same here.

Fails to build if one manages to have APIC undefined (eg on a 32 bit kernel
with coretemp enabled and local APIC disabled).

drivers/hwmon/coretemp.c: In function ‘configure_apic’:
drivers/hwmon/coretemp.c:393: error: implicit declaration of function ‘apic_read’
drivers/hwmon/coretemp.c:396: error: implicit declaration of function ‘apic_write’


overwritten 


I think I asked before ... are the threshold registers known to be supported on all intel CPUs
with coretemp support, or is some detection needed ?




--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Patch[2/2]:hwmon:Adding_Threshold_Support_to_Coretemp.c, R, Durgadoss, (Tue Dec 28, 3:26 am)
Re: Patch[2/2]:hwmon:Adding_Threshold_Support_to_Coretemp.c, Guenter Roeck, (Tue Jan 4, 12:40 pm)