mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Update steps order list elements are evaluated
@ 2023-08-21 14:42 Jorge Lopez
  2023-08-21 16:57 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Jorge Lopez @ 2023-08-21 14:42 UTC (permalink / raw)
  To: hdegoede, platform-driver-x86, linux-kernel, thomas,
	ilpo.jarvinen, dan.carpenter

Update steps how order list elements data and elements size are
evaluated

Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>

---
Based on the latest platform-drivers-x86.git/for-next
---
 .../platform/x86/hp/hp-bioscfg/order-list-attributes.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
index cffc1c9ba3e7..1ff09dfb7d7e 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
@@ -258,7 +258,6 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
 				eloc++;
 			break;
 		case ORD_LIST_ELEMENTS:
-			size = ordered_list_data->elements_size;
 
 			/*
 			 * Ordered list data is stored in hex and comma separated format
@@ -270,17 +269,14 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
 
 			part_tmp = tmpstr;
 			part = strsep(&part_tmp, COMMA_SEP);
-			if (!part)
-				strscpy(ordered_list_data->elements[0],
-					tmpstr,
-					sizeof(ordered_list_data->elements[0]));
 
-			for (olist_elem = 1; olist_elem < MAX_ELEMENTS_SIZE && part; olist_elem++) {
+			for (olist_elem = 0; olist_elem < MAX_ELEMENTS_SIZE && part; olist_elem++) {
 				strscpy(ordered_list_data->elements[olist_elem],
 					part,
 					sizeof(ordered_list_data->elements[olist_elem]));
-				part = strsep(&part_tmp, SEMICOLON_SEP);
+				part = strsep(&part_tmp, COMMA_SEP);
 			}
+			ordered_list_data->elements_size = olist_elem;
 
 			kfree(str_value);
 			str_value = NULL;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Update steps order list elements are evaluated
  2023-08-21 14:42 [PATCH] Update steps order list elements are evaluated Jorge Lopez
@ 2023-08-21 16:57 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2023-08-21 16:57 UTC (permalink / raw)
  To: Jorge Lopez, platform-driver-x86, linux-kernel, thomas,
	ilpo.jarvinen, dan.carpenter

Hi,

On 8/21/23 16:42, Jorge Lopez wrote:
> Update steps how order list elements data and elements size are
> evaluated
> 
> Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
> 
> ---
> Based on the latest platform-drivers-x86.git/for-next

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans







> ---
>  .../platform/x86/hp/hp-bioscfg/order-list-attributes.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
> index cffc1c9ba3e7..1ff09dfb7d7e 100644
> --- a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
> +++ b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
> @@ -258,7 +258,6 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
>  				eloc++;
>  			break;
>  		case ORD_LIST_ELEMENTS:
> -			size = ordered_list_data->elements_size;
>  
>  			/*
>  			 * Ordered list data is stored in hex and comma separated format
> @@ -270,17 +269,14 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
>  
>  			part_tmp = tmpstr;
>  			part = strsep(&part_tmp, COMMA_SEP);
> -			if (!part)
> -				strscpy(ordered_list_data->elements[0],
> -					tmpstr,
> -					sizeof(ordered_list_data->elements[0]));
>  
> -			for (olist_elem = 1; olist_elem < MAX_ELEMENTS_SIZE && part; olist_elem++) {
> +			for (olist_elem = 0; olist_elem < MAX_ELEMENTS_SIZE && part; olist_elem++) {
>  				strscpy(ordered_list_data->elements[olist_elem],
>  					part,
>  					sizeof(ordered_list_data->elements[olist_elem]));
> -				part = strsep(&part_tmp, SEMICOLON_SEP);
> +				part = strsep(&part_tmp, COMMA_SEP);
>  			}
> +			ordered_list_data->elements_size = olist_elem;
>  
>  			kfree(str_value);
>  			str_value = NULL;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-21 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 14:42 [PATCH] Update steps order list elements are evaluated Jorge Lopez
2023-08-21 16:57 ` Hans de Goede

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®