lkml.org 
[lkml]   [2017]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors
From
Date
...

> + sdata[count].id = sensor_id;
> + sdata[count].type = type;
> + sdata[count].hwmon_index = sdata[count - 1].hwmon_index;
> + create_hwmon_attr(&sdata[count], attr_name,
> + show_sensor);
> + pgroups[type]->attrs[sensor_groups[type].attr_count++] =
> + &sdata[count++].dev_attr.attr;
> + }

We are duplicating these lines at least three times. I wonder if we
could make a routine for them. Don't bother doing so if the number
of arguments is too large.

Thanks,

C.

\
 
 \ /
  Last update: 2017-04-25 17:11    [W:0.064 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site