linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Gong <gong.chen@linux.intel.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] ACPI, APEI, EINJ, limit the range of einj_param
Date: Fri, 02 Mar 2012 14:54:02 +0800	[thread overview]
Message-ID: <4F506E8A.8010901@linux.intel.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F04024D@ORSMSX104.amr.corp.intel.com>

于 2012/3/1 3:34, Luck, Tony 写道:
>> After combination the opinions from Ying and Tony, the current fix is the
>> simplest. Any other changes will make codes more complex. So I prefer to
>> keep current style. What's your opinion?
>
> Not sure which one you mean as "the current fix" (they are both one line,
> adding a check for param_extension - so neither looks simpler than the
> other :-).
>
> My opinion is that Ying's suggestion to make einj_get_parameter_address()
> return NULL is the right one.
>
> -Tony
>
Sorry, here *current fix* means my patch.
I'm afraid your version as below implies some logic errors:

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index 4ca087d..3d3816f 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -238,7 +238,7 @@ static void *einj_get_parameter_address(void)
  			return v5param;
  		}
  	}
-	if (paddrv4) {
+	if (param_extension && paddrv4) {
  		struct einj_parameter *v4param;

  		v4param = acpi_os_map_memory(paddrv4, sizeof(*v4param));


Because if working under ACPI4.x without param_extension support, there
is possible that einj_param has meaning (maybe containing address info?),
but we just ignore it under current implementation. Maybe in future we
need it so I don't hope to return NULL so early. OTOH, my fix is just
ignore einj_param in current logic, not very destructive.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-03-02  6:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  8:44 [PATCH] ACPI, APEI, EINJ, limit the range of einj_param Chen Gong
2012-02-28  8:54 ` Huang Ying
2012-02-28 18:33   ` Luck, Tony
2012-02-29  2:44     ` Chen Gong
2012-02-29 19:34       ` Luck, Tony
2012-03-02  6:54         ` Chen Gong [this message]
2012-03-02 19:42           ` Luck, Tony
2012-03-03  3:56           ` [PATCH v2] " Chen Gong
2012-03-15  8:54             ` Chen Gong
2012-03-15 16:48               ` Luck, Tony
2012-03-16  5:41                 ` Chen Gong
2012-02-29  5:38     ` [PATCH] " Huang Ying

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=4F506E8A.8010901@linux.intel.com \
    --to=gong.chen@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=ying.huang@intel.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;
as well as URLs for NNTP newsgroup(s).