public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
	Len Brown <lenb@kernel.org>, Thomas Renninger <trenn@suse.de>
Subject: Re: [RFC PATCH 3/5] ACPI video: support _BCL packages that don't export brightness levels when machine is on AC/Battery
Date: Tue, 10 Mar 2009 17:06:39 +0000	[thread overview]
Message-ID: <20090310170639.GA2527@srcf.ucam.org> (raw)
In-Reply-To: <1236672209.2820.121.camel@rzhang-dt>

On Tue, Mar 10, 2009 at 04:03:29PM +0800, Zhang Rui wrote:

> +	if (level_ac_battery > 2) {
> +		ACPI_ERROR((AE_INFO, "Two many duplicates in _BCL package\n"));
> +		goto out_free_levels;

Exiting here seems a little excessive? I'd just go with a warning and 
carry on. In future maybe we could strip duplicates. Also, s/two/too/.

>  	/* don't sort the first two brightness levels */
>  	sort(&br->levels[2], count - 2, sizeof(br->levels[2]),
>  		acpi_video_cmp_level, NULL);

I think the comment here needs to be clarified - it sounds like you'll 
ignore the first two in the package, even if they're actual values 
rather than the ac and battery ones.

Otherwise:

Acked-by: Matthew Garrett <mjg@redhat.com>

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2009-03-10 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-10  8:03 [RFC PATCH 3/5] ACPI video: support _BCL packages that don't export brightness levels when machine is on AC/Battery Zhang Rui
2009-03-10 17:06 ` Matthew Garrett [this message]
2009-03-11  1:09   ` Zhang Rui
2009-03-11  1:18     ` Matthew Garrett
2009-03-11 13:57 ` Thomas Renninger

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=20090310170639.GA2527@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=trenn@suse.de \
    /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