public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Todd Poynor <tpoynor@mvista.com>
Cc: cpufreq@lists.linux.org.uk, linux-pm@lists.osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: PowerOP 1/3: PowerOP core
Date: Tue, 9 Aug 2005 00:32:35 -0700	[thread overview]
Message-ID: <20050809073234.GB13203@kroah.com> (raw)
In-Reply-To: <20050809025157.GB25064@slurryseal.ddns.mvista.com>

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

On Mon, Aug 08, 2005 at 07:51:57PM -0700, Todd Poynor wrote:
> +static void powerop_kobj_release(struct kobject *kobj)
> +{
> +	return;
> +}

Hint, if your release function is just a noop like this, your code is
wrong.  The kernel requires you to have a release function for a reason.
Please fix it.

> +struct powerop_param_attribute {
> +	int index;
> +        struct attribute        attr;
> +};

space vs. tab issue.

> +static ssize_t
> +powerop_param_attr_show(struct kobject * kobj, struct attribute * attr,
> +			char * buf)
> +{
> +	struct powerop_param_attribute * param_attr = to_param_attr(attr);
> +	struct powerop_point point;
> +	ssize_t ret = 0;
> +
> +	if ((ret = powerop_get_point(&point)) == 0)
> +		ret = sprintf(buf, "%d\n", point.param[param_attr->index]);

Please break this up into 3 lines instead of 2 to make it easier to read
and maintain over time.

You do this in other places too, please fix them too.

thanks,

greg k-h

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2005-08-09  7:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-09  2:51 PowerOP 1/3: PowerOP core Todd Poynor
2005-08-09  7:32 ` Greg KH [this message]
2005-08-09 16:07 ` [linux-pm] " Geoff Levand
2005-08-10  0:33   ` Todd Poynor
2005-08-10 13:58     ` [linux-pm] " Daniel Petrini
2005-08-11  0:25       ` Todd Poynor
2005-08-12 16:23     ` david-b
     [not found]     ` <20050812162315.16671E2E9B@adsl-69-107-32-110.dsl.pltn13.pacbell.net>
2005-08-13  1:06       ` Todd Poynor

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=20050809073234.GB13203@kroah.com \
    --to=greg@kroah.com \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=tpoynor@mvista.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