All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] w83795.c no longer compiles
@ 2013-11-01 15:49 David Anderson
  2013-11-01 21:09 ` Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Anderson @ 2013-11-01 15:49 UTC (permalink / raw)
  To: lm-sensors

Just installed the new Ubuntu 13.10.   Kernel 3.11.0-12 #19.
I get an error building w83795.c (building a module to read
my  w83795adg temp sensor) for this kernel.

The source is from 
http://khali.linux-fr.org/devel/lm-sensors/drivers/w83795/
and has been working for quite a while ... but not with this new kernel
series (it was  a 3.8.0 kernel in Ubuntu 13.04 and worked fine there).

The error:
       'implicit declaration of function 'SENSORS LIMIT' '
at, for example,

      return SENSORS_LIMIT((val + 50) / 100, 0, 0xff);


Thanks in advance for any suggestions.

David Anderson


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [lm-sensors] w83795.c no longer compiles
  2013-11-01 15:49 [lm-sensors] w83795.c no longer compiles David Anderson
@ 2013-11-01 21:09 ` Guenter Roeck
  2013-11-02 17:16 ` David Anderson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2013-11-01 21:09 UTC (permalink / raw)
  To: lm-sensors

On Fri, Nov 01, 2013 at 08:49:29AM -0700, David Anderson wrote:
> Just installed the new Ubuntu 13.10.   Kernel 3.11.0-12 #19.
> I get an error building w83795.c (building a module to read
> my  w83795adg temp sensor) for this kernel.
> 
> The source is from
> http://khali.linux-fr.org/devel/lm-sensors/drivers/w83795/
> and has been working for quite a while ... but not with this new kernel
> series (it was  a 3.8.0 kernel in Ubuntu 13.04 and worked fine there).
> 
> The error:
>       'implicit declaration of function 'SENSORS LIMIT' '
> at, for example,
> 
>      return SENSORS_LIMIT((val + 50) / 100, 0, 0xff);
> 
SENSORS_LIMIT no longer exists; replace it with clamp_val.

Is the driver in the upstream kernel different to the version above ?

Thanks,
Guenter

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [lm-sensors] w83795.c no longer compiles
  2013-11-01 15:49 [lm-sensors] w83795.c no longer compiles David Anderson
  2013-11-01 21:09 ` Guenter Roeck
@ 2013-11-02 17:16 ` David Anderson
  2013-11-03 19:37 ` Jean Delvare
  2013-11-03 20:10 ` David Anderson
  3 siblings, 0 replies; 5+ messages in thread
From: David Anderson @ 2013-11-02 17:16 UTC (permalink / raw)
  To: lm-sensors

On 11/01/2013 02:09 PM, Guenter Roeck wrote:
> On Fri, Nov 01, 2013 at 08:49:29AM -0700, David Anderson wrote:
>> Just installed the new Ubuntu 13.10.   Kernel 3.11.0-12 #19.
>> I get an error building w83795.c (building a module to read
>> my  w83795adg temp sensor) for this kernel.
> SENSORS_LIMIT no longer exists; replace it with clamp_val.
>
> Is the driver in the upstream kernel different to the version above ?
>

Yes.  Different, I now see.

I picked up
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
and the upstream w83795.c had changes.  I built a module
on the target machine using
the upstream w83795.c  ---- it compiles with no warnings and
the new module is working fine in my kernel.

Honestly, it would not have occurred to me  look for the latest
or try building latest w83795.c !

Many thanks for your help.
David Anderson







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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [lm-sensors] w83795.c no longer compiles
  2013-11-01 15:49 [lm-sensors] w83795.c no longer compiles David Anderson
  2013-11-01 21:09 ` Guenter Roeck
  2013-11-02 17:16 ` David Anderson
@ 2013-11-03 19:37 ` Jean Delvare
  2013-11-03 20:10 ` David Anderson
  3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2013-11-03 19:37 UTC (permalink / raw)
  To: lm-sensors

Hi David, Guenter,

On Sat, 02 Nov 2013 10:16:28 -0700, David Anderson wrote:
> On 11/01/2013 02:09 PM, Guenter Roeck wrote:
> > On Fri, Nov 01, 2013 at 08:49:29AM -0700, David Anderson wrote:
> >> Just installed the new Ubuntu 13.10.   Kernel 3.11.0-12 #19.
> >> I get an error building w83795.c (building a module to read
> >> my  w83795adg temp sensor) for this kernel.
> > SENSORS_LIMIT no longer exists; replace it with clamp_val.
> >
> > Is the driver in the upstream kernel different to the version above ?
> 
> Yes.  Different, I now see.
> 
> I picked up
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> and the upstream w83795.c had changes.  I built a module
> on the target machine using
> the upstream w83795.c  ---- it compiles with no warnings and
> the new module is working fine in my kernel.
> 
> Honestly, it would not have occurred to me  look for the latest
> or try building latest w83795.c !

The drivers in http://khali.linux-fr.org/devel/lm-sensors/drivers/ are
all snapshots of the respective upstream driver at some point in time,
to which I added some compatibility glue so that it build for a range
of older kernels. I update them manually as my time permits and needs
arise, which means that they are all lagging behind most of the time,
by construct.

For example, "my" w83795 driver is currently based on the upstream
driver from kernel 2.6.36.1 (doh, this is so old) with enough
compatibility glue to work with kernels down to 2.6.27.

In most cases, this shouldn't be a problem, because if you're running a
very recent kernel, you shouldn't need to use a standalone driver in
the first place, the upstream driver should work just fine. Which
brings a question to David: why are you not just using the driver which
comes with your kernel?

In the case of the w83795 driver I admit it is about time to remove all
the dust because it's indeed very old...

-- 
Jean Delvare

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [lm-sensors] w83795.c no longer compiles
  2013-11-01 15:49 [lm-sensors] w83795.c no longer compiles David Anderson
                   ` (2 preceding siblings ...)
  2013-11-03 19:37 ` Jean Delvare
@ 2013-11-03 20:10 ` David Anderson
  3 siblings, 0 replies; 5+ messages in thread
From: David Anderson @ 2013-11-03 20:10 UTC (permalink / raw)
  To: lm-sensors

On 11/03/2013 11:37 AM, Jean Delvare wrote:
> Hi David, Guenter,


... older part of the conversation deleted.
> The drivers in http://khali.linux-fr.org/devel/lm-sensors/drivers/ are
> all snapshots of the respective upstream driver at some point in time,
> to which I added some compatibility glue so that it build for a range
> of older kernels. I update them manually as my time permits and needs
> arise, which means that they are all lagging behind most of the time,
> by construct.
>
> For example, "my" w83795 driver is currently based on the upstream
> driver from kernel 2.6.36.1 (doh, this is so old) with enough
> compatibility glue to work with kernels down to 2.6.27.
>
> In most cases, this shouldn't be a problem, because if you're running a
> very recent kernel, you shouldn't need to use a standalone driver in
> the first place, the upstream driver should work just fine. Which
> brings a question to David: why are you not just using the driver which
> comes with your kernel?

I should have thought of that earlier.

>
> In the case of the w83795 driver I admit it is about time to remove all
> the dust because it's indeed very old...
>
So lets try it now:

Rebooted and "sensors" did not show the proper details, as usual.
I used sensors-detect and the I2C/SMBus Adapter detection found
SMBus I801 adapter at 0400 (i2c-0)
which found
    Nuvoton W83795G/ADG

I said yes to adding lines to /etc/modules
and ran "service kmod start" as sensors detect started
and sensors worked right.

Rebooted again.
And now I get sensors working properly automatically on reboot.
Yay!

Thanks again.
David Anderson




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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-03 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01 15:49 [lm-sensors] w83795.c no longer compiles David Anderson
2013-11-01 21:09 ` Guenter Roeck
2013-11-02 17:16 ` David Anderson
2013-11-03 19:37 ` Jean Delvare
2013-11-03 20:10 ` David Anderson

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.