mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-hwmon@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, svaidy@linux.vnet.ibm.com,
	ego@linux.vnet.ibm.com, akshay.adiga@linux.vnet.ibm.com,
	andrew@aj.id.au
Subject: Re: [PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors
Date: Tue, 25 Apr 2017 16:34:32 +0200	[thread overview]
Message-ID: <f10a3983-def5-e3dc-9c19-a1119e1dd612@kaod.org> (raw)
In-Reply-To: <1492749112-32465-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com>

...

> +			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.

      parent reply	other threads:[~2017-04-25 15:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21  4:31 Shilpasri G Bhat
2017-04-21 11:47 ` Cédric Le Goater
2017-04-21 12:39   ` Shilpasri G Bhat
2017-04-22  6:11     ` Michael Ellerman
2017-04-25 14:28       ` Cédric Le Goater
2017-04-25 14:32         ` Cédric Le Goater
2017-04-25 14:34 ` Cédric Le Goater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f10a3983-def5-e3dc-9c19-a1119e1dd612@kaod.org \
    --to=clg@kaod.org \
    --cc=akshay.adiga@linux.vnet.ibm.com \
    --cc=andrew@aj.id.au \
    --cc=ego@linux.vnet.ibm.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=shilpa.bhat@linux.vnet.ibm.com \
    --cc=svaidy@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®