Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp444rwl; Thu, 6 Apr 2023 13:42:52 -0700 (PDT) X-Google-Smtp-Source: AKy350aQBlka25YzmsWcLHW183mqj+sIeNnJYkfxUZN9Iqgoa3waIzOIFRRHb2T9od8g8biVw+zP X-Received: by 2002:a05:6a20:4f96:b0:d5:7704:f362 with SMTP id gh22-20020a056a204f9600b000d57704f362mr576774pzb.56.1680813772624; Thu, 06 Apr 2023 13:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680813772; cv=none; d=google.com; s=arc-20160816; b=fyUAywoWM/N1EtBl+klgxa6LZEdzqUI3UlBVQDzS+O8Q/bUi7I4vIksVe1O/zZ8KQV RqY7nHbDXVsy0eX6OIys1DD9IS4JM0Y4jAjrZ5HcAQUaQhYL+PUPRLgGdLg53FyiLOBp al+PBH8rCqScMXroh2RpvYxbpqlXd/RfRxJbXvjj61OglXCZtrWytvpi0o3VvLZNhXXJ q9q8xq4bzErPe8zbtiqRxIOj7DAPU3jokZ74yieRnyUfN8R6oGjRhEFBGYJbKGNiOBuE qNm2xmJno5Rgc8q91K25S6FnJMPm53zRnOgmrQDHNi9nnPf8RvlD1qrUFdtSCUDU1X1e Jk1w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020a624e14000000b005a8b856ad4csi2125084pfb.205.2023.04.06.13.42.31; Thu, 06 Apr 2023 13:42:52 -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 S240322AbjDFUmM (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=20S=C3=A1?= , Marius Zachmann , Wilken Gottwalt , =?UTF-8?q?Pali=20Roh=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=20Ignacio=20Aramend=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 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 --- 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), -- 2.34.1