Re: [Nouveau] [PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-20 Thread Oscar Salvador
I got what you meant. I"ll fix it El dia 20/04/2017 08:47, "Oscar Salvador" va escriure: > Hi Karol, > > I don't get what you mean with return due to fallthrough. I mean, I > know what is it, but I don't see how I can do it there. > Moving the check before the

Re: [Nouveau] [PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-20 Thread Oscar Salvador
Hi Karol, I don't get what you mean with return due to fallthrough. I mean, I know what is it, but I don't see how I can do it there. Moving the check before the switch looks like that: if (!iccsense) return 0; switch (attr) { case hwmon_power_input:

Re: [Nouveau] [PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-19 Thread Ilia Mirkin
On Mon, Apr 17, 2017 at 3:47 AM, Oscar Salvador wrote: > +static char *input_label = "GPU core"; This needs to be static const char input_label[] = "GPU core"; or at least static const char *const input_label = "GPU core"; -ilia

Re: [Nouveau] [PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-18 Thread Karol Herbst
2017-04-17 9:47 GMT+02:00 Oscar Salvador : > This patch introduces the nouveau_hwmon_ops structure, sets up > .is_visible and .read_string operations and adds all the functions > for these operations. > This is also a preparation for the next patches, where most of

[PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string

2017-04-17 Thread Oscar Salvador
This patch introduces the nouveau_hwmon_ops structure, sets up .is_visible and .read_string operations and adds all the functions for these operations. This is also a preparation for the next patches, where most of the work is being done. This code doesn't interacture with the old one. It's just