From: Igor Murzov <intergalactic.anonymous@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Igor Murzov <e-mail@date.by>, "Sergey V." <sftp.mtuci@gmail.com>
Subject: Re: [PATCH 1/2] ACPI video: Harden video bus adding.
Date: Wed, 29 Feb 2012 04:44:03 +0400 [thread overview]
Message-ID: <20120229044403.56e07c88@garik> (raw)
In-Reply-To: <20120229001258.GA10606@core.coreip.homeip.net>
On Tue, 28 Feb 2012 16:12:59 -0800
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> Hi Igor,
>
> On Wed, Feb 29, 2012 at 03:51:42AM +0400, Igor Murzov wrote:
> > From 127b9fc18ee646d92039c45d7fa3680a107928a2 Mon Sep 17 00:00:00 2001
> > From: Igor Murzov <e-mail@date.by>
> > Date: Mon, 27 Feb 2012 21:50:17 +0400
> > Subject: [PATCH 1/2] ACPI video: Harden video bus adding.
> >
> > It is always better to check return values.
> >
> > Signed-off-by: Igor Murzov <e-mail@date.by>
> > ---
> > drivers/acpi/video.c | 28 +++++++++++++++++++---------
> > 1 files changed, 19 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> > index eaef02a..1bc6370 100644
> > --- a/drivers/acpi/video.c
> > +++ b/drivers/acpi/video.c
> > @@ -548,24 +548,25 @@ acpi_video_device_EDID(struct acpi_video_device *device,
> > * 1. The system BIOS should NOT automatically control the brightness
> > * level of the LCD when the power changes from AC to DC.
> > * Return Value:
> > - * -1 wrong arg.
> > + * -EINVAL wrong arg.
> > */
> >
> > static int
> > acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
> > {
> > - u64 status = 0;
> > + int status = 0;
> > union acpi_object arg0 = { ACPI_TYPE_INTEGER };
> > struct acpi_object_list args = { 1, &arg0 };
> >
> >
> > if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) {
> > - status = -1;
> > + status = -EINVAL;
> > goto Failed;
> > }
> > arg0.integer.value = (lcd_flag << 2) | bios_flag;
> > video->dos_setting = arg0.integer.value;
> > - acpi_evaluate_object(video->device->handle, "_DOS", &args, NULL);
> > + status = acpi_evaluate_object(video->device->handle, "_DOS",
> > + &args, NULL);
>
> Here (as well as in the rest of your patch) you are mixing up errors
> from the standard Unix -E* namespace and ACPI AE_* namespace. You need
> to settle on one and be consistent (and also make sure that upper layers
> get wha they expect, namely -E* namespace).
Thanks for the reply. Will fix this and resend.
-- Igor
next prev parent reply other threads:[~2012-02-29 0:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120229035142.31016e6f@garik>
2012-02-29 0:12 ` [PATCH 1/2] ACPI video: Harden video bus adding Dmitry Torokhov
2012-02-29 0:44 ` Igor Murzov [this message]
[not found] ` <20120229035518.306c57a8@garik>
2012-02-29 0:39 ` [RFC][PATCH 2/2] ACPI video: Don't start video device until its associated input device has been reigstered Dmitry Torokhov
2012-02-29 1:17 ` Dmitry Torokhov
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=20120229044403.56e07c88@garik \
--to=intergalactic.anonymous@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=e-mail@date.by \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=sftp.mtuci@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