linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Hanjun Guo <guohanjun@huawei.com>
Cc: James Morse <james.morse@arm.com>,
	Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 7/9] ACPI: EC: Put the ACPI table after using it
Date: Sat, 09 May 2020 11:30:50 +0200	[thread overview]
Message-ID: <3522798.RuaxqmcMED@kreacher> (raw)
In-Reply-To: <5004179.babTvPOIzi@kreacher>

On Saturday, May 9, 2020 11:11:26 AM CEST Rafael J. Wysocki wrote:
> On Thursday, May 7, 2020 11:09:19 AM CEST Hanjun Guo wrote:
> > The embedded controller boot resources table needs to be
> > released after using it.
> > 
> > Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
> > ---
> >  drivers/acpi/ec.c | 14 ++++++++++----
> >  1 file changed, 10 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> > index b4c0152e..281a9bf 100644
> > --- a/drivers/acpi/ec.c
> > +++ b/drivers/acpi/ec.c
> > @@ -1784,12 +1784,15 @@ static void __init acpi_ec_ecdt_start(void)
> >  
> >  	status = acpi_get_handle(NULL, ecdt_ptr->id, &handle);
> >  	if (ACPI_FAILURE(status))
> > -		return;
> > +		goto out;
> >  
> 
> So to avoid adding a new label I would prefer
> 
> if (ACPI_SUCCESS(status)) {
> 	boot_ec->handle = handle;
> 
> 	/* Add a special ACPI device object to represent the boot EC. */
> 	acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC);
> }
> 
> >  	boot_ec->handle = handle;
> >  
> >  	/* Add a special ACPI device object to represent the boot EC. */
> >  	acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC);
> > +
> > +out:
> > +	acpi_put_table((struct acpi_table_header *)ecdt_ptr);
> >  }
> >  

I've made the above change manually and applied the whole series as 5.8
material.

Thanks!




  reply	other threads:[~2020-05-09  9:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07  9:09 [PATCH 0/9] ACPI: Call acpi_put_table() to release the ACPI table mappings Hanjun Guo
2020-05-07  9:09 ` [PATCH 1/9] ACPI: LPIT: Put the low power idle table after using it Hanjun Guo
2020-05-07  9:09 ` [PATCH 2/9] ACPI: watchdog: Put the watchdog action table after parsing Hanjun Guo
2020-05-07  9:09 ` [PATCH 3/9] ACPI: APEI: Put the boot error record " Hanjun Guo
2020-05-07  9:09 ` [PATCH 4/9] ACPI: APEI: Put the error injection table for error path and module exit Hanjun Guo
2020-05-07  9:09 ` [PATCH 5/9] ACPI: APEI: Put the error record serialization table for error path Hanjun Guo
2020-05-07  9:09 ` [PATCH 6/9] ACPI: APEI: Put the HEST " Hanjun Guo
2020-05-07  9:09 ` [PATCH 7/9] ACPI: EC: Put the ACPI table after using it Hanjun Guo
2020-05-09  9:11   ` Rafael J. Wysocki
2020-05-09  9:30     ` Rafael J. Wysocki [this message]
2020-05-09  9:47       ` Hanjun Guo
2020-05-07  9:09 ` [PATCH 8/9] ACPI: scan: Put SPCR and STAO " Hanjun Guo
2020-05-07  9:09 ` [PATCH 9/9] ACPI: sleep: Put the FACS " Hanjun Guo

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=3522798.RuaxqmcMED@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=bp@alien8.de \
    --cc=guohanjun@huawei.com \
    --cc=james.morse@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=tony.luck@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).