Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1634450lqo; Sun, 12 May 2024 11:01:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzBvOXXUEk2Z/SAEbgUswCcLf+jT+gpz0A+AvaP5VllgqFyMb+tLYugsiCwlmL9dIzXb3X6YPe95GZfPjOAzbr1O03sizKZIBN8LeHDg== X-Google-Smtp-Source: AGHT+IE3901qdJqdbMnH6MuLxWIU9Q34Jm1OJsk/C+tSeDkc+UdjxvTNcI4plKNXCCxmMDkbYQjp X-Received: by 2002:a50:cc48:0:b0:573:5c4c:a87a with SMTP id 4fb4d7f45d1cf-5735c4ca8b7mr3889949a12.27.1715536875910; Sun, 12 May 2024 11:01:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715536875; cv=pass; d=google.com; s=arc-20160816; b=0ZYj8s/utsMFAqIE7ku77BdNBSy/VeS2beyoQr9pBatlw8HPYiu8TtyL6hDHiKokLY hCgmoiqMlI6BGRJ8VB+3fNwSzEHgnXXCb/gZJ9oUfdQFufrKW2F9gTWJvsSkZIh8Nd5v nxrQE8HsG0B0b7i5iEl+mIulU0MgCZadOHrdROPSoYDt3GtmRS0oanG6LyhogLVqNgwY AK/jJvttzW1AuBVJs7+VQjPAWVXA+B9Q7V3+qr7ohe09JqyATM4OCvIePMHpojPHKjJi YzS3Z/XYEbuaMMdRHxksQSmwR7XBukipwOuMMDAiLCy9MyLRXNKbex38XKSOBFAcsTj7 rvvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=pPsk17yMpJ9jlFmK1Kmja1no6QKrs/3/eiUBETAd7EM=; fh=O5rlszQbErwqz9gS2/+10lfeo7cF8pXMvdiQkDCmVAQ=; b=OPkqWD7g/S7OfBfNGTWyYrNB2N2eElOr1PCm+6+/4U7StFEASatqUI9A9Z+Qbx5w0g CV9nDRWWYLzi1qMgy1Gk0H4Vhl2ig6NxcKgdK04H+HMUiJONpd31bGFqgzYqtl0fI7gX ZRc3pAvU80L6UEjUo4OJ+dM6Pogd460n3wkgknmk16Yung3dWIIv1ofHTkkUrTORoQ8+ EuNhrJ9UamT67RSWYEM1y1LmyD7lgwbadojRwJqS5X9Cih3VHJAocsQoK+ELlWLyf2Ac YIgMo1ssvSMPILsGBzdxT+eg4aU7NYUjPONH84G1fkyDiHs69q1+1vSk5wDemAZzBIB0 WVQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=UJw315u0; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-176967-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176967-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c372f39si4172990a12.583.2024.05.12.11.01.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 11:01:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176967-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=UJw315u0; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-176967-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176967-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 063541F21127 for ; Sun, 12 May 2024 18:01:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF5EA4F21D; Sun, 12 May 2024 18:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="UJw315u0" Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FD404EB31; Sun, 12 May 2024 18:01:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715536867; cv=none; b=oJja6LjeK2MPCoPAHDWdoWCBLWW8FNvF99Zny+dZsMVz7fWMmG7eGy8sgehg0qmlkoYPBxBSx0zDnaKEeUMYCBC9uhvMZ7n6PP286+y9rwlgQKnUVTKpQww0lSBrfLK8PDdGeCy3UWry/0VBK4poRdYJkAFhfGct1YmyUzG6yNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715536867; c=relaxed/simple; bh=RKrk+mnnV+wIwQ7PaTNB3/I4d0ChWtnaUI2Hz1coUXk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AkYXF9VIuzMcGIYY4Eu14305KyqLxmFWuupzSULdXQInRcgEOFwDmMYVPbUGGFkaAopEiuMpsuW8W9Vwmg0g3ZjaV05qUeBlO9dZgQRqmAo4pqDitfpFVIf3n57XJAo6E7QganxD+GSw0uFiXRqkZjmxW6fpgkbBC2vfAxrtQjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=UJw315u0; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1715536831; x=1716141631; i=w_armin@gmx.de; bh=pPsk17yMpJ9jlFmK1Kmja1no6QKrs/3/eiUBETAd7EM=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=UJw315u0kIylllUBwYaElghO7YNXguX1kIU0tfO5Kgsl1gfGWzsT6oppD1BWTqE1 d4VHVBwMSNLyEjPgomRKWIUKcIvZn2HiduHnJHc9FfTdAJp71qOLqK6fGBN3MaXqa SA1W2sY6c6o2mSJdXoiThgMJXQCZg/amaLl5kjIqoY+foinVv/3DM9zF9mp5CSgGn Uc3hbxMbUQW5OH2iLwo7OjonavpOEdoDx6kQBpfa63Gj0RNWqGvhCBNF4od85VENn xIeYAAKBN0BLArGG3d0fJ1TG+U0yTIAO9aJFuSZpa1Xgs6otyKAuPju1wJENnXZ4B NcMIDrHcx5qznoPSzA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [141.30.226.129] ([141.30.226.129]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUowV-1rxFDa1ytd-00TyQN; Sun, 12 May 2024 20:00:31 +0200 Message-ID: <565b4f5b-524b-4093-9c24-9e34cd0643f2@gmx.de> Date: Sun, 12 May 2024 20:00:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/2] platform/x86: dell-smbios: Add helper for checking supported commands To: Lyndon Sanche Cc: mario.limonciello@amd.com, pali@kernel.org, srinivas.pandruvada@linux.intel.com, ilpo.jarvinen@linux.intel.com, lkp@intel.com, hdegoede@redhat.com, Yijun.Shen@dell.com, Matthew Garrett , Heiner Kallweit , Randy Dunlap , Vegard Nossum , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Dell.Client.Kernel@dell.com References: <20240425172758.67831-1-lsanche@lyndeno.ca> <20240511023726.7408-3-lsanche@lyndeno.ca> Content-Language: en-US From: Armin Wolf In-Reply-To: <20240511023726.7408-3-lsanche@lyndeno.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:zLcsYzbqk8Z4beBlpUuz2Dzov05NQfgP2lp0UVzpIfOxKisAHqw WyGaAAJihQzMLTvNebWpc2+vv68CiksxdThUAX/TOcMPoRltmEqVw6a/EqCvnNSouZ4NSQ5 Pq1cVrQBeML5CkcdkhvV+Xs1EGzWNtq3WFMebBbmyu6GQKW8Jev4ylmU/Qv3xr70BozBrJh Z4Z78tVIvldoHyGA1EB2g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:wvSpFdmVY/I=;uHacvFpzaERGLYrJEsniU9GhTCr GhoWKYRIlGGGiR2gc8pwdwyqiamXIOpJXVuwjwk7MP2KB9Y2hVJvtz642UXm6lujAYre1QmMj bVZhVZeHipXWGpmwf8eI5zG58xZg2xkGZR/kkSZfXHQD6KhXcCA84A1PKPFib7FpeQX5inlOu zzZNtEaTAG07Yq4PDcQjgzp1KXIrHMOgnvnt5eh3VOj4ndPIFJCMNYYxoK2Q4eKLr4Iuz++YQ aF309Q/F1KSX1q95Hlj2d9P7ahWlADsaqNgQ5Wc18Pxa3ICRxn1cYsKj7cbYiUTMRH7ReC4Oa kvG4Hvf7WxfqG2lZGh3bZeAiALfIca+oMBRto4Q/SN2WW8Y+hcB32PL43xss9V6IZBAMqjHlo nEsnqj18wBhi6gnp7Buos12odCwFIserFc2o2Ld3c7BeSNOZyIu5Tf+Wkc59Rbtgzp6vNBQzJ 2CojmCrFRf79dAeyUntqpY2xbvgig5dDMgMKyko8ILekNvDRstZeyDzpEXj+17gbxvng5YMi3 iJtbjitjvhFjIRrOpM/TFgjKIjTTH/Gi0IbsuxhhIrcTvfQtZRIZxyKD6jKqEDf+j5pwKlTGF LxWXJb+J9cyePj++gw4sowglrs0N8ak3v80FczyT/YbaudQ8ykQV5L5ySRXwWmL7lLjTZo3Ix oE1aHRdUm9K4I3+XPXcFkP2/qh0aA6sfrurjX4zGIpOyXmIhHM3o4wz8EFzmp1wwKDWSs9L0M a4TuJ16x3HmJrdjpm1IB2A4qEf8bq4nK6exgSKW6aGyfy6+zScOanRdGJgE6Pt/jU09cdYYAy nKDRjqBmRPcMGvQlgf5LP9XqnSB1hcvEIPjVrSD6KIm6E= Am 11.05.24 um 04:36 schrieb Lyndon Sanche: > Add symbol to check if a specific class of smbios command is supported. > > Signed-off-by: Lyndon Sanche > --- > drivers/platform/x86/dell/dell-smbios-base.c | 6 ++++++ > drivers/platform/x86/dell/dell-smbios.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/plat= form/x86/dell/dell-smbios-base.c > index e61bfaf8b5c4..6ae09d7f76fb 100644 > --- a/drivers/platform/x86/dell/dell-smbios-base.c > +++ b/drivers/platform/x86/dell/dell-smbios-base.c > @@ -350,6 +350,12 @@ void dell_laptop_call_notifier(unsigned long action= , void *data) > } > EXPORT_SYMBOL_GPL(dell_laptop_call_notifier); > > +bool dell_laptop_check_supported_cmds(u16 class) > +{ Hi, the function dell_smbios_call_filter() says that classes above 30 are alwa= ys unsupported, so please check this here too. Also please rename the function to something like dell_smbios_class_is_sup= ported(). Other than that: Reviewed-by: Armin Wolf > + return da_supported_commands & (1 << class); > +} > +EXPORT_SYMBOL_GPL(dell_laptop_check_supported_cmds); > + > static void __init parse_da_table(const struct dmi_header *dm) > { > /* Final token is a terminator, so we don't want to copy it */ > diff --git a/drivers/platform/x86/dell/dell-smbios.h b/drivers/platform/= x86/dell/dell-smbios.h > index eb341bf000c6..63116671eada 100644 > --- a/drivers/platform/x86/dell/dell-smbios.h > +++ b/drivers/platform/x86/dell/dell-smbios.h > @@ -73,6 +73,7 @@ enum dell_laptop_notifier_actions { > int dell_laptop_register_notifier(struct notifier_block *nb); > int dell_laptop_unregister_notifier(struct notifier_block *nb); > void dell_laptop_call_notifier(unsigned long action, void *data); > +bool dell_laptop_check_supported_cmds(u16 class); > > /* for the supported backends */ > #ifdef CONFIG_DELL_SMBIOS_WMI