Message ID | 20230407150339.80218-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp355594vqo; Fri, 7 Apr 2023 08:17:57 -0700 (PDT) X-Google-Smtp-Source: AKy350Y63IFayBdKe9ftxqADrhiTNCqt98M+ZsFPHjfqRsdez/7pP9uwlQGhOZNhtczYrMwO32C9 X-Received: by 2002:a05:6a20:be1e:b0:db:e054:826a with SMTP id ge30-20020a056a20be1e00b000dbe054826amr2826141pzb.5.1680880677608; Fri, 07 Apr 2023 08:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680880677; cv=none; d=google.com; s=arc-20160816; b=HpTPLpCrfoG4tDw3v7C44S0tU8B+QmzsNOkoKNrOQDDGxcqaSPYPk7vE3f0VTilKVy Ye8O6ajvVm3Rw4IJWT1dGrwT4AMwRO5hciGkKKqfpCrrJ74AwCW6X7IJkvoEp5Q3vuMq Gh8bThqgAiEQkCJboXxT/o4ficjqZbM3IA07Q/9tmGiXxAOy//mP/z9GMb2c4sJZHAyL U6xHlRtQxg6r5g0B7EN3rvwkyXMCGRwLARU/gD/+/awAF7jGcneskvjqeEuO0XTncZT1 lk30hBv04fIHxN0j5XvdWFuPBcuj1mx/C3ELQaDNMSrqeOjZgbUBL364StppxnyWtUFd xATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bmn1i2s+kRK6QEknyMTa0vqn570EJuJOWo71+kFnPZs=; b=vrgRxdPfFRfKRX3QRqPyVajpVJDUStFT4OVW15eRwzXS37npso1PeciaBUp3FRKBRj tev1vTwa+hcolgUAVQqSD1lpjQh2DrNx4WLFtpkXzmfQAHh3qXq7nKKMDeZCyFA+tXe2 R8xSX0NSl2B/zM8BflvN8LwrSNnIyiZq+2zGJDVpieahWfzHKjbkiVq15sCSMIjiLjbl jw1PZuwTcLh55m1+ubIAIqg7CCA0rJu0U2GfRexX1lKHJZ5X1EEhYWg+yi45nRPi2zKr ffdKcCMk4oo8G9OM1PUYeI5LelQwnSUBHkxcM4GvG3d43bGsOFH5prDZS6ELPqjWQ92u sCuQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j10-20020a63230a000000b0050beec91e30si3701501pgj.768.2023.04.07.08.17.45; Fri, 07 Apr 2023 08:17:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240701AbjDGPFM (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Fri, 7 Apr 2023 11:05:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240855AbjDGPEy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 7 Apr 2023 11:04:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B2D8BBBE; Fri, 7 Apr 2023 08:03:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E7AD064A2E; Fri, 7 Apr 2023 15:03:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DFE6C433EF; Fri, 7 Apr 2023 15:03:43 +0000 (UTC) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@weissschuh.net>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org>, Jeremy Soller <jeremy@system76.com>, System76 Product Development <productdev@system76.com>, Azael Avalos <coproscefalo@gmail.com>, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, linux-hwmon@vger.kernel.org Subject: [PATCH 1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info Date: Fri, 7 Apr 2023 17:03:36 +0200 Message-Id: <20230407150339.80218-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762531137585595738?= X-GMAIL-MSGID: =?utf-8?q?1762531137585595738?= |
Series |
[1/4] platform/x86: gigabyte: constify pointers to hwmon_channel_info
|
|
Commit Message
Krzysztof Kozlowski
April 7, 2023, 3:03 p.m. UTC
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
This depends on hwmon core patch:
https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/
Therefore I propose this should also go via hwmon tree.
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
---
drivers/platform/x86/gigabyte-wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi, On 4/7/23 17:03, Krzysztof Kozlowski wrote: > Statically allocated array of pointed to hwmon_channel_info can be made > const for safety. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > This depends on hwmon core patch: > https://lore.kernel.org/all/20230406203103.3011503-2-krzysztof.kozlowski@linaro.org/ > > Therefore I propose this should also go via hwmon tree. Ok, taking all 4 these patches upstream through the hwmon tree is fine by me, here is my Ack for that: Acked-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans p.s. I'm going to drop these from my patch queue now. If for some reason merging these through the hwmon tree does not work out, please resend them after 6.4-rc1 is out (assuming that will have the pre-requisite patch) and then I'll apply them directly. > > Cc: Jean Delvare <jdelvare@suse.com> > Cc: Guenter Roeck <linux@roeck-us.net> > Cc: linux-hwmon@vger.kernel.org > --- > drivers/platform/x86/gigabyte-wmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/gigabyte-wmi.c b/drivers/platform/x86/gigabyte-wmi.c > index 5e5b17c50eb6..7cc969fb1beb 100644 > --- a/drivers/platform/x86/gigabyte-wmi.c > +++ b/drivers/platform/x86/gigabyte-wmi.c > @@ -99,7 +99,7 @@ static umode_t gigabyte_wmi_hwmon_is_visible(const void *data, enum hwmon_sensor > return usable_sensors_mask & BIT(channel) ? 0444 : 0; > } > > -static const struct hwmon_channel_info *gigabyte_wmi_hwmon_info[] = { > +static const struct hwmon_channel_info * const gigabyte_wmi_hwmon_info[] = { > HWMON_CHANNEL_INFO(temp, > HWMON_T_INPUT, > HWMON_T_INPUT,
diff --git a/drivers/platform/x86/gigabyte-wmi.c b/drivers/platform/x86/gigabyte-wmi.c index 5e5b17c50eb6..7cc969fb1beb 100644 --- a/drivers/platform/x86/gigabyte-wmi.c +++ b/drivers/platform/x86/gigabyte-wmi.c @@ -99,7 +99,7 @@ static umode_t gigabyte_wmi_hwmon_is_visible(const void *data, enum hwmon_sensor return usable_sensors_mask & BIT(channel) ? 0444 : 0; } -static const struct hwmon_channel_info *gigabyte_wmi_hwmon_info[] = { +static const struct hwmon_channel_info * const gigabyte_wmi_hwmon_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT, HWMON_T_INPUT,