X86 platform drivers
 help / color / mirror / Atom feed
From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Barnabás Pőcze" <pobrn@protonmail.com>
Cc: "Hans de Goede" <hdegoede@redhat.com>,
	"markgross@kernel.org" <markgross@kernel.org>,
	"Mark Pearson" <markpearson@lenovo.com>,
	"platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] platform/x86: think-lmi: use correct possible_values delimters
Date: Sat, 18 Mar 2023 13:55:04 -0400	[thread overview]
Message-ID: <56d71f0d-e387-4fc4-8e41-1eab9ed571ab@app.fastmail.com> (raw)
In-Reply-To: <NJCYtxr0cVaE6xV-cHfKygPgRYvPzrouaGcTSI-Is-n6pzo8AQl6kek2MkDEQBB6hJcwC9Z7zfqq5NapyIHTHgllYcwMYebQ6D-CCOKG0FQ=@protonmail.com>

Thanks Barnabas,

On Sat, Mar 18, 2023, at 10:37 AM, Barnabás Pőcze wrote:
> Hi
>
>
> 2023. március 17., péntek 16:46 keltezéssel, Mark Pearson 
> <mpearson-lenovo@squebb.ca> írta:
>
>> firmware-attributes class requires that possible values are delimited
>> using ';' but the Lenovo firmware uses ',' instead.
>> Parse string and replace where appropriate
>> 
>> Thanks to Thomas W for pointing this out.
>> 
>> Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
>> ---
>> [...]
>> +		/*
>> +		 * firmware-attributes requires that possible_values are separated by ';' but
>> +		 * Lenovo FW uses ','. Replace appropriately.
>> +		 */
>> +		if (setting->possible_values) {
>> +			char *tmp = setting->possible_values;
>> +
>> +			while ((tmp = strchr(tmp, ',')) != NULL)
>> +				*tmp++ = ';';
>> +		}
>
> Please see `strreplace()` from `linux/string.h`.
Ah - I looked for that and didn't find it. Thank you (and will do)

>
>
>> +
>>  		kobject_init(&setting->kobj, &tlmi_attr_setting_ktype);
>>  		tlmi_priv.setting[i] = setting;
>>  		kfree(item);
>> --
>> 2.39.2
>
>
> Regards,
> Barnabás Pőcze

  reply	other threads:[~2023-03-18 17:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 15:46 [PATCH v3 1/3] platform/x86: think-lmi: add missing type attribute Mark Pearson
2023-03-17 15:46 ` [PATCH v3 2/3] platform/x86: think-lmi: Add possible_values for ThinkStation Mark Pearson
2023-03-18 16:35   ` Thomas Weißschuh
2023-03-18 17:53     ` Mark Pearson
2023-03-18 23:52       ` Thomas Weißschuh
2023-03-19  0:08         ` Mark Pearson
2023-03-19  9:34           ` Hans de Goede
2023-03-18 17:59     ` Mark Pearson
2023-03-19  0:01       ` Thomas Weißschuh
2023-03-19  0:04         ` Mark Pearson
2023-03-17 15:46 ` [PATCH v3 3/3] platform/x86: think-lmi: use correct possible_values delimters Mark Pearson
2023-03-18 14:37   ` Barnabás Pőcze
2023-03-18 17:55     ` Mark Pearson [this message]
2023-03-18 16:39   ` Thomas Weißschuh
2023-03-18 18:06     ` Mark Pearson
2023-03-19  0:11       ` Thomas Weißschuh
2023-03-19  0:18         ` Mark Pearson
2023-03-20  0:52 ` [PATCH v3 1/3] platform/x86: think-lmi: add missing type attribute Limonciello, Mario

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=56d71f0d-e387-4fc4-8e41-1eab9ed571ab@app.fastmail.com \
    --to=mpearson-lenovo@squebb.ca \
    --cc=hdegoede@redhat.com \
    --cc=markgross@kernel.org \
    --cc=markpearson@lenovo.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pobrn@protonmail.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