2024-05-28 19:22:10

by admiyo

[permalink] [raw]
Subject: [PATCH v2 2/3] mctp pcc: Allow PCC Data Type in MCTP resource.

From: Adam Young <[email protected]>

Note that this patch sfor code that will be merged
in via ACPICA changes. The corresponding patch in ACPCA
has already merged.

Signed-off-by: Adam Young <[email protected]>
---
drivers/acpi/acpica/rsaddr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/rsaddr.c b/drivers/acpi/acpica/rsaddr.c
index fff48001d7ef..6bd9704f17b0 100644
--- a/drivers/acpi/acpica/rsaddr.c
+++ b/drivers/acpi/acpica/rsaddr.c
@@ -282,7 +282,7 @@ acpi_rs_get_address_common(struct acpi_resource *resource,

/* Validate the Resource Type */

- if ((address.resource_type > 2) && (address.resource_type < 0xC0)) {
+ if ((address.resource_type > 2) && (address.resource_type < 0xC0) && (address.resource_type != 10)) {
return (FALSE);
}

--
2.34.1



2024-05-29 03:26:01

by Ratheesh Kannoth

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] mctp pcc: Allow PCC Data Type in MCTP resource.

On 2024-05-29 at 00:48:22, [email protected] ([email protected]) wrote:
> From: Adam Young <[email protected]>
> --- a/drivers/acpi/acpica/rsaddr.c
> +++ b/drivers/acpi/acpica/rsaddr.c
> @@ -282,7 +282,7 @@ acpi_rs_get_address_common(struct acpi_resource *resource,
>
> /* Validate the Resource Type */
>
> - if ((address.resource_type > 2) && (address.resource_type < 0xC0)) {
> + if ((address.resource_type > 2) && (address.resource_type < 0xC0) && (address.resource_type != 10)) {
use macros or enums instead of hard coded numbers. That will improve code readability.

> return (FALSE);
> }
>
> --
> 2.34.1
>

2024-05-30 16:25:24

by Adam Young

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] mctp pcc: Allow PCC Data Type in MCTP resource.


On 5/28/24 23:25, Ratheesh Kannoth wrote:
> On 2024-05-29 at 00:48:22, [email protected] ([email protected]) wrote:
>> From: Adam Young <[email protected]>
>> --- a/drivers/acpi/acpica/rsaddr.c
>> +++ b/drivers/acpi/acpica/rsaddr.c
>> @@ -282,7 +282,7 @@ acpi_rs_get_address_common(struct acpi_resource *resource,
>>
>> /* Validate the Resource Type */
>>
>> - if ((address.resource_type > 2) && (address.resource_type < 0xC0)) {
>> + if ((address.resource_type > 2) && (address.resource_type < 0xC0) && (address.resource_type != 10)) {
> use macros or enums instead of hard coded numbers. That will improve code readability.

In general I agree, but this code is generated  from ACPICA and will not
be directly commited.  The corresponding patch to acpica has already
merged. What you see here is what the code will look like post-process
from ACPICA conversion.


>
>> return (FALSE);
>> }
>>
>> --
>> 2.34.1
>>