mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aubrey Li <aubrey.li@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>, Aubrey Li <aubrey.li@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI/PRM: Deal with table not present or no module found
Date: Mon, 9 Aug 2021 07:53:12 +0800	[thread overview]
Message-ID: <2728924f-25cf-25dc-df0f-d02bbc959b9f@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0hYVMnQFBkQ_yhF83q-CEJuQ7-TN_Hh2P6b2bM9K--xFQ@mail.gmail.com>

On 8/6/21 9:23 PM, Rafael J. Wysocki wrote:
> On Fri, Aug 6, 2021 at 2:48 AM Aubrey Li <aubrey.li@intel.com> wrote:
>>
>> On the system PRMT table is not present, dmesg output:
>>
>>         $ dmesg | grep PRM
>>         [    1.532237] ACPI: PRMT not present
>>         [    1.532237] PRM: found 4294967277 modules
>>
>> The result of acpi_table_parse_entries need to be checked and return
>> immediately if PRMT table is not present or no PRM module found.
>>
>> Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
>> ---
>>  drivers/acpi/prmt.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
>> index 31cf9ae..1f6007a 100644
>> --- a/drivers/acpi/prmt.c
>> +++ b/drivers/acpi/prmt.c
>> @@ -292,6 +292,12 @@ void __init init_prmt(void)
>>         int mc = acpi_table_parse_entries(ACPI_SIG_PRMT, sizeof(struct acpi_table_prmt) +
>>                                           sizeof (struct acpi_table_prmt_header),
>>                                           0, acpi_parse_prmt, 0);
>> +       /*
>> +        * Return immediately if PRMT table is not present or no PRM module found.
>> +        */
>> +       if (mc <= 0)
>> +               return;
>> +
>>         pr_info("PRM: found %u modules\n", mc);
>>
>>         status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
>> --
> 
> Applied as 5.14-rc material, thanks!
> 
> However, since I'm on vacation next week, it will get into linux-next
> after -rc6.
> 

Thanks Rafael!

      reply	other threads:[~2021-08-08 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  0:46 Aubrey Li
2021-08-06 13:23 ` Rafael J. Wysocki
2021-08-08 23:53   ` Aubrey Li [this message]

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=2728924f-25cf-25dc-df0f-d02bbc959b9f@linux.intel.com \
    --to=aubrey.li@linux.intel.com \
    --cc=aubrey.li@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /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

all inboxes | Powered by JetHome®