public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Alexander.Deucher@amd.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm radeon: Return -EINVAL on wrong pm sysfs access
Date: Sun, 27 Mar 2011 11:46:33 +0200	[thread overview]
Message-ID: <201103271146.34331.trenn@suse.de> (raw)
In-Reply-To: <AANLkTimUCX-Ru6nXKDFFQvkSEkTJjvtCLM6+cCvee4ef@mail.gmail.com>

On Saturday 26 March 2011 16:38:22 Rafał Miłecki wrote:
> 2011/3/23 Thomas Renninger <trenn@suse.de>:
> > drm radeon: Return -EINVAL on wrong pm sysfs access
> >
> > Throw an error if someone tries to fill this with
> > wrong data, instead of simply ignoring the input.
> > Now you get:
> >
> > echo hello >/sys/../power_method
> > -bash: echo: write error: Invalid argument
> >
> > Signed-off-by: Thomas Renninger <trenn@suse.de>
> > CC: Alexander.Deucher@amd.com
> > CC: dri-devel@lists.freedesktop.org
> >
> > ---
> >  drivers/gpu/drm/radeon/radeon_pm.c |    8 +++++---
> >  1 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> > index 2aed03b..08de669 100644
> > --- a/drivers/gpu/drm/radeon/radeon_pm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> > @@ -365,12 +365,14 @@ static ssize_t radeon_set_pm_profile(struct device *dev,
> >                else if (strncmp("high", buf, strlen("high")) == 0)
> >                        rdev->pm.profile = PM_PROFILE_HIGH;
> >                else {
> > -                       DRM_ERROR("invalid power profile!\n");
> > +                       count = -EINVAL;
> 
> I think this does not match kernel coding style (braces).
Can you be more specific, please.
I can't see style issues, ./scripts/checkpatch.pl is also happy.

        Thomas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2011-03-27  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 15:14 [PATCH] drm radeon: Return -EINVAL on wrong pm sysfs access Thomas Renninger
2011-03-23 16:49 ` Alex Deucher
2011-03-26 15:38 ` Rafał Miłecki
2011-03-26 15:39   ` Rafał Miłecki
2011-03-27  9:46   ` Thomas Renninger [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=201103271146.34331.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=Alexander.Deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=zajec5@gmail.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