Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6188528rwl; Wed, 22 Mar 2023 07:35:46 -0700 (PDT) X-Google-Smtp-Source: AK7set+XKnhlkLxzLn7WkONNejJ647hH/13GnZ20za1gDz5DOGjKawUPpxnlMfJ/CoMvRzDxYPmF X-Received: by 2002:a17:906:a20e:b0:930:d319:d947 with SMTP id r14-20020a170906a20e00b00930d319d947mr7165552ejy.74.1679495746047; Wed, 22 Mar 2023 07:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679495746; cv=none; d=google.com; s=arc-20160816; b=aeIreqK63zjoafCTWqb1b0MFvmk2XxNKugwAJI0rsKVsr4yq5DOQMycJWhGg2tc+I1 +LdosJcJ2SVajKF+bBfUCls+bOUDzfLyil0JCBK6qsn0I1lDYUVrNNoQeHiS/KzOdfna h5BKjhCXyjWK6VrOuaj/trr6vu98ypXHUft2dTDXyC97q802YZBmPIXm+IIafkT5/7Fc Rk564TDJeGXuvdmaaOnRpn5a61tv6MqardieZ9NI4oQAj1iYLnzwKhsy55mEji0Anxl8 2KJ4eqQfiLUtNOikdVefh5SWKjLibPtYeLOjHuC5KEDecF18lgPeCaOtDKsjKXGW2Cmw PvCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=b4HCh/exYa+rKzQkTBGQGYfL/u/z6TimwZcfkWX/lMc=; b=oUkXtPPEk0tYfeJYbddz+KjB/Xr+YQf/3oMR2IF7CwSt64t9DLwWQe1QSDOBbv5ZGr SdBDgSAU4zI1EF44IiFKMKD9hHz7ZuwTQYV2OSvnYvhdCgAWhx64y8VM1qS0R9smT5YU NoEGi8ISxItA0db1MzX2v0G8w4nZeHArztber2S6az5RRoaf+6YacXUzai4BTu0hqmBY hWDHEtemq0s8yKehOmY78nZbH68S7OyvEBJ3ZW7iYv9XrTh1DqQi68kgebft6FrG3XdI YK01EjRmSRdpNB5j+VbCD4N85qqTJK/+0iisyx550JyEW1c99LuYzh/pC284IAsHGfRn UpHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NDYFbPX1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020aa7dd10000000b004fbe5ca598fsi16481174edv.643.2023.03.22.07.35.21; Wed, 22 Mar 2023 07:35:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NDYFbPX1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbjCVOXv (ORCPT + 99 others); Wed, 22 Mar 2023 10:23:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231388AbjCVOXt (ORCPT ); Wed, 22 Mar 2023 10:23:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CEDC4219 for ; Wed, 22 Mar 2023 07:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679494954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b4HCh/exYa+rKzQkTBGQGYfL/u/z6TimwZcfkWX/lMc=; b=NDYFbPX1O6EsQ9mCrhYfu+7mNON7hSy7q+SzcqDtyNOhSqXRsX/mPtrX7vjgNB3SqGZvIb 5+MPtUPKYN6UzFqmMwE5oM3lyjjGynHeGBd3peEOHcu7uIsuKQ8u/jYHiQbRvW2zgH93pp lk2wr+5j3SPSgfSn9JPoqBL/nP0bn1Q= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-282-PGbw2DTJMlytT9seI5G3uw-1; Wed, 22 Mar 2023 10:22:33 -0400 X-MC-Unique: PGbw2DTJMlytT9seI5G3uw-1 Received: by mail-ed1-f72.google.com with SMTP id y24-20020aa7ccd8000000b004be3955a42eso27728015edt.22 for ; Wed, 22 Mar 2023 07:22:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679494952; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b4HCh/exYa+rKzQkTBGQGYfL/u/z6TimwZcfkWX/lMc=; b=KVahFZWNgosv84yrcYSVupiLyC7CtiPXlkxeM/eEyLqoiQ713mtXPf36Pw8dKWFih3 OM99caHke65cQ3Mkde4BK1lXOpnt2RuXmo6HH/P72IB8qoCvbHKtoiGrlBKFuLXLtVWX qER5R+10oIQuUoej7322KiYTQjfw22pXHAGoO0ElQ/nPMaK5YgCEV2JVbqk4AS/D8YQB pphkq1PJjWln+NH5cYUzo+8c2dnYvSilUgrOb4f7fGwbGMtokkau//C7uTjLynanRhNP 5AHTWqT77sSYHgVoNrgJtBZZrM06H7qCK5+2NII5KcyStYhTmhoj4x0EbQ6Nn27sv2th KG6A== X-Gm-Message-State: AO0yUKWZ2x2h4IdcsZIBnwYFUbOnBdSkvAM3fcE06OpPJxxO35H1gjIF DlSeaBYxD3AEgoBmCkGdjcAEc6q4uF2ODLCpa8ZhBYzM/jvDeFXzBAQHv6+jg+mC7lqP6vaVDlK xH4d9YIYQF5WmOjC4k6MxAQEm X-Received: by 2002:aa7:d315:0:b0:4fa:c04f:66c9 with SMTP id p21-20020aa7d315000000b004fac04f66c9mr6790618edq.2.1679494951999; Wed, 22 Mar 2023 07:22:31 -0700 (PDT) X-Received: by 2002:aa7:d315:0:b0:4fa:c04f:66c9 with SMTP id p21-20020aa7d315000000b004fac04f66c9mr6790602edq.2.1679494951752; Wed, 22 Mar 2023 07:22:31 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id u23-20020a170906409700b009334a6ef3e8sm5230824ejj.141.2023.03.22.07.22.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Mar 2023 07:22:30 -0700 (PDT) Message-ID: Date: Wed, 22 Mar 2023 15:22:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v4 2/4] platform/x86: think-lmi: use correct possible_values delimiters Content-Language: en-US, nl To: =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= , Mark Pearson Cc: markgross@kernel.org, markpearson@lenovo.com, pobrn@protonmail.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org References: <20230320003221.561750-1-mpearson-lenovo@squebb.ca> <20230320003221.561750-2-mpearson-lenovo@squebb.ca> <3df8ca69-e2a4-49d1-9c5c-8e6ff8bb0f96@t-8ch.de> From: Hans de Goede In-Reply-To: <3df8ca69-e2a4-49d1-9c5c-8e6ff8bb0f96@t-8ch.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 3/20/23 16:22, Thomas Weißschuh wrote: > Hi Mark, > > Thanks for the series! > For all of it: > > Reviewed-by: Thomas Weißschuh > > If you decide to reroll it, one more nitpick below. Mark, thank you for the series. Thomas, thank you for the reviews. I've applied this series to the fixes branch now: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes Note it will show up in my fixes branch once I've pushed my local branch there, which might take a while. I will include this patch in my next fixes pull-req to Linus for the current kernel development cycle. Regards, Hans > On Sun, Mar 19, 2023 at 08:32:19PM -0400, Mark Pearson wrote: >> firmware-attributes class requires that possible values are delimited >> using ';' but the Lenovo firmware uses ',' instead. >> Parse string and replace where appropriate. >> >> Suggested-by: Thomas Weißschuh >> Fixes: a40cd7ef22fb ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms") >> Signed-off-by: Mark Pearson >> --- >> Changes in v4 >> - Moved earlier in the series as recommended >> - used strreplace function as recommended >> Changes in v3: >> - New patch added to the series. No v1 & v2. >> >> drivers/platform/x86/think-lmi.c | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c >> index a765bf8c27d8..53f34b1adb8c 100644 >> --- a/drivers/platform/x86/think-lmi.c >> +++ b/drivers/platform/x86/think-lmi.c >> @@ -954,7 +954,7 @@ static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr, >> >> if (setting->possible_values) { >> /* Figure out what setting type is as BIOS does not return this */ >> - if (strchr(setting->possible_values, ',')) >> + if (strchr(setting->possible_values, ';')) >> return sysfs_emit(buf, "enumeration\n"); > > If you make this patch the first on of the series it would > * make the hunk above unnecessary. > * make it easier to backport if somebody wants do do so. > * make the then second patch easier to read as it would not introduce > "incorrect" code that needs a fix-up in the following commit. > >> } >> /* Anything else is going to be a string */ >> @@ -1413,6 +1413,13 @@ static int tlmi_analyze(void) >> pr_info("Error retrieving possible values for %d : %s\n", >> i, setting->display_name); >> } >> + /* >> + * firmware-attributes requires that possible_values are separated by ';' but >> + * Lenovo FW uses ','. Replace appropriately. >> + */ >> + if (setting->possible_values) >> + strreplace(setting->possible_values, ',', ';'); >> + >> kobject_init(&setting->kobj, &tlmi_attr_setting_ktype); >> tlmi_priv.setting[i] = setting; >> kfree(item); >> -- >> 2.39.2 >> >