From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Huang Ying <ying.huang@intel.com>
Cc: linux-acpi@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
Linux Edac Mailing List <linux-edac@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH EDAC 03/13] ghes: add the needed hooks for EDAC error report
Date: Fri, 22 Feb 2013 05:50:21 -0300 [thread overview]
Message-ID: <20130222055021.12125c03@redhat.com> (raw)
In-Reply-To: <1361493911.7093.37.camel@yhuang-dev>
Em Fri, 22 Feb 2013 08:45:11 +0800
Huang Ying <ying.huang@intel.com> escreveu:
> On Thu, 2013-02-21 at 09:04 -0300, Mauro Carvalho Chehab wrote:
> > Em Thu, 21 Feb 2013 09:26:07 +0800
> > Huang Ying <ying.huang@intel.com> escreveu:
> >
> > There is also an advantage on taking this approach: this patch can have just
> > the ghes changes, and will still compile fine, as CONFIG_EDAC_GHES is not
> > defined yet. So, the patch becomes is simpler and easier to review.
>
> Thanks for your explanation. I agree to keep this in header file.
>
> My original suggestion is that it may be better to move this from ghes.h
> to some place like "ghes_edac.h", because these functions are
> implemented in "ghes_edac.c" instead of ghes.c.
>
Ah! Well, I considered a separate header when writing this patch, but adding
another header for just 3 functions where the parameters are more related to
ghes than with ghes_edac seemed overkill to me.
IMO, a single comment at the header pointing to ghes_edac.c would improve it.
> > switch (generic->notify.type) {
> > case ACPI_HEST_NOTIFY_POLLED:
> > ghes->timer.function = ghes_poll_func;
> > @@ -911,13 +920,13 @@ static int ghes_probe(struct platform_device *ghes_dev)
> > if (acpi_gsi_to_irq(generic->notify.vector, &ghes->irq)) {
> > pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n",
> > generic->header.source_id);
> > - goto err;
> > + goto err2;
> > }
> > if (request_irq(ghes->irq, ghes_irq_func,
> > 0, "GHES IRQ", ghes)) {
> > pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n",
> > generic->header.source_id);
> > - goto err;
> > + goto err2;
> > }
> > break;
> > case ACPI_HEST_NOTIFY_SCI:
> > @@ -943,6 +952,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
> > platform_set_drvdata(ghes_dev, ghes);
> >
> > return 0;
> > +err2:
>
> Suggest to rename it to err_edac_unreg or something like that. Just a
> suggestion.
Done.
I'm folding the enclosed patch on it.
Thanks for review!
Regards,
Mauro
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 19092dc..d668a8a 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -920,13 +920,13 @@ static int ghes_probe(struct platform_device *ghes_dev)
if (acpi_gsi_to_irq(generic->notify.vector, &ghes->irq)) {
pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n",
generic->header.source_id);
- goto err2;
+ goto err_edac_unreg;
}
if (request_irq(ghes->irq, ghes_irq_func,
0, "GHES IRQ", ghes)) {
pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n",
generic->header.source_id);
- goto err2;
+ goto err_edac_unreg;
}
break;
case ACPI_HEST_NOTIFY_SCI:
@@ -952,7 +952,7 @@ static int ghes_probe(struct platform_device *ghes_dev)
platform_set_drvdata(ghes_dev, ghes);
return 0;
-err2:
+err_edac_unreg:
ghes_edac_unregister(ghes);
err:
if (ghes) {
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 9015ec2..d11d952 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -45,6 +45,8 @@ enum {
GHES_SEV_PANIC = 0x3,
};
+/* From drivers/edac/ghes_acpi.h */
+
#ifdef CONFIG_EDAC_GHES
void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
struct cper_sec_mem_err *mem_err);
--
Cheers,
Mauro
next prev parent reply other threads:[~2013-02-22 9:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 12:44 [PATCH EDAC 00/13] Add a driver to report Firmware first errors (via GHES) Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 01/13] edac: lock module owner to avoid error report conflicts Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 02/13] ghes: move structures/enum to a header file Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 03/13] ghes: add the needed hooks for EDAC error report Mauro Carvalho Chehab
2013-02-21 1:26 ` Huang Ying
2013-02-21 12:04 ` Mauro Carvalho Chehab
2013-02-22 0:45 ` Huang Ying
2013-02-22 8:50 ` Mauro Carvalho Chehab [this message]
2013-02-22 8:57 ` Mauro Carvalho Chehab
2013-02-25 0:25 ` Huang Ying
2013-02-15 12:44 ` [PATCH EDAC 04/13] edac: add a new memory layer type Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 05/13] ghes_edac: Register at EDAC core the BIOS report Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 06/13] ghes_edac: Allow registering more than once Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 07/13] edac: add support for raw error reports Mauro Carvalho Chehab
2013-02-15 14:13 ` Borislav Petkov
2013-02-15 15:25 ` Mauro Carvalho Chehab
2013-02-15 15:41 ` Borislav Petkov
2013-02-15 15:49 ` Mauro Carvalho Chehab
2013-02-15 16:02 ` Borislav Petkov
2013-02-15 18:20 ` Mauro Carvalho Chehab
2013-02-16 16:57 ` Borislav Petkov
2013-02-17 10:44 ` Mauro Carvalho Chehab
2013-02-18 13:52 ` Borislav Petkov
2013-02-18 15:24 ` Mauro Carvalho Chehab
2013-02-19 11:56 ` Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 08/13] ghes_edac: add support for reporting errors via EDAC Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 09/13] ghes_edac: do a better job of filling EDAC DIMM info Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 10/13] edac: better report error conditions in debug mode Mauro Carvalho Chehab
2013-02-15 12:44 ` [PATCH EDAC 11/13] edac: initialize the core earlier Mauro Carvalho Chehab
2013-02-15 12:45 ` [PATCH EDAC 12/13] ghes_edac.c: Don't credit the same memory dimm twice Mauro Carvalho Chehab
2013-02-15 12:45 ` [PATCH EDAC 13/13] ghes_edac: Improve driver's printk messages Mauro Carvalho Chehab
2013-02-15 16:38 ` Joe Perches
2013-02-15 17:33 ` Mauro Carvalho Chehab
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=20130222055021.12125c03@redhat.com \
--to=mchehab@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@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).