Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp973855rwl; Fri, 7 Apr 2023 08:06:49 -0700 (PDT) X-Google-Smtp-Source: AKy350au95Tc94d0zUDYk7L7iXJhNNwD96LMs16i4cI2DYjYuLedmob7SO/gRZDArYEo2e02JoTh X-Received: by 2002:a17:906:6da:b0:93a:f977:e0fe with SMTP id v26-20020a17090606da00b0093af977e0femr2284567ejb.20.1680880009608; Fri, 07 Apr 2023 08:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680880009; cv=none; d=google.com; s=arc-20160816; b=W8dPcUo8DaT5r2gssTwgTOotXKiSDrTEtHZwlUHVDUHjFUPP2XPJnGxRxMUS0DgzWM CRIIMsAf2i1geHSlVPybT3DpwyVhUjuZSXKEWv8mUD0z5KOw9CpJ+OnyqO1YqWEgNujO 1rUi3cX3A5FyqulGN3qrrX4e1Z3hqLsQFlH0gtbk5fcTychhfkql9lrUHtt7eYjcrzb+ I5JwvGfPID9gKj17yHAdpgjiVMMBRTL486BFhhsrv5JouvzFelhtjrbiozIjatQinaqN 4c+ZGnRbZqbs1BOlOwBWxevCbVn9e6A4MUxHOGWs2EOWl0HTxgVPcu45EvvR1SS+xN3D NxKg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SQF5EYAhU/ZmdvwJMcVKtelHsPPvWu0PGKr7rtkp7bQ=; b=u/gUN5XfBDDbALdqz0k7+eoL1PzujabwadCZ/71V5ry91mOuaA7iB4kukS7FChBliD 6JhEBdC/tDz3ykyd4TXuAMCnb/4vA5TAS+AVzJHr7+rkdMgRlpTMoJZEqwG8R6NpQxRC 9Q1AaV7mOW1UhW/gu2GXHFN6890qix3v7j4hDTRKTr1f70RposRYlrRe4C/oYmfIpAve ov8SOEQHSVN3vs9yF6uCWQgcG3DSj0bnZvwzfu/7fOprlOx/QidrNJBHzmu3i6dKISvs Sn7X4rxNYhhuDsAveuKNdUdnZmD7hxTPduCDbxcgDF5JX3A1JlEiNXCUyQMy1dlpVkbi gGeQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020aa7c74e000000b00501df17fe9fsi3091759eds.78.2023.04.07.08.06.15; Fri, 07 Apr 2023 08:06:49 -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 S240695AbjDGPFk (ORCPT + 99 others); Fri, 7 Apr 2023 11:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240519AbjDGPFJ (ORCPT ); Fri, 7 Apr 2023 11:05:09 -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 EEFD8E44; Fri, 7 Apr 2023 08:04:20 -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 660FA649A1; Fri, 7 Apr 2023 15:03:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7018C4339B; Fri, 7 Apr 2023 15:03:46 +0000 (UTC) From: Krzysztof Kozlowski To: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Hans de Goede , Mark Gross , Jeremy Soller , System76 Product Development , Azael Avalos , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH 2/4] platform/x86: hp: constify pointers to hwmon_channel_info Date: Fri, 7 Apr 2023 17:03:37 +0200 Message-Id: <20230407150339.80218-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230407150339.80218-1-krzysztof.kozlowski@linaro.org> References: <20230407150339.80218-1-krzysztof.kozlowski@linaro.org> 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: X-Mailing-List: linux-kernel@vger.kernel.org Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski --- 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 Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org --- drivers/platform/x86/hp/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c index 873f59c3e280..7b6b1d089d72 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -1482,7 +1482,7 @@ static int hp_wmi_hwmon_write(struct device *dev, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *info[] = { +static const struct hwmon_channel_info * const info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT, HWMON_F_INPUT), HWMON_CHANNEL_INFO(pwm, HWMON_PWM_ENABLE), NULL -- 2.34.1