From patchwork Thu Apr 6 20:38:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 80478 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1295496vqo; Thu, 6 Apr 2023 13:58:40 -0700 (PDT) X-Google-Smtp-Source: AKy350a8V7bpU/r94l96DvHVxPElvpb6qwg9GyAbXj9PyhFUN22Ogn4nvTxbN/tKo/6Ajdow+3sj X-Received: by 2002:a17:902:c652:b0:19e:b38c:860b with SMTP id s18-20020a170902c65200b0019eb38c860bmr183890pls.24.1680814720336; Thu, 06 Apr 2023 13:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680814720; cv=none; d=google.com; s=arc-20160816; b=OR6KkfsX7Ny3HbTCc8DW5enpds3JhEaw4BYNuDYhqhcW7v/IEE07TWAc03PBd+9BU3 6k00PCAZgNkHRYNPUx1Mfty7dAhnb34Nv2evSm8whGFL7Se7HOoRGppR9lIgQUv+sQ7o ka6DplKGxO2J6FWHCy0BVdeDgacKCTVkfjStcjx6HzECoHJxDL3h5NtPKlvRkC+iFhKX LQQHKuyvT314bEnJBcnWIfdAAGg+sQtsOuWajmjomCJ8SI//w4WV3pa9lbZlMPDgKvfH y6Rb7BwMrULyJ6O4UherLqDJhB0B7YE12Q0I4HE1/N0iQHsmejzRJigTxXKnIvtzBXZo eqQw== 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=PV1WKslIWpgDcLFwjfF7HVlFqMgU6wrA5iABhcS5tGY=; b=WRaf+o4CJGT95DY6v5VZ42CeGDA0zOTtzDxaLNde/n1sqVkwleFhip3x3brJOD6vif gP3gK8ZzpqFVhlHIfmgKxdu1Q+OswMj9EZXOE3NdU/kktcopUQqGREBJ4kdArAD23yAa /W6siwYTEgsRbDf6Py7Iq6rVGs9bwvAFa6hLncT/K/cJdvZ5yMTQiYDZLmXxu3xz5y1S xTm0VXQ61Fq+PrliXz+Geue+6tzAX4oFMp1SN44U2wX0bR2K1PFrJvcdknU7tzFsQldh Y8kl1Wg63q8QkDY5qnqdPZca0awYUY5r7/vFPPvVTWNTCINWHc3iGkk/pFPYP6lxOuo7 tBog== 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 kt7-20020a170903088700b0019e8c3cd3ffsi2295604plb.421.2023.04.06.13.58.28; Thu, 06 Apr 2023 13:58:40 -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 S240351AbjDFUmM (ORCPT + 99 others); Thu, 6 Apr 2023 16:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240190AbjDFUlj (ORCPT ); Thu, 6 Apr 2023 16:41:39 -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 36B0FAD18; Thu, 6 Apr 2023 13:38:37 -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 C2B5160F77; Thu, 6 Apr 2023 20:38:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99A21C433D2; Thu, 6 Apr 2023 20:38:25 +0000 (UTC) From: Krzysztof Kozlowski To: Jean Delvare , Guenter Roeck , Jonathan Corbet , Oded Gabbay , Michael Hennerich , Aleksa Savic , Jack Doan , =?utf-8?q?Nuno_S=C3=A1?= , Marius Zachmann , Wilken Gottwalt , =?utf-8?q?Pali_Roh=C3=A1r?= , Jean-Marie Verdun , Nick Hawkins , Xu Yilun , Tom Rix , Clemens Ladisch , Rudolf Marek , Charles Keepax , Richard Fitzgerald , Ibrahim Tilki , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Jonas Malaco , Aleksandr Mezin , Derek John Clark , =?utf-8?q?Joaqu=C3=ADn_Ignaci?= =?utf-8?q?o_Aramend=C3=ADa?= , Iwona Winiarska , Florian Fainelli , Broadcom internal kernel review list , Hans de Goede , Michael Walle , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Agathe Porte , Eric Tremblay , Robert Marko , linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, patches@opensource.cirrus.com, openbmc@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 50/68] hwmon: peci: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:12 +0200 Message-Id: <20230406203821.3012402-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230406203103.3011503-1-krzysztof.kozlowski@linaro.org> References: <20230406203103.3011503-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762461976289520773?= X-GMAIL-MSGID: =?utf-8?q?1762461976289520773?= Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski --- drivers/hwmon/peci/cputemp.c | 2 +- drivers/hwmon/peci/dimmtemp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c index 87d56f0fc888..e5b65a382772 100644 --- a/drivers/hwmon/peci/cputemp.c +++ b/drivers/hwmon/peci/cputemp.c @@ -447,7 +447,7 @@ static const struct hwmon_ops peci_cputemp_ops = { .read = cputemp_read, }; -static const struct hwmon_channel_info *peci_cputemp_info[] = { +static const struct hwmon_channel_info * const peci_cputemp_info[] = { HWMON_CHANNEL_INFO(temp, /* Die temperature */ HWMON_T_LABEL | HWMON_T_INPUT | HWMON_T_MAX | diff --git a/drivers/hwmon/peci/dimmtemp.c b/drivers/hwmon/peci/dimmtemp.c index 0a633bda3668..ed968401f93c 100644 --- a/drivers/hwmon/peci/dimmtemp.c +++ b/drivers/hwmon/peci/dimmtemp.c @@ -300,7 +300,7 @@ static int create_dimm_temp_label(struct peci_dimmtemp *priv, int chan) return 0; } -static const struct hwmon_channel_info *peci_dimmtemp_temp_info[] = { +static const struct hwmon_channel_info * const peci_dimmtemp_temp_info[] = { HWMON_CHANNEL_INFO(temp, [0 ... DIMM_NUMS_MAX - 1] = HWMON_T_LABEL | HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT),