From: Jorge Lopez <jorgealtxwork@gmail.com>
To: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas@t-8ch.de,
ilpo.jarvinen@linux.intel.com, dan.carpenter@linaro.org
Subject: [PATCH] Update steps order list elements are evaluated
Date: Mon, 21 Aug 2023 09:42:05 -0500 [thread overview]
Message-ID: <20230821144205.13529-1-jorge.lopez2@hp.com> (raw)
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
next reply other threads:[~2023-08-21 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 14:42 Jorge Lopez [this message]
2023-08-21 16:57 ` Hans de Goede
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=20230821144205.13529-1-jorge.lopez2@hp.com \
--to=jorgealtxwork@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=thomas@t-8ch.de \
/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®