All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2/4] hwmon: (ibmpowernv) add support for the new device tree
  2015-04-01 10:15     ` [lm-sensors] " Cédric Le Goater
@ 2015-04-08 15:20 ` Guenter Roeck
  -1 siblings, 0 replies; 96+ messages in thread
From: Guenter Roeck @ 2015-04-08 15:20 UTC (permalink / raw)
  To: Cédric Le Goater
  Cc: Stewart Smith, lm-sensors, Neelesh Gupta, skiboot, linuxppc-dev,
	Jean Delvare

On Wed, Apr 01, 2015 at 12:15:04PM +0200, Cédric Le Goater wrote:
> The new OPAL device tree for sensors has a different layout and uses new
> property names, for the type and for the handler used to capture the
> sensor data.
> 
> This patch modifies the ibmpowernv driver to support such a tree in a
> way preserving compatibility with older OPAL firmwares.
> 
> This is achieved by changing the error path of the routine parsing
> an OPAL node name. The node is simply considered being from the new
> device tree layout and fallback values are used.
> 
> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>

Hi Cedric,

I was about to apply the series, but then I found the following problem.

> ---
>  drivers/hwmon/ibmpowernv.c |   47 +++++++++++++++++++++++++++++++++++---------
>  1 file changed, 38 insertions(+), 9 deletions(-)
> 
[ ... ]
>  
> @@ -189,11 +204,16 @@ static u32 get_sensor_hwmon_index(struct sensor_data *sdata,
>  {
>  	int i;
>  
> -	for (i = 0; i < count; i++)
> -		if (sdata_table[i].opal_index == sdata->opal_index &&
> -		    sdata_table[i].type == sdata->type)
> -			return sdata_table[i].hwmon_index;
> +	/*
> +	 * We don't use the OPAL index on newer device trees
> +	 */
> +	if (sdata->opal_index != -1) {

opal_index is u32, so this won't work (or at least the result is
unpredictable).

Also, in patch 4/4 (v4), get_logical_cpu() takes unsigned int as parameter,
but get_hard_smp_processor_id() returns an int, causing gcc to complain
if the code is built with W=1.

Please fix and resubmit the entire series.

When you do that, please also ensure that continuation lines
are aligned (in patch 3/4).

Thanks,
Guenter

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

end of thread, other threads:[~2015-04-08 16:06 UTC | newest]

Thread overview: 96+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1423117857-32759-1-git-send-email-clg@fr.ibm.com>
2015-02-20 15:07 ` [RFC PATCH 0/3] hwmon: (ibmpowernv) add DTS support Cédric Le Goater
2015-02-20 15:07   ` [lm-sensors] " Cédric Le Goater
2015-02-20 16:52   ` Guenter Roeck
2015-02-20 16:52     ` [lm-sensors] " Guenter Roeck
2015-02-20 20:15     ` Cedric Le Goater
2015-02-20 20:15       ` [lm-sensors] " Cedric Le Goater
2015-02-20 23:52       ` Guenter Roeck
2015-02-20 23:52         ` [lm-sensors] " Guenter Roeck
2015-02-21  7:14         ` Cedric Le Goater
2015-02-21  7:14           ` [lm-sensors] " Cedric Le Goater
2015-02-21 11:03           ` Guenter Roeck
2015-02-21 11:03             ` [lm-sensors] " Guenter Roeck
2015-02-23 10:54             ` Cedric Le Goater
2015-02-23 10:54               ` [lm-sensors] " Cedric Le Goater
2015-02-20 15:07 ` [RFC PATCH 1/3] powerpc/powernv: Check OPAL sensor calls exist Cédric Le Goater
2015-02-20 15:07   ` [lm-sensors] " Cédric Le Goater
2015-02-20 16:53   ` Guenter Roeck
2015-02-20 16:53     ` [lm-sensors] " Guenter Roeck
2015-02-20 20:18     ` Cedric Le Goater
2015-02-20 20:18       ` [lm-sensors] " Cedric Le Goater
2015-02-24  4:54   ` Michael Ellerman
2015-02-24  4:54     ` [lm-sensors] " Michael Ellerman
2015-02-25 17:28     ` Cedric Le Goater
2015-02-25 17:28       ` [lm-sensors] " Cedric Le Goater
2015-02-20 15:07 ` [RFC PATCH 2/3] powerpc/powernv: handle OPAL_SUCCESS return in opal_sensor_read Cédric Le Goater
2015-02-20 15:07   ` [lm-sensors] " Cédric Le Goater
2015-02-20 15:07 ` [RFC PATCH 3/3] hwmon: (ibmpowernv) add DTS support Cédric Le Goater
2015-02-20 15:07   ` [lm-sensors] " Cédric Le Goater
2015-03-18 15:47 ` [PATCH 0/5] hwmon: (ibmpowernv) remove dependency on OPAL index Cédric Le Goater
2015-03-18 15:47   ` [lm-sensors] " Cédric Le Goater
2015-03-19  4:05   ` Guenter Roeck
2015-03-19  4:05     ` [lm-sensors] " Guenter Roeck
2015-03-18 15:47 ` [PATCH 1/5] hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP Cédric Le Goater
2015-03-18 15:47   ` [lm-sensors] " Cédric Le Goater
2015-03-18 15:47 ` [PATCH 2/5] hwmon: (ibmpowernv) add a get_sensor_type() routine Cédric Le Goater
2015-03-18 15:47   ` [lm-sensors] " Cédric Le Goater
2015-03-18 15:47 ` [PATCH 3/5] hwmon: (ibmpowernv) add a convert_opal_attr_name() routine Cédric Le Goater
2015-03-18 15:47   ` [lm-sensors] " Cédric Le Goater
2015-03-19  3:58   ` Guenter Roeck
2015-03-19  3:58     ` [lm-sensors] " Guenter Roeck
2015-03-18 15:47 ` [PATCH 4/5] hwmon: (ibmpowernv) change create_hwmon_attr_name() prototype Cédric Le Goater
2015-03-18 15:47   ` [lm-sensors] " Cédric Le Goater
2015-03-19  4:02   ` Guenter Roeck
2015-03-19  4:02     ` [lm-sensors] " Guenter Roeck
2015-03-18 15:47 ` [PATCH 5/5] hwmon: (ibmpowernv) do not use the OPAL index for hwmon attribute names Cédric Le Goater
2015-03-18 15:47   ` [lm-sensors] " Cédric Le Goater
2015-03-19 17:44 ` [PATCH v2 0/5] hwmon: (ibmpowernv) remove dependency on OPAL index Cédric Le Goater
2015-03-19 17:44   ` [lm-sensors] " Cédric Le Goater
2015-03-20 15:26   ` Guenter Roeck
2015-03-20 15:26     ` [lm-sensors] " Guenter Roeck
2015-03-20 16:52     ` Cedric Le Goater
2015-03-20 16:52       ` [lm-sensors] " Cedric Le Goater
2015-04-01 10:15   ` [PATCH 0/4] hwmon: (ibmpowernv) add DTS support Cédric Le Goater
2015-04-01 10:15     ` [lm-sensors] " Cédric Le Goater
2015-04-01 10:15   ` [PATCH 1/4] hwmon: (ibmpowernv) add a helper routine create_hwmon_attr Cédric Le Goater
2015-04-01 10:15     ` [lm-sensors] " Cédric Le Goater
2015-04-01 10:15   ` [PATCH 2/4] hwmon: (ibmpowernv) add support for the new device tree Cédric Le Goater
2015-04-01 10:15     ` [lm-sensors] " Cédric Le Goater
2015-04-01 10:15   ` [PATCH 3/4] hwmon: (ibmpowernv) add a label attribute Cédric Le Goater
2015-04-01 10:15     ` [lm-sensors] " Cédric Le Goater
2015-04-01 10:15   ` [PATCH 4/4] hwmon: (ibmpowernv) pretty print labels Cédric Le Goater
2015-04-01 10:15     ` [lm-sensors] " Cédric Le Goater
2015-04-03 15:49     ` Guenter Roeck
2015-04-03 15:49       ` [lm-sensors] " Guenter Roeck
2015-04-07 14:42       ` Cedric Le Goater
2015-04-07 14:42         ` [lm-sensors] " Cedric Le Goater
2015-04-07 14:45         ` Cédric Le Goater
2015-04-07 14:45           ` [lm-sensors] " Cédric Le Goater
2015-04-07 16:44           ` Guenter Roeck
2015-04-07 16:44             ` [lm-sensors] " Guenter Roeck
2015-04-07 18:03             ` Cedric Le Goater
2015-04-07 18:03               ` [lm-sensors] " Cedric Le Goater
2015-04-07 19:22               ` Guenter Roeck
2015-04-07 19:22                 ` [lm-sensors] " Guenter Roeck
2015-04-08  6:57                 ` Cedric Le Goater
2015-04-08  6:57                   ` [lm-sensors] " Cedric Le Goater
2015-04-07 20:22               ` [Skiboot] " Benjamin Herrenschmidt
2015-04-07 20:22                 ` [lm-sensors] " Benjamin Herrenschmidt
2015-03-19 17:44 ` [PATCH v2 1/5] hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP Cédric Le Goater
2015-03-19 17:44   ` [lm-sensors] " Cédric Le Goater
2015-03-19 17:44 ` [PATCH v2 2/5] hwmon: (ibmpowernv) add a get_sensor_type() routine Cédric Le Goater
2015-03-19 17:44   ` [lm-sensors] " Cédric Le Goater
2015-03-19 17:44 ` [PATCH v2 3/5] hwmon: (ibmpowernv) add a convert_opal_attr_name() routine Cédric Le Goater
2015-03-19 17:44   ` [lm-sensors] " Cédric Le Goater
2015-03-19 17:44 ` [PATCH v2 4/5] hwmon: (ibmpowernv) change create_hwmon_attr_name() prototype Cédric Le Goater
2015-03-19 17:44   ` [lm-sensors] " Cédric Le Goater
2015-03-20  8:06   ` Cedric Le Goater
2015-03-20  8:06     ` [lm-sensors] " Cedric Le Goater
2015-03-20 15:27     ` Guenter Roeck
2015-03-20 15:27       ` [lm-sensors] " Guenter Roeck
2015-03-19 17:44 ` [PATCH v2 5/5] hwmon: (ibmpowernv) do not use the OPAL index for hwmon attribute names Cédric Le Goater
2015-03-19 17:44   ` [lm-sensors] " Cédric Le Goater
2015-04-08 15:20 [PATCH 2/4] hwmon: (ibmpowernv) add support for the new device tree Guenter Roeck
2015-04-08 15:20 ` [lm-sensors] " Guenter Roeck
2015-04-08 16:06 ` Cedric Le Goater
2015-04-08 16:06   ` [lm-sensors] " Cedric Le Goater

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.