From patchwork Thu Apr 6 20:29:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204126 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01175C77B6E for ; Thu, 6 Apr 2023 20:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbjDFUbV (ORCPT ); Thu, 6 Apr 2023 16:31:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239126AbjDFUbT (ORCPT ); Thu, 6 Apr 2023 16:31:19 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 872664C17 for ; Thu, 6 Apr 2023 13:31:18 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id by26so4204683ejb.2 for ; Thu, 06 Apr 2023 13:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x9bgnek9zezufpOznehWFLiWuMLFq160OkF04+hDtVg=; b=DZfMCSkFDtwL+wAEAOKEF+BPBEglCteY7eu0A7PJt5poTWiie0elX86FUoHC5OJnvc 0DL/nGAPVOgm6baRgrhCFq6jgYRI/2cB41wdsA6bBU08/MkHWV713HiBkFjWUbIYRmqt Y9D5DowgtmzQpMUSB8kMwEWbA5M3GXqSewttjoUxxCTvXcxpisDEj+Get88uthGaPpNs aJthp7GoxksoRBFzlufpXAS5fWujiHLWSvZiBUS0jMH+4g9I2Kh75sZ1JK/kb4EYmxis zWZOxmmq88z2MA6iD3o+1ooOpBjC9Y/+5I6E6WBj/AzsvYHMcgX3lnDVe0Pc0Mle3rYl m3/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x9bgnek9zezufpOznehWFLiWuMLFq160OkF04+hDtVg=; b=dtb5tS1owcoBVuREApjDymSgONo7f2CpGmwfTMA0esB3K9F9b1kIYJOWNBbpfeEbG8 Pi1ftOPYqqniTDe3NaToB5ttVNRo4VFXyQR4K7+B0yWFZw6sj8g563wh1PvqWZkcpnPk Yn8cIRPTCAXIE6vncVrQjfGdor8NJCwBvd6GVIF3nM0e55pbzg+wh38ah4x/aUdS3umL 1c4z23uZomSIF9gqUhp56lKCNPQEAi0FP6yhyXpK6gq/BJ7ihpLzP9ioD+DA1Z9s/5vs YM5yr2zeHuzFjYfcKRxKw+TtO1zp1gUg9tpde1E9CKNXkPNnC8oEDRUOqcJN4JIPDkIh zXrQ== X-Gm-Message-State: AAQBX9cxP1Yp17lFK0GNfPeIu98B4hwz1jUsqokHoYPOAJmxrhX2e56E kq6deEKD0IsQWICwaBt0zG2KWA== X-Google-Smtp-Source: AKy350athCTWJFwC9QStRqEB2SQ3i+g9X8jbV7cHjYrcV3kkQoUpiKKCxIeF/qvj91z2Kg99e7wcSw== X-Received: by 2002:a17:906:892:b0:92f:495b:bc7c with SMTP id n18-20020a170906089200b0092f495bbc7cmr6268101eje.23.1680813077135; Thu, 06 Apr 2023 13:31:17 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:16 -0700 (PDT) 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 , Luka Perkov , 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 01/68] hwmon: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:29:56 +0200 Message-Id: <20230406203103.3011503-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org HWmon core receives an array of pointers to hwmon_channel_info and it does not modify it, thus it can be array of const pointers for safety. This allows drivers to make them also const. Signed-off-by: Krzysztof Kozlowski --- Documentation/hwmon/hwmon-kernel-api.rst | 6 +++--- drivers/accel/habanalabs/common/hwmon.c | 2 +- drivers/hwmon/hwmon.c | 4 ++-- include/linux/hwmon.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/hwmon/hwmon-kernel-api.rst b/Documentation/hwmon/hwmon-kernel-api.rst index dbd68d7b033a..c2d1e0299d8d 100644 --- a/Documentation/hwmon/hwmon-kernel-api.rst +++ b/Documentation/hwmon/hwmon-kernel-api.rst @@ -107,7 +107,7 @@ The hwmon_chip_info structure looks as follows:: struct hwmon_chip_info { const struct hwmon_ops *ops; - const struct hwmon_channel_info **info; + const struct hwmon_channel_info * const *info; }; It contains the following fields: @@ -203,7 +203,7 @@ register (HWMON_T_MAX) as well as a maximum temperature hysteresis register .config = lm75_temp_config, }; - static const struct hwmon_channel_info *lm75_info[] = { + static const struct hwmon_channel_info * const lm75_info[] = { &lm75_chip, &lm75_temp, NULL @@ -212,7 +212,7 @@ register (HWMON_T_MAX) as well as a maximum temperature hysteresis register The HWMON_CHANNEL_INFO() macro can and should be used when possible. With this macro, the above example can be simplified to - static const struct hwmon_channel_info *lm75_info[] = { + static const struct hwmon_channel_info * const lm75_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, diff --git a/drivers/accel/habanalabs/common/hwmon.c b/drivers/accel/habanalabs/common/hwmon.c index 55eb0203817f..8598056216e7 100644 --- a/drivers/accel/habanalabs/common/hwmon.c +++ b/drivers/accel/habanalabs/common/hwmon.c @@ -914,7 +914,7 @@ void hl_hwmon_fini(struct hl_device *hdev) void hl_hwmon_release_resources(struct hl_device *hdev) { - const struct hwmon_channel_info **channel_info_arr; + const struct hwmon_channel_info * const *channel_info_arr; int i = 0; if (!hdev->hl_chip_info->info) diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index dc2e3646f943..573b83b6c08c 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -173,7 +173,7 @@ static int hwmon_thermal_set_trips(struct thermal_zone_device *tz, int low, int struct hwmon_thermal_data *tdata = thermal_zone_device_priv(tz); struct hwmon_device *hwdev = to_hwmon_device(tdata->dev); const struct hwmon_chip_info *chip = hwdev->chip; - const struct hwmon_channel_info **info = chip->info; + const struct hwmon_channel_info * const *info = chip->info; unsigned int i; int err; @@ -252,7 +252,7 @@ static int hwmon_thermal_register_sensors(struct device *dev) { struct hwmon_device *hwdev = to_hwmon_device(dev); const struct hwmon_chip_info *chip = hwdev->chip; - const struct hwmon_channel_info **info = chip->info; + const struct hwmon_channel_info * const *info = chip->info; void *drvdata = dev_get_drvdata(dev); int i; diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h index c1b62384b6ee..492dd27a5dd8 100644 --- a/include/linux/hwmon.h +++ b/include/linux/hwmon.h @@ -430,7 +430,7 @@ struct hwmon_channel_info { */ struct hwmon_chip_info { const struct hwmon_ops *ops; - const struct hwmon_channel_info **info; + const struct hwmon_channel_info * const *info; }; /* hwmon_device_register() is deprecated */ From patchwork Thu Apr 6 20:29:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14C4BC7618D for ; Thu, 6 Apr 2023 20:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239150AbjDFUbZ (ORCPT ); Thu, 6 Apr 2023 16:31:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239126AbjDFUbV (ORCPT ); Thu, 6 Apr 2023 16:31:21 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D904C3C for ; Thu, 6 Apr 2023 13:31:20 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id by26so4204873ejb.2 for ; Thu, 06 Apr 2023 13:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813079; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2sIWqsMomKx2PnPBWMVAcd7l87EB+JZ4zJtWBb4tmtA=; b=QiBjZo+smpaLDZPnZQ79Z/dEAr4MqaFcZVqqqialTjCXWVvpLK1kIifHK2HcJ4B3N7 +VLEpX1SSwbzuzq6H3Rf+w5o/msSwZvE0mw+kJbt6rQTkz623WyZ1ca+vUy0UrEPwrop WaIxfowNxoYjnRYmFKtXGuhqHnASBsfU6CZV0Igr7sejZ92V+4V4QYLKQrMWtrRDlQOP lzm5MdIqkJDNdy9ppfSFbNTHyIhXQShGgadcfbODs49sL8uEem8nYlKfIjzTE5c7s9de db0FX8r1RpncYzo+w0IY734Uzhvi4pjTjVhTXqamE6hsP6uGZhyEkVVtGdWZci1BVJrv 1bhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813079; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2sIWqsMomKx2PnPBWMVAcd7l87EB+JZ4zJtWBb4tmtA=; b=FiwUP2JgwIIXu4T23q1IYc95I09/bUdqk8TN5LfgftSy4J1Y7O3Zsys7ZEfqMOngHQ Znnf58HsKt34Y6Xj7HMYCBYsoIy/vdU7AHfQWyb22q+LwhPv9VQBGTZkszIqeBW0Cbt+ jo7vpw0XTanHhGtArLMh/KgwVhfwUtSZslpkTOW0Y/mN+ddgZSdq/TBOX3bDX92x3F+T d1/hPKHNZXOW+Mwe93gTIN7p4NWzw1kB2NYDC6L5FvvfmHHk4fClmmOWJvIJZhlf4Mei 5upGvKqFS8VI0cerHPxyi0clFLBFf18PMjXkb2EhLf1ejFbdtRAIQD2cVm0OyEnnUvBA npVg== X-Gm-Message-State: AAQBX9cmxMm/QV1dl5/7s89sicJocDGlNEx+5mtLQo/tRWRKbox2I9ZC +S9BhuBsaAyAQMi1ysTegBFLGQ== X-Google-Smtp-Source: AKy350ZBPO6m6MZm+LGsb3QXB/VIdy6OyRxsTcyuYHJsvXj1X/J1jphOn0rvZiVk7Bg1a2y8pNsePQ== X-Received: by 2002:a17:906:bc4b:b0:947:55ad:dd00 with SMTP id s11-20020a170906bc4b00b0094755addd00mr147468ejv.26.1680813079290; Thu, 06 Apr 2023 13:31:19 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:18 -0700 (PDT) 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 , Luka Perkov , 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 02/68] hwmon: adm1177: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:29:57 +0200 Message-Id: <20230406203103.3011503-3-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/adm1177.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adm1177.c b/drivers/hwmon/adm1177.c index be17a26a84f1..bfe070a1b501 100644 --- a/drivers/hwmon/adm1177.c +++ b/drivers/hwmon/adm1177.c @@ -168,7 +168,7 @@ static umode_t adm1177_is_visible(const void *data, return 0; } -static const struct hwmon_channel_info *adm1177_info[] = { +static const struct hwmon_channel_info * const adm1177_info[] = { HWMON_CHANNEL_INFO(curr, HWMON_C_INPUT | HWMON_C_MAX_ALARM), HWMON_CHANNEL_INFO(in, From patchwork Thu Apr 6 20:29:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 484CFC77B6F for ; Thu, 6 Apr 2023 20:31:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239281AbjDFUb0 (ORCPT ); Thu, 6 Apr 2023 16:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239330AbjDFUbY (ORCPT ); Thu, 6 Apr 2023 16:31:24 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C7359039 for ; Thu, 6 Apr 2023 13:31:23 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id 18so4213069ejo.13 for ; Thu, 06 Apr 2023 13:31:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u57ez0Oyy7vwUrJo3VoPbCM/KJTEPduqRqpuIH43A8o=; b=XHG3nqXF82IDj/3hwckhgZbxN+s5RQDFGpsCor/HLk3As++7RNt43UfpgKicmj2Pt6 dFK2ZtMP2KTqTUWzZ4yNuDAd1vZUxX+uWHJ2wvtGtN7iMGoLzfUVOGsRWAHwSVLgsSf6 ws9RfsZqp6p/BmDu4OoasALISMjpbdtgWu/gu+J93Rx63H2XILuMT/S9hNdq/buQToi/ tfQnikwdFNGNhuumYNLioCjMiSkSCIdIQn7Z5MpGT/df00vEANoC4da6Ct7JGjTUHbJx LjbF0DR7f7G34dGDo36wbdi/NB5XH3sYo6tzrV7KvjtHuSimTWV3HUpEBXfIddKCz2lz pVow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u57ez0Oyy7vwUrJo3VoPbCM/KJTEPduqRqpuIH43A8o=; b=ZUclcRfSlDy0oi10pj7xKAQLSU1ZMkw/t4xB651/13u6wAIMWBIfGQhdcuMM5wx+s5 CXSveIllseRsYgh/Vt64+pZOFDtUjHseShWFw67nxoUbKbcfQ00CaYv+Jb9p0VZn4w18 sInPeqe8+YtPO6tALkiagOiBb7ECa5nCzEhrFatKSngIkDM1BDMEQ8h2T4zct6xJA7Ny q2ZdXHJ4Vo/1wW+aUdroMTB+voaqRXKqVNHR+sBgEkB3Pjyw3PmVlvkekBFe4HlogvJn mKXK08p87twjGqJ9esCwR9dgrqSTXweckxIb4XPtqconcruYAHhrbCnCRhPKUeOXW5ow pnlg== X-Gm-Message-State: AAQBX9fR0ahxHfWMsWIHSVZb3UTPrG6cq1aNjvChd/ZIWhVzMUbttig9 cvUrtkGe2IgohDl1VWdmiP9GOw== X-Google-Smtp-Source: AKy350Z6TMKljX6n+0Qj1JlrHMEQEsGP1keeSKPgK3j8/l06MtFFNYR9NxLb8ZpxGjngzuF7RkQkiA== X-Received: by 2002:a17:906:4f8d:b0:92b:e3f0:275f with SMTP id o13-20020a1709064f8d00b0092be3f0275fmr125741eju.40.1680813081529; Thu, 06 Apr 2023 13:31:21 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:21 -0700 (PDT) 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 , Luka Perkov , 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 03/68] hwmon: adm9240: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:29:58 +0200 Message-Id: <20230406203103.3011503-4-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/adm9240.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c index 40e3558d3709..9eb973a38e4b 100644 --- a/drivers/hwmon/adm9240.c +++ b/drivers/hwmon/adm9240.c @@ -731,7 +731,7 @@ static const struct hwmon_ops adm9240_hwmon_ops = { .write = adm9240_write, }; -static const struct hwmon_channel_info *adm9240_info[] = { +static const struct hwmon_channel_info * const adm9240_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_ALARMS), HWMON_CHANNEL_INFO(intrusion, HWMON_INTRUSION_ALARM), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:29:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C98B0C77B6C for ; Thu, 6 Apr 2023 20:31:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239376AbjDFUba (ORCPT ); Thu, 6 Apr 2023 16:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239362AbjDFUb0 (ORCPT ); Thu, 6 Apr 2023 16:31:26 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CF1A7AB9 for ; Thu, 6 Apr 2023 13:31:25 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id qb20so4214614ejc.6 for ; Thu, 06 Apr 2023 13:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZhucnMOCApJwyrEh0T24y6L+m2gTCLyybnOQH+V/c/k=; b=wR3fRjCMK/Nm+NAs+aDoFi7bFJLAXJVC0YhPYyMuXkwOH+qdJya105MiUcrEOikccV FVkPPvG6mUjTiHcIlHV75IUE5gJWrgDY0hbYWWKiMGmNXcYckF9EnYbQKwR4jbZfbek3 LU+rW5vOUk7e3ZZ9lmuxXOefPUUJSUCS6k4p57xS/W1px/gDTtey0wdkbWlYGpxjTE+T mX3GkCd0mjn+wchxzZ5/p7KFlVuaRQw/Sr4oDcGgrdFdGHS3A00MxhfCdL/IBX58FUs9 MwPBHFIzs3OkVCg1pD+EmY/8xq9fqilatA2IexETzAWTPRcholu1HSkndQEEoSf+DWpC rVlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZhucnMOCApJwyrEh0T24y6L+m2gTCLyybnOQH+V/c/k=; b=nCs1yEiqLnh5qrD4yt1HhkIeDajsfSgxhjmupmr/DIlr9JRLdAHWWxmzfMizkwR4Uo fewM6uoQigNY+qY/HLXvZuA0ddvE/EQVClwvAE54qmty/zN7Q4WEuGKy7ODhM6nczT8j 6d1sUBt1VkYjZwIKh7Bt0Q067F0xYeOvNK/sMrWOssZhru4OUnw9eBuylUvsWCdQ+Z5T ajtZDVr87ofbRcScuJB/ZmjKzOi4vE0R0hnyXoZxZX+hJbl2UC3VwYD8AB8OPyy8qrDp ADRoOorZA3CqBwD823HoCVZTmCciS63VR1olsPeao9I6qa7Msw/fY20D5AEf9aO7gbKC W0rg== X-Gm-Message-State: AAQBX9ee5UKdlxaa/YXLLbe9YIzie772+G90S0qEnNJVjdmZ1R4HgGWY 5gd1aGH2z5NCP45S61YGugiJdg== X-Google-Smtp-Source: AKy350Yfxe/TgPhGqHpSDsSER21k9DB/mHDHNa/1jjakwf+HEnuaeB3XQN5e29ccpPoI4DLjOEB7DA== X-Received: by 2002:a17:907:76e8:b0:92f:efdc:610e with SMTP id kg8-20020a17090776e800b0092fefdc610emr102574ejc.66.1680813083809; Thu, 06 Apr 2023 13:31:23 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:23 -0700 (PDT) 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 , Luka Perkov , 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 04/68] hwmon: adt7411: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:29:59 +0200 Message-Id: <20230406203103.3011503-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/adt7411.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c index bf5c5618f8d0..6ba84921614f 100644 --- a/drivers/hwmon/adt7411.c +++ b/drivers/hwmon/adt7411.c @@ -636,7 +636,7 @@ static int adt7411_init_device(struct adt7411_data *data) return i2c_smbus_write_byte_data(data->client, ADT7411_REG_CFG1, val); } -static const struct hwmon_channel_info *adt7411_info[] = { +static const struct hwmon_channel_info * const adt7411_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX | HWMON_I_ALARM, HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX | HWMON_I_ALARM, From patchwork Thu Apr 6 20:30:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93861C7618D for ; Thu, 6 Apr 2023 20:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239435AbjDFUbi (ORCPT ); Thu, 6 Apr 2023 16:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239432AbjDFUbc (ORCPT ); Thu, 6 Apr 2023 16:31:32 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D34FFA5DA for ; Thu, 6 Apr 2023 13:31:27 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id cw23so4214458ejb.12 for ; Thu, 06 Apr 2023 13:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813086; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A0S7oRwHDmE/v1QzsyFUnvANXxR4q9mBgaxgNL4iOGw=; b=dSxWdns0zP2JtxETHi+2i1PXtp1GhQ++8Uh+/BzvVOX/h40Wie8Jn5vp75LFTFpHNY S/tT3An3a34mVKPyZE7LwjH24KSiJ5MANXMqiMQO9OvoJCYNYV8xE/gmaT0QiIpYfZ08 6VRP7Wa+KHMRdAZvx80i2qebnP12as1I2Zh/+uErn6lZUOj3J1NF5cUDGuEVTvtVgbX7 nXm1KH6swfdIG0ZN9BP0rik1nN/vgw+QK+XZuEltNP/LtufMw+relNzHZBwVNaoJjTd/ BCGIsdJFmtTDzBjYsgn6JMfoSwyuPpTj5kPo/LAL6nxCZXHOr+L8abF9DW0rNYuuxxl/ BhEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813086; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A0S7oRwHDmE/v1QzsyFUnvANXxR4q9mBgaxgNL4iOGw=; b=nH2aLANSZy6HyBNsmtysE17OR0lv5F7SHVY3aPhRMBOM0FWxaG6eNGRNvQWTTgvppB Z2WnwxlJoOhagaEmGx+jJGIT+5w4eDUlh34VEcxNC4/2CXhJf691Ql4rOOOMtDskqpUo GUONmsFpSyfK+03lzQABIIqlw+AO+cx35RXhPOdL/K/K44ItR7msx9imnwVbTKonPPh5 z43mbtTK/2R1WDKz9QHSY3S1bvagEn6ENRUR6jPxvj8tVsqkApiiVC6RszV3T7b6f5Gi UHuKtgYqcGTdvCqtu8DBgFbk98Ye8mzYW6Rdk5Wk9lkZiqwGP4tAYQY2DUtc626n+Zs3 o4HA== X-Gm-Message-State: AAQBX9cz87oyFoXN5yLk2opXt5nV0ENhi5+HmfQMYpHC9E1xvA7le1/x nr7RJcGR638oWIwMgsVpM4CmdA== X-Google-Smtp-Source: AKy350bea6rokcTyW2fB9+1WRlsLOQlE4zkFbEjh43ieE0cxbpyAZRFvYoquw85XKtp/c76b0gKEOA== X-Received: by 2002:a17:906:844f:b0:877:8a55:2a26 with SMTP id e15-20020a170906844f00b008778a552a26mr129746ejy.60.1680813086034; Thu, 06 Apr 2023 13:31:26 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:25 -0700 (PDT) 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 , Luka Perkov , 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 05/68] hwmon: adt7470: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:00 +0200 Message-Id: <20230406203103.3011503-6-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/adt7470.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 927f8df05b7c..64f801b859ff 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c @@ -1187,7 +1187,7 @@ static const struct hwmon_ops adt7470_hwmon_ops = { .write = adt7470_write, }; -static const struct hwmon_channel_info *adt7470_info[] = { +static const struct hwmon_channel_info * const adt7470_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX | HWMON_T_ALARM, HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX | HWMON_T_ALARM, From patchwork Thu Apr 6 20:30:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 606E0C77B6F for ; Thu, 6 Apr 2023 20:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239578AbjDFUbr (ORCPT ); Thu, 6 Apr 2023 16:31:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239384AbjDFUbf (ORCPT ); Thu, 6 Apr 2023 16:31:35 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D1AD9ED1 for ; Thu, 6 Apr 2023 13:31:30 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id g18so4211256ejj.5 for ; Thu, 06 Apr 2023 13:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813088; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q4v5eQ6uNtmwpFMgRe8EaIBJb4MZtfu8baTOThAbc48=; b=mZkZh2ihElAmXpc+gvjW4iyD3G81bS1xcX04W3p0yGmEl952kZ2/BbZgOSgXRno2bu LbMW/sOWeNFx7qYlS/RztN3Yy1WPTkHmt+hy8oQk1S3Baf38fEh//h6KtNqfzb2auHaf 2i6k50L8ETVq26xxcqZcWiy5dD+bCuG96xUCuMF2mbOmTareYO0GEtyq7RP0G9auMukK Mt4nPxyBGmLPCXYSVf0Ioa/IkDR/NGu3KeRuYr9Inc51Z+2zSfr/q4Btkp8buGWHEJYP aDtJcUQ5X6zyKD70mz49SiphGZhB6Fa6OYtNUhxYEHpjbeEsEj+X2oUdxGYXHSsiCZ8x 1dpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813088; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q4v5eQ6uNtmwpFMgRe8EaIBJb4MZtfu8baTOThAbc48=; b=NDBBHRuNVlRawOY+/kFvXsKLB4rvI1kgvqf4dUWTvThYYO1XOc2kwSExk4vY6Bm7SO 3nzCOiSFNU6WGNaLoS+hxoLhY2JB487HuqSDtGo4AvDT3Gvm7TIsQlXs/Z/HfZcdjKF9 Jf1sKFYwt2yeS6Ik9AC/pLXOnJjytBMQwHpFlnG1bGg10tCyRwSmXQDT4hIuhGQN6OfW 3kI9TlzWwbAKirWaIE+0dcwOdSgqlRGSEkBx85t2U6frPmRY5xLp6P3KMtKMgoI9tLav w9Pkch/pMehmL24/pNcLDmuMk0zYN41Nxrf7F1MYCAiS51iYPx4xHdRlVScgplTl11Oi CqcQ== X-Gm-Message-State: AAQBX9cWaLmMbz6ExJPbNWMJY+uEOSe2R1Xj043Z2FxkumUsMRlzWaiE 3bIRnk9lG6nfTweo3ELrZigVwA== X-Google-Smtp-Source: AKy350Yudjg1cQz744cj4XdN94KceoalOMB5GdOd9sJA+cB9OFNaDOxgIsWxQXir9sQGWZ45/o8++w== X-Received: by 2002:a17:906:2414:b0:931:42d2:a77f with SMTP id z20-20020a170906241400b0093142d2a77fmr221247eja.15.1680813088528; Thu, 06 Apr 2023 13:31:28 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:28 -0700 (PDT) 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 , Luka Perkov , 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 06/68] hwmon: adt7x10: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:01 +0200 Message-Id: <20230406203103.3011503-7-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/adt7x10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/adt7x10.c b/drivers/hwmon/adt7x10.c index da67734edafd..6701920de17f 100644 --- a/drivers/hwmon/adt7x10.c +++ b/drivers/hwmon/adt7x10.c @@ -309,7 +309,7 @@ static int adt7x10_write(struct device *dev, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *adt7x10_info[] = { +static const struct hwmon_channel_info * const adt7x10_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN | HWMON_T_CRIT | HWMON_T_MAX_HYST | HWMON_T_MIN_HYST | HWMON_T_CRIT_HYST | HWMON_T_MIN_ALARM | From patchwork Thu Apr 6 20:30:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC13DC77B71 for ; Thu, 6 Apr 2023 20:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239608AbjDFUbt (ORCPT ); Thu, 6 Apr 2023 16:31:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239332AbjDFUbi (ORCPT ); Thu, 6 Apr 2023 16:31:38 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821E193E0 for ; Thu, 6 Apr 2023 13:31:32 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id g18so4211449ejj.5 for ; Thu, 06 Apr 2023 13:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+jy4+y+10/TyiIFChl0T7AFfRzku+iJoGxMYDy55vI8=; b=C7UEqgo58Fo7L/uGfib9xvTeji1SyctI3Jt3RyaklkQkG9wMZXwJF2NFgRec6GE317 tiix2DR7NdtJhp8TfR0kZouIoGuWvMnAHvxXNvD+QB+k5T2KTkaF70wv7E/KLqljJSYf Zxra//4DMZ5HNVn0l49kbK1gazuq+P7VYSZUEvnYEzoE4d7HwmE9U02GGYeVEyCK7gqW nzp2vY/v3+mMuQPYzUr9x8mvVe9VcoQ2BsKW9YFfWbHmM4UMXrZJFc6epU1F2TLM/2/5 o6TUIheD8NQMPc0gJzGVAEIVBp2eo+Bk6lpbrKokM3Km5Qnnr50VnXyT3JLfLuzQowcI rcnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+jy4+y+10/TyiIFChl0T7AFfRzku+iJoGxMYDy55vI8=; b=IHxuIc2azHYQ3n59wmhnrxLFGPKcWOX54xLs4u2jyZWtydI0PysVOrUb78a42/wo29 l9XSP82AB8/KJor943dHCHi2oMy2Io3rB7b66llmJdKvvdSQN1T+WN7flNJL4uP3a+Pz aruFX6ruLJTbBu9QLgyTY3lVjP/NxzpuXq6/CEU+RudD991m4Je31ir8HX+FBcxPYhEI fIspGKZXKoidq1Ka1NHnDFMdCOCObFqRUcPDb3xdnw/1N9iXoHrLzY5Fx2Tye2Ikk4q0 erjhHidJVrYx/Brp5CS79G+9NlC4mGuRlKZeE1POFr7RNulQu6fvUYbaevdcuHvoptfW y3fw== X-Gm-Message-State: AAQBX9dBISqHNsNXDUOkA59gDdtte0AIEObwTdVDF1rIpGFGySyOfhso sjmgHK6IdaQYL6TPDT5gw8UMzg== X-Google-Smtp-Source: AKy350ZYtaPIIYNGhlp4siQb+NF5gQ8sPyVw9cUgfYpY29+pp7DNOklvjBe3njmFVQp13IcDEKr0mg== X-Received: by 2002:a17:906:844e:b0:921:da99:f39c with SMTP id e14-20020a170906844e00b00921da99f39cmr201230ejy.12.1680813090969; Thu, 06 Apr 2023 13:31:30 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:30 -0700 (PDT) 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 , Luka Perkov , 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 07/68] hwmon: aht10: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:02 +0200 Message-Id: <20230406203103.3011503-8-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/aht10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/aht10.c b/drivers/hwmon/aht10.c index 9babd69d54a3..b8fe3f7248ba 100644 --- a/drivers/hwmon/aht10.c +++ b/drivers/hwmon/aht10.c @@ -270,7 +270,7 @@ static int aht10_hwmon_write(struct device *dev, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *aht10_info[] = { +static const struct hwmon_channel_info * const aht10_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), HWMON_CHANNEL_INFO(humidity, HWMON_H_INPUT), From patchwork Thu Apr 6 20:30:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 179C0C76196 for ; Thu, 6 Apr 2023 20:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239651AbjDFUcA (ORCPT ); Thu, 6 Apr 2023 16:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239506AbjDFUbp (ORCPT ); Thu, 6 Apr 2023 16:31:45 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D85F7683 for ; Thu, 6 Apr 2023 13:31:35 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id jw24so4216051ejc.3 for ; Thu, 06 Apr 2023 13:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5OysLbRAf3FePlMQAvxi6ECtmAIY3wqal/J8BkLquJ4=; b=WAF8L0SzNrjHfnlyjmVp6od9k2EnBovOLiPR+pKqvJ7byni4G13TBQS3Safv+UA7xm 63g+Vjp5DECN1x4IqQ6BA2GuXw+v9oP9uAI4ht7dB6qHYzbSHGYoL8Usys29aYBaJds+ DXUwpkw8yoE8hqXIi5PaOSm8MuRCc1yYKjeXcXgmbc+c2GpFtIkrNv+ggfp0l9cVLEGk pxkxIG9EAgY4d0n5oktwaV4yIlPk+D4YKu9vWOncvI+amxpV92hSlGGHxl94tVpg+3ZK A3RtPXsssapZNNRuRkMneXWKhNDamsLBi7NCu3kE5nvvtkfqSA4H1lYScDAV8cfOJyCx lGCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5OysLbRAf3FePlMQAvxi6ECtmAIY3wqal/J8BkLquJ4=; b=O4Tb0QkypRsm1JbkeXitD7oZ5W1WrnrATLfOgVoV8s/hkchzJ5oPNag5t/iWuvYWic +cJ7yod4JyyaTThWo229gn/pVYYQQLepKRKbYDEodfc48KOePyaNJlew2omv6uJNOR54 ZZqUQNvX/kiM0fi6/8AzL7hDklrqJ/YrVvPTmjewScMZFdjLmpiDhrBEi3njvyk4tYYc dBJDbAB6IrktDipW+UrjYZtWi7Zs7BZunlY0cAqg3jEem2eU+W7ch8FRSuBQwiZ9n5wr mJm6HxKCCK5HLc8eJVWI1hvwYexCBshB1IVgAp3dxmis80xqTWKzQkPEtltLLFeBIcIN ivwA== X-Gm-Message-State: AAQBX9dHSs1uxenYZD6EapmBlNxZI5GnscifLsJRbxBtI2eAa2ArVvzi XGF4P5TprFjG3nUWEQyZ0ywlww== X-Google-Smtp-Source: AKy350ZG+kU5MGyTXsT6ZvJ+plxOSXcJkKLmeifDg92uAby6efORfna3F71Oh1L4yH5Ox9lEdI3V3g== X-Received: by 2002:a17:907:2c61:b0:931:32f5:1f31 with SMTP id ib1-20020a1709072c6100b0093132f51f31mr244641ejc.9.1680813093118; Thu, 06 Apr 2023 13:31:33 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:32 -0700 (PDT) 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 , Luka Perkov , 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 08/68] hwmon: aquacomputer: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:03 +0200 Message-Id: <20230406203103.3011503-9-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/aquacomputer_d5next.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index 17fad3142118..3bd35d833e69 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -1038,7 +1038,7 @@ static const struct hwmon_ops aqc_hwmon_ops = { .write = aqc_write }; -static const struct hwmon_channel_info *aqc_info[] = { +static const struct hwmon_channel_info * const aqc_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_OFFSET, From patchwork Thu Apr 6 20:30:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204134 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81200C77B6E for ; Thu, 6 Apr 2023 20:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239668AbjDFUcB (ORCPT ); Thu, 6 Apr 2023 16:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239523AbjDFUbp (ORCPT ); Thu, 6 Apr 2023 16:31:45 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 227CFB440 for ; Thu, 6 Apr 2023 13:31:35 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id cw23so4215108ejb.12 for ; Thu, 06 Apr 2023 13:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fstBy6yWcExH6RGLHLt2IS0s2Pvrh3Q8g8Pb+fMMd6I=; b=ZnhjZmqw++GXIV66u0SJMdSn0ABd8Ck+cMBwrxscy7ExiQKNxRSIZOVNB4YpQWAez4 gVgFqj2axWjpWbqV4pgxLNCcmmnCDnN9rQmgr9PuBIoyhbQMG+dkJWUnKn1Cz3AZkuNT Wx4/GxsKwjAAoDqjrHgh1r6VJ6MRdrZAs4wpmZl8IUlIUG2Rh8Q9JiuiGnr1Ieq0gOMy g38xMZio5/a7kNGhbYZxTjWu7GiVPX83+sYjr5XeuYPuvmPAY3++28MbL1Bs4UUj9ZGB 0M9AfZvvfLmaWCsHcuVMlmCSYu3BrmB/LXgBE6nZrzYkLuuGWSQD9y+UvrtXC6BVEifq 6GSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813095; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fstBy6yWcExH6RGLHLt2IS0s2Pvrh3Q8g8Pb+fMMd6I=; b=iwJrKTuK08dsyexn/JriREyQM6tsSFNy0uhZAajFE72x5F9YyN6h148veTQewVuiJ/ /5x7Titx09/wI90XYBXtmOrUDCIWoQ24ImihjC1dm4Hl9fTi8BkKmgztNNQsiH3hHelE oxKbsiOTN5qySBxmyF/ntYkZhBOrczNX9NE6yR7LFpojABMpRIr38lLAQbzS0bQfbbzi cMIkbobuGG2oDK4nuMzq4rsm5nP1oOG+sB2GPW7q5CGm1eB1IVqWvj66XfbVsL7rOvfB a1FtfK8IgZIpQK65c33XAHwdu4z1MHtgsTKm3uJJBcUSaWPnSnWVxVilTqM2Xy0cK5Y6 FWJQ== X-Gm-Message-State: AAQBX9c0+t9nFBDaS7q+Vzxvq3B0w3izKgN+ApHCRsIEHY1KOE8aY2Ld IRH/WJJxNzx386xbPEMnysEBrw== X-Google-Smtp-Source: AKy350a+NU0k+SMmkfaOKPj/I9Wth66NJKumih3jnB2M3CUI7kwp2CZYW1SslvpEMjt+glLhGWcj2w== X-Received: by 2002:a17:906:f9ce:b0:93e:24f6:d7a3 with SMTP id lj14-20020a170906f9ce00b0093e24f6d7a3mr258509ejb.8.1680813095377; Thu, 06 Apr 2023 13:31:35 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:34 -0700 (PDT) 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 , Luka Perkov , 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 09/68] hwmon: as370: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:04 +0200 Message-Id: <20230406203103.3011503-10-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/as370-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/as370-hwmon.c b/drivers/hwmon/as370-hwmon.c index 63b5b2d6e593..fffbf385a57f 100644 --- a/drivers/hwmon/as370-hwmon.c +++ b/drivers/hwmon/as370-hwmon.c @@ -76,7 +76,7 @@ as370_hwmon_is_visible(const void *data, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *as370_hwmon_info[] = { +static const struct hwmon_channel_info * const as370_hwmon_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), NULL }; From patchwork Thu Apr 6 20:30:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D56FAC77B6F for ; Thu, 6 Apr 2023 20:32:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239472AbjDFUcI (ORCPT ); Thu, 6 Apr 2023 16:32:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239384AbjDFUbr (ORCPT ); Thu, 6 Apr 2023 16:31:47 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52719EDE for ; Thu, 6 Apr 2023 13:31:38 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id qb20so4215711ejc.6 for ; Thu, 06 Apr 2023 13:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0o/5+RoY1xsbRUDa2AFV0+g4brx+liGdLo6ECyosb9g=; b=e1j2ok3u7VKsR1y6roskcfNxp1+JClKqjk7Csr46nCNqwp+tvujjHQEMIxbTKklgfQ xf1Q+6FoEZZaW0f3QmwUdOlf+txDQNXpyppc7ZPBeyq5F1sEugpq0ioWRrBR/9emC3Qk P0pPSi2jA6Yb5MC3ihtndLjnK427/fl1CpixkdRPS4uuZOXTnJPNT0vYQsShb2NttnKy Qmjsx9Q8X3FnKjQ8PnDQ89IjAC2xYBdayz5zCxdwn3liVhMBr+51fP3qqFdOT03SWUOo jIiHY08xSbx2ArReXkFEzh9RIvmLh3EpyMkqjCofJl85Ziun01chGFqxDu6nxJfbJXsB YXfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0o/5+RoY1xsbRUDa2AFV0+g4brx+liGdLo6ECyosb9g=; b=u57Hh6W3KgqlwahB01op+IWZXaoqoL85bT4npUyaEW1cZDRg9syEnD8yb70C/FtcsW 7f5xXYkeBpGH3VHVoG8yq5ERu4d5y0VY9WaLFH5yVqyym7mU6EsY9CGIc3a5p+zVGKXr 3vOnOvIhD8F1frkewJifBMqr0vNbYZAtCZM5y9kmLOJ/FXW2IzRYq2x2RBEDjLoY7Hf2 1mCyU0cFlhwqCvyasNcuXUOYy36d7QkI/FtLqOjtTBeURERrozrZKLMnqPGmq24fN2is pveIWGal9ktICJnyvjamHN0rdFLp0HJaeFB6rgJKnZrXzXBZm1W4s3/S8+YKD9q+W2TS 44gQ== X-Gm-Message-State: AAQBX9fe2ZVfrMvEeVKI7wIbfoWCcnU3uSUt/X2wPvxG5evrM7pn3S/4 oUpd+f6uTByIgNS3smOclbVfkg== X-Google-Smtp-Source: AKy350an67ONjArurlKU83f3QFsUI86J4oBoCp0dWaiAvD+CmcW+xp7O+S3fVmQkXomQA9I3TeWW/w== X-Received: by 2002:a17:906:924f:b0:884:9217:4536 with SMTP id c15-20020a170906924f00b0088492174536mr73325ejx.64.1680813097470; Thu, 06 Apr 2023 13:31:37 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:37 -0700 (PDT) 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 , Luka Perkov , 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 10/68] hwmon: axi-fan: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:05 +0200 Message-Id: <20230406203103.3011503-11-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/axi-fan-control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c index 6724e0dd3088..5fd136baf1cd 100644 --- a/drivers/hwmon/axi-fan-control.c +++ b/drivers/hwmon/axi-fan-control.c @@ -394,7 +394,7 @@ static int axi_fan_control_init(struct axi_fan_control_data *ctl, return ret; } -static const struct hwmon_channel_info *axi_fan_control_info[] = { +static const struct hwmon_channel_info * const axi_fan_control_info[] = { HWMON_CHANNEL_INFO(pwm, HWMON_PWM_INPUT), HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_FAULT | HWMON_F_LABEL), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL), From patchwork Thu Apr 6 20:30:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204136 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DFF7C7618D for ; Thu, 6 Apr 2023 20:32:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239611AbjDFUcT (ORCPT ); Thu, 6 Apr 2023 16:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239490AbjDFUb5 (ORCPT ); Thu, 6 Apr 2023 16:31:57 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 360338A7D for ; Thu, 6 Apr 2023 13:31:41 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id sg7so4211428ejc.9 for ; Thu, 06 Apr 2023 13:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MMh9pMv1c2N5CZKj6o4hVDzOl36SVdvTrKYi4l5Ys4M=; b=bpvK+tpA6trKtvJrV4DZCtbwNaI1kDImEVeVQL637eqQHty8z4Qq9fSRbGNcHRWRG/ FPMf9aY2qxiCS6r+3ssc+K9dV71SFj0TYCnZ2GHj5F16M/z752xuBwB8YxPNXqAuuARn TZrkjmRJ/rQCutKuBNz2TU/i/xu064lmxWLYCKcWS54oyvpm2JboWOLAXeyI8hy8SoVK pjZ3tPar2gZ6Gfrpr+nUYGX2MDmRbgg2z/AKPjwETZd3VjfaMa47TfTd9QpVeKAgh4c7 D91heJ9XLjTA52/d2UQYgc+iTqtGkcUYCtjf6kKM9ouXIhYev1rb5rlvfNp/wprEAqHK ip/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813100; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MMh9pMv1c2N5CZKj6o4hVDzOl36SVdvTrKYi4l5Ys4M=; b=qgFxB2XryK6BFGuGQULtIVAdQ4EPFjJezJnBq49fVVF4uUD3pD6gDJ3U93RDT3hz2Q KiKSnfW8QOuOMRTzC7xQgDaRZxDdsJzqr6r7jwp/rG0+UY5BRW8sBYtD+qPt2fahsobX SfmQs0uTQJHIE+B4Ob49CXd/d/lgVFPp29g6X5dbF/UDSl2ivQIPGZRB79m4Ssh52iWG rzMsHSe1B3GWtdaZ6ShWK0a/cwcAyMWAZ7zTb46cJDsPTu2AOvVaS1Pi9hxOxZHRsbtJ iIK9IW/EL4k+nido9o+nDJowL5YCMo+7hO6suKqUbUNuZD2pU0CN5S7J39j/nNeqWA7r ArMA== X-Gm-Message-State: AAQBX9eOf08fr9LEEfeWIDBhVb6YvRWxrBnWU2cdTaJv2g6ElF/jc23E QToLmAib9bQzdFnWC2c16pa8dQ== X-Google-Smtp-Source: AKy350Yud0CdyQeRWD/f32T/icmKifXpYmvMz9y9aU59vYOZT5+tyTqiYLMimp0uRkG+9Xvbh1C6OQ== X-Received: by 2002:a17:906:24d7:b0:932:2874:cc5 with SMTP id f23-20020a17090624d700b0093228740cc5mr235929ejb.16.1680813099901; Thu, 06 Apr 2023 13:31:39 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:39 -0700 (PDT) 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 , Luka Perkov , 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 11/68] hwmon: bt1-pvt: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:06 +0200 Message-Id: <20230406203103.3011503-12-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/bt1-pvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/bt1-pvt.c b/drivers/hwmon/bt1-pvt.c index 21ab172774ec..8d402a627306 100644 --- a/drivers/hwmon/bt1-pvt.c +++ b/drivers/hwmon/bt1-pvt.c @@ -379,7 +379,7 @@ static int pvt_read_alarm(struct pvt_hwmon *pvt, enum pvt_sensor_type type, return 0; } -static const struct hwmon_channel_info *pvt_channel_info[] = { +static const struct hwmon_channel_info * const pvt_channel_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, @@ -523,7 +523,7 @@ static int pvt_read_alarm(struct pvt_hwmon *pvt, enum pvt_sensor_type type, return -EOPNOTSUPP; } -static const struct hwmon_channel_info *pvt_channel_info[] = { +static const struct hwmon_channel_info * const pvt_channel_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67586C77B6F for ; Thu, 6 Apr 2023 20:32:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239649AbjDFUcW (ORCPT ); Thu, 6 Apr 2023 16:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239505AbjDFUb7 (ORCPT ); Thu, 6 Apr 2023 16:31:59 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50495B74C for ; Thu, 6 Apr 2023 13:31:43 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id l15so4218124ejq.10 for ; Thu, 06 Apr 2023 13:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q738x7YwOS0X3XmE9hZfN9Ce15/MYjfZeq6pSQ5ilpI=; b=zy7BsgELujF2TPKCiJuSaYGU32HQ47Wnx8gile3JZ+/AgQXY8WdeOW4obbFD1dAIRj uvJw+TfNSxls3c5pR8LDLmgLowzfPQsPuBV/CW056h9mYKnjpTUtCfltSV71rmQHN/z2 /eyqN6fAe25ulQsOOcjeqVFUCuoARqhTmXUuHld3T29X0n09hsvJMgBzTEIMKTFW2km9 /IXj7PDEAjhd4WAMeo8Fxh+szfqGiQOS0CXJTWgk4wpQ1uexo3u3NO41aKEWdOdVtnBL WqCMfNpldHDYZIWn27eqxOPcANqyCMYrQ5IKv4Si6qKXHV4X+Qh5rGVvEYsb/EPDUFMh Hq1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q738x7YwOS0X3XmE9hZfN9Ce15/MYjfZeq6pSQ5ilpI=; b=KUqHAYj+kQeQDmGXhMEVXvktIREtW0Q0ezU5UKkhGZMUXXAjbgdzgenlaUfGWHQn2a PWBnNM110gkJxssEe74KnmMlBL9QqkuQDkZJ/xUTX+v/vJULku8DyWBudZw30hV1ZcAR 17iAd+UUdA3cMGWzKB2qvNVOSiswchRmEkhvVRUuQZ8ffoCd3CuWjVLXMYJQqaohz4s6 wKzAX1SxNT958CN0UVz+/ZYuhDLR29O3krv3n9xMJS57df8k/FuYxxTHPId0z85wcnqL KLa/+9IaVu7PIpDku13lbvL5GPjTe55vjLpB2Giq+uj1LEWkoSwjpPgUsDbzfyyRxS8A qLBA== X-Gm-Message-State: AAQBX9eJf+D4aNd+4MMj+13/+Q9+SnNocAkxFXadT8MKaLzcRbNwh+wm GTBNpjbvCjWP8aLWbsFe0BCOEA== X-Google-Smtp-Source: AKy350YG+aKLeJk+41CCwPZ32gqUjvwfzA9HY7Ve4lEg7WnoUkQNi0XJVnjTSA7FZiCwflxqK0bw0w== X-Received: by 2002:a17:907:6ea6:b0:8f0:143d:ee34 with SMTP id sh38-20020a1709076ea600b008f0143dee34mr7334618ejc.1.1680813102050; Thu, 06 Apr 2023 13:31:42 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:41 -0700 (PDT) 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 , Luka Perkov , 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 12/68] hwmon: corsair: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:07 +0200 Message-Id: <20230406203103.3011503-13-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/corsair-cpro.c | 2 +- drivers/hwmon/corsair-psu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/corsair-cpro.c b/drivers/hwmon/corsair-cpro.c index fa6aa4fc8b52..463ab4296ede 100644 --- a/drivers/hwmon/corsair-cpro.c +++ b/drivers/hwmon/corsair-cpro.c @@ -385,7 +385,7 @@ static const struct hwmon_ops ccp_hwmon_ops = { .write = ccp_write, }; -static const struct hwmon_channel_info *ccp_info[] = { +static const struct hwmon_channel_info * const ccp_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, diff --git a/drivers/hwmon/corsair-psu.c b/drivers/hwmon/corsair-psu.c index 2210aa62e3d0..dc24c566d08b 100644 --- a/drivers/hwmon/corsair-psu.c +++ b/drivers/hwmon/corsair-psu.c @@ -571,7 +571,7 @@ static const struct hwmon_ops corsairpsu_hwmon_ops = { .read_string = corsairpsu_hwmon_ops_read_string, }; -static const struct hwmon_channel_info *corsairpsu_info[] = { +static const struct hwmon_channel_info * const corsairpsu_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57839C76196 for ; Thu, 6 Apr 2023 20:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239506AbjDFUcX (ORCPT ); Thu, 6 Apr 2023 16:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239513AbjDFUcA (ORCPT ); Thu, 6 Apr 2023 16:32:00 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081864C3C for ; Thu, 6 Apr 2023 13:31:44 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id qb20so4216326ejc.6 for ; Thu, 06 Apr 2023 13:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7ymHpZXssNqtDonOR2b4TMkX8XWnhpqpU7TZ/WfwdEo=; b=ZJsDhBuEnPU+XWsjRJuN9cu2H5d7cZRGkWPMvVrVibqBEt20qzWv2LIYXtXHwCOpG4 hdNNPRGP6dEHQUXFmMBY+mhG15TWKjdVfHVCFIwnK7DXsTA0xd73GTpMm01GkE6ih1CW a+/9/Etlv1Wj91vR1YQPpAj50OfT26vlQ46X84PlTmP/R7Zi7jp9ZNITIjEm8NV95/N2 LOgS39xpR+dgFnuFtr2sYBTHvSWskgfqgOQe5ux6zNS+nbfb7ogFAOjF/3eFODK755A9 DSBgFlMzJQ2HJgjfexIT/HhFUQFS8LZrmzjq6p9XDTl5G0tRjxwDakBmsoePD+gcMeDl wB8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7ymHpZXssNqtDonOR2b4TMkX8XWnhpqpU7TZ/WfwdEo=; b=LTWR2PuHJ/5bufXuy6xOLKYOnYpiW+Z5I/eihE2hRxupdpVwV+u1bU6SGdu4gPUk7R 7BYGCcSkksQcciS9JlgAmEFKJY69qXBFdsEpGEJgYgrPecL7UnfVfZgbSWCl73CC47a7 ecz7MkHRuheWqPP+hpGg0QMV9Pj/0mDWNj9tcoRD7lcxif5M1ynUzKnlyxPiaFVdCN+k NFsQUgul6/hql1GEed7BrjWOjb/0CSpR8sLm5SvyLn5rAqTUby3+MvuJFTyuF1v9iv2e r3EBgsu/DIEtQ1k9/3a0ryf+if09B763Xz11iRWpYzjce99Y9HVMFaPPwLxZ3X/9wErH tnug== X-Gm-Message-State: AAQBX9euyus6abZyUTG18KCjm19R9wzx/xW+AOQDXuG4FmUBh/PeWnS0 Uu/x5hEX006t8mVWyhmyWvPZ1g== X-Google-Smtp-Source: AKy350bucCri+8AHWtLb5wN33M8gUHT7vaZfhbXGtulRDaMMlZTYuwavPaD95Oj0MIEjw9jPUIYk/g== X-Received: by 2002:a17:906:442:b0:932:1af9:7386 with SMTP id e2-20020a170906044200b009321af97386mr135600eja.27.1680813104409; Thu, 06 Apr 2023 13:31:44 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:44 -0700 (PDT) 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 , Luka Perkov , 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 13/68] hwmon: dell-smm: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:08 +0200 Message-Id: <20230406203103.3011503-14-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/dell-smm-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 7ac778aedc68..44aaf9b9191d 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -920,7 +920,7 @@ static const struct hwmon_ops dell_smm_ops = { .write = dell_smm_write, }; -static const struct hwmon_channel_info *dell_smm_info[] = { +static const struct hwmon_channel_info * const dell_smm_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL, From patchwork Thu Apr 6 20:30:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43D41C77B6C for ; Thu, 6 Apr 2023 20:32:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239595AbjDFUck (ORCPT ); Thu, 6 Apr 2023 16:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239587AbjDFUcM (ORCPT ); Thu, 6 Apr 2023 16:32:12 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D8FF93E0 for ; Thu, 6 Apr 2023 13:31:48 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id l17so4225794ejp.8 for ; Thu, 06 Apr 2023 13:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8kO+PL2OFiPmkOUfRzx6T8b5f8KU+CAGl37StCrMXYs=; b=lYo5bC7iQfW8JnfvljadSqJdwd+jSfv9/x+oLITfhU9jsiq6GDzYZ1VDzUKfmv3LmW Ici63XQmaGqd8hcJaUwb+omhio2Z3bnDvX8bWMMMMDbil9f5gvNd8ufl2qUq9b59mA4A 5WagyI+jE8NPsww/pU2d3IJqVrejUStThru5Dfwv8oj40mBP1D6yZNx6nb19oowt21+n gQ68nf5/FjDx9z6b6VOfTVk7JUEt4YeyvrMTMA63d6c9OBXhmvVfqEWtSUJbEimAIe1d yy8dLmraQMmNdye7f7BtbBUyhFLKSN5PPrjuCjXeZFt8fZunMo3egoNDLE6yhLy/g4YM bwBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8kO+PL2OFiPmkOUfRzx6T8b5f8KU+CAGl37StCrMXYs=; b=xNJ7Awez6JHH5zzMn01iw/Bokh5VjRjh/eX1+pnsNVGWydNfrLS+8MMoT6PqV61Qc8 j3HYap0Zo+r+nySHAUi2+G1TsS0nwevU+aVUXuZBYR6ShK4Jhd7vB1Aj0bVJedoxTdVp hx/mZAye18zhaFGJBmK5Zc8tPt/wD+AVYGjaoX5lJpETr68CvBvTXaSJkb/bX3CAJg3r NnXfVF9NrooRGv1y0Cst6ktUPb9US2rlRpZdPe+nHQA+JgJCuqX825iRA+OC7tdus4xA g0+vliu3KeH1AT903hf0QjAxgH7MxVJrgacSv5ckCw7grrQH06ZSHqodwIzoqJ0Qf/PY 8Xmw== X-Gm-Message-State: AAQBX9eeLA9lEgt8fmZz/C0IXow5on9c2A/WJZQLT6TETOrMn8U6DV3W vcNZGzC0BtlH2EyaOB38fJuF+g== X-Google-Smtp-Source: AKy350YcLjLUUz1vvV2Oec0ITUhNxaSebo05M98PAAOHSS8hMv2/No8ivJPosNn6kB+9Ksg+aAx6JQ== X-Received: by 2002:a17:907:a702:b0:934:60b1:a4b7 with SMTP id vw2-20020a170907a70200b0093460b1a4b7mr93238ejc.51.1680813106993; Thu, 06 Apr 2023 13:31:46 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:46 -0700 (PDT) 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 , Luka Perkov , 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 14/68] hwmon: drivetemp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:09 +0200 Message-Id: <20230406203103.3011503-15-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/drivetemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c index 8e5759b42390..e73b7bfc6af3 100644 --- a/drivers/hwmon/drivetemp.c +++ b/drivers/hwmon/drivetemp.c @@ -526,7 +526,7 @@ static umode_t drivetemp_is_visible(const void *data, return 0; } -static const struct hwmon_channel_info *drivetemp_info[] = { +static const struct hwmon_channel_info * const drivetemp_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | From patchwork Thu Apr 6 20:30:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204140 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 629B8C77B6F for ; Thu, 6 Apr 2023 20:32:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239612AbjDFUco (ORCPT ); Thu, 6 Apr 2023 16:32:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239610AbjDFUcS (ORCPT ); Thu, 6 Apr 2023 16:32:18 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DC34A5EB for ; Thu, 6 Apr 2023 13:31:51 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-946a769ae5cso134575466b.1 for ; Thu, 06 Apr 2023 13:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=55wB6FwAFZR2J5GJ5M7aLn7D6PzulcN06rOSgXVQC4g=; b=EN2rt01WdBFTfSRBAls5Y9NM9nGaiaOcOOWu7OR6lKgUGnk0HwhDZSKRgwtXQBEk6H 4LP/Z/rIIPuYLly2xAQm/zGWSnVonmN+shsh4KytuvDM++yV6T9RP5gjpxRM898KCLNc 7pR2KwQ0n+0BkcM4u3crCcPJOVO69dmEzdmDwYlMHOjsmD+7YAnFBP3BJP0uiCxlEqOL s6aEgmXJSPqPouPrcqFMWR6YUIDONYoTO98GEm/Bl2xe+tQ3tXO2dsLp2zEI/y6QWcx0 4hRAAiWJx+Un89DSN7t8fqL4QbGj1Q+02Ga3JTwbZtmIGZhVEhM7ZePOLWeX62uVqhT9 x10w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=55wB6FwAFZR2J5GJ5M7aLn7D6PzulcN06rOSgXVQC4g=; b=3CQfsRTFTm0o7xd3LQ7a7JnoWMs19gJAY5FZ2tZJrjhluOQT68D8uRAqDw6pqyHxDn V3foJnNekyzjS4Fhi6UKOVXadkjsWZ20nLT2dSdaZkeUguX4i7+7b5y+HYgAYb888C54 GeqTkw2aybIxl2W/H3JX/hOVypKwdsLwSS35TbljugrjHHe+ZIZmhpTaB4mUcz8he2i9 XQ0wENMuXq40fQdrCr+/X5X5V8caqIVDeNcNe65GNm4+2W3wRj/8vjyTsy+cDBO1wBAP Ll1YKpL8LXwHuP7ztpBQcXIp26Ld0VzH/t2kg0oNezUsu7cXxwNUnJTqtrsVv3837qIl Sc7Q== X-Gm-Message-State: AAQBX9eOUrYdAp6MKWfav6roBV3ykgfehDuBEi3oX7vKp14XYMGD5v8F +lRFW00vRM0a6Un+7Yu6e7NK2Q== X-Google-Smtp-Source: AKy350bRWnrdy2ZCvoo0Syhpuo+hNru3eCGoBtu3JdLZjamkW5ZAZx1rYF9xlQuD0w6bpQtTeZFYtA== X-Received: by 2002:aa7:c602:0:b0:502:22fe:ef3c with SMTP id h2-20020aa7c602000000b0050222feef3cmr603299edq.41.1680813109276; Thu, 06 Apr 2023 13:31:49 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:48 -0700 (PDT) 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 , Luka Perkov , 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 15/68] hwmon: emc2305: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:10 +0200 Message-Id: <20230406203103.3011503-16-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/emc2305.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c index f65467fbd86c..723f57518c9a 100644 --- a/drivers/hwmon/emc2305.c +++ b/drivers/hwmon/emc2305.c @@ -479,7 +479,7 @@ static const struct hwmon_ops emc2305_ops = { .write = emc2305_write, }; -static const struct hwmon_channel_info *emc2305_info[] = { +static const struct hwmon_channel_info * const emc2305_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_FAULT, HWMON_F_INPUT | HWMON_F_FAULT, From patchwork Thu Apr 6 20:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01E0CC76196 for ; Thu, 6 Apr 2023 20:32:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239619AbjDFUcq (ORCPT ); Thu, 6 Apr 2023 16:32:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239722AbjDFUcU (ORCPT ); Thu, 6 Apr 2023 16:32:20 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF994B477 for ; Thu, 6 Apr 2023 13:31:53 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id 18so4215582ejo.13 for ; Thu, 06 Apr 2023 13:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PC4lsh3OxdQxSxIIAq1gG+FVtJTQj9E469Ai9wRQe3A=; b=DultCbt08k4QHYdtlCx7M1tEdumHHofsamq5Hh/HzlyFQ1sewtCc/+yrgSqzqTWped uA801AmwNoNKbMZLVYIEfwAX6D1b5I0UxdQta5JnE9Rrv/2ASnttqf0wfwhdRvm7onzq RNLyVJCwgzEOVJkVIPEH0eQsTIdelpDN0HlwIx0KMM/eO+CCY5xXoY1UodPv4x6EoUwh iXAiogAx6+2Syuf4miP2LcwPK1s+PuR+mpv67N13skQcGU6JxcbF+UoU13lFQ4IvYL8v uLkFwq+3E/RR7TctaH1m58L5sN0SMQsDwNXFaWyiX8RTLweiduKzQ1odqq5TaC2X+VwR EIKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PC4lsh3OxdQxSxIIAq1gG+FVtJTQj9E469Ai9wRQe3A=; b=4iulr7RV+f5KX4ba2xeeiUllJtqDbUcPc3vgL4RjUJjAHf1zuNavWg01861meeY6iJ owQNIvII2IeVHm8kveMQMSM2PBWBeETO+xjO2hveplDQja/qB0AYZp3Cri7fSC2IgcUp 2ITFjDzFP4ZV9N+kZu6lvaVWrNqKWfls2NNxD8p6ffr0GmG7Eo0+wiSpjivnXeLeYcUm hQ9vO5CJ0s6JrVXGtqSmiFg53rzD7TYjy9u284IJShde3jUdkM7+fgLoGdwx3cHtgXEa Pv9bKU5+/hjZSc7DIGM2puT9RFTrZSo7OB1OxFoY9mYe2+Qh6z7yd/fnZUKnttzdnhHa W3gQ== X-Gm-Message-State: AAQBX9eOWuU+B0NnLnoVehLHoUrnpHVIcS1FPUC/czCAB3iAqboKjqjo n4roAFV0ZUfy7sHYL0X5mkuqAQ== X-Google-Smtp-Source: AKy350YMxjova8/YXMJ5F804pP+X4GEe65xnAEjpNIs0nkj6iA21YkajeiMM/3rZdDwHPAmzQUlJsA== X-Received: by 2002:a17:906:f6ca:b0:92f:7c42:8631 with SMTP id jo10-20020a170906f6ca00b0092f7c428631mr187736ejb.16.1680813111545; Thu, 06 Apr 2023 13:31:51 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:51 -0700 (PDT) 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 , Luka Perkov , 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 16/68] hwmon: ftsteutates: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:11 +0200 Message-Id: <20230406203103.3011503-17-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ftsteutates.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ftsteutates.c b/drivers/hwmon/ftsteutates.c index 25afd9167a34..f5a4d91a7e90 100644 --- a/drivers/hwmon/ftsteutates.c +++ b/drivers/hwmon/ftsteutates.c @@ -520,7 +520,7 @@ static const struct hwmon_ops fts_ops = { .write = fts_write, }; -static const struct hwmon_channel_info *fts_info[] = { +static const struct hwmon_channel_info * const fts_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_ALARM | HWMON_T_FAULT, From patchwork Thu Apr 6 20:30: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: 13204142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 562D2C7618D for ; Thu, 6 Apr 2023 20:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239766AbjDFUcz (ORCPT ); Thu, 6 Apr 2023 16:32:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239523AbjDFUc1 (ORCPT ); Thu, 6 Apr 2023 16:32:27 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83343BBB0 for ; Thu, 6 Apr 2023 13:31:55 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-502234a1f08so1386489a12.3 for ; Thu, 06 Apr 2023 13:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IMDS7DWeOGd1oXvvAq27Q40JyJ5tNkqdlBZXR66E9jc=; b=lGzZVAzr/SMPp5RADHMYy0lwwj1yV1xjGhALicSHU5BGnrobNZovzYVnY41wP8R7PO djbqeoZm0ay5iLRDoFOdVDJaJK2TK8hr9uzKetRKHEtIOhlMPsxzO+L89dLaS4iKnBFj odwt7WUbOvzUgXHttgae5xK6MdLktNuDw0E1G4i620jz4z5OcfU2dIZ0pnQG0bPhMo0o 26AxsHgdVYA7zCzJ96BoTELp3riSwXeeB69Hmk1uZkmW69HU5lY7ZhpzUAYyxoWLm4rb sl8NwZdrT8Fpmbg9DjmgVjrwiM7XfJKKjDFkrTfVw433fe9LdglO2cwbzVeWT6zKs6f3 jg+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IMDS7DWeOGd1oXvvAq27Q40JyJ5tNkqdlBZXR66E9jc=; b=LbBv2x/1pftEv/b9YTMoaH2zUKbR4p21iobnz7vO19df+1rb4iXJHZnpNkRS8NZjZf 046Df5DjMcZQnFmfpNFmNjZSRjuVc4KdP17x7RZ2/Gj0ka4mOED8/kAqWC6wQa5pLv8W bplTievR282+xwJ2GFVr7hDi+C2WGVmlat7sPxWYeyFi7OT5HuxlyD9Q5D2QdCUlFxwv UmRv6IdAIi/IwqZL9cYYFMZqf4Ktn7oHbmRGZjCQUsjY8s1xT4Wz4DQVL6LWRMq6Rx6A QjjGFmx7Fjy2iPvqjA8qhXfB6qFtfSpFzKbPzihExWr5srEU+rHjaRF/VX9WRGyos7uq QbJA== X-Gm-Message-State: AAQBX9dPgAYKjWuyhipBeDlb/cGGOCvQCsp15xspLwC3+ePOW4nEtHm2 3xNgVk3jEQ0+qNf+VVEDXeVHlw== X-Google-Smtp-Source: AKy350aAyIrGW0PB9afhSj3XaLXU246uMMRzGoEwDk1xzzK7No0F8351o7M4LdpnTvKKZ+R6miepfQ== X-Received: by 2002:a05:6402:1653:b0:4fd:2007:d40b with SMTP id s19-20020a056402165300b004fd2007d40bmr804080edx.9.1680813113718; Thu, 06 Apr 2023 13:31:53 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:53 -0700 (PDT) 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 , Luka Perkov , 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 17/68] hwmon: gxp-fan: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:12 +0200 Message-Id: <20230406203103.3011503-18-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/gxp-fan-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/gxp-fan-ctrl.c b/drivers/hwmon/gxp-fan-ctrl.c index 0014b8b0fd41..2e05bc2f627a 100644 --- a/drivers/hwmon/gxp-fan-ctrl.c +++ b/drivers/hwmon/gxp-fan-ctrl.c @@ -168,7 +168,7 @@ static const struct hwmon_ops gxp_fan_ctrl_ops = { .write = gxp_fan_ctrl_write, }; -static const struct hwmon_channel_info *gxp_fan_ctrl_info[] = { +static const struct hwmon_channel_info * const gxp_fan_ctrl_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_FAULT | HWMON_F_ENABLE, HWMON_F_FAULT | HWMON_F_ENABLE, From patchwork Thu Apr 6 20:30:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 560DCC76196 for ; Thu, 6 Apr 2023 20:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239686AbjDFUdC (ORCPT ); Thu, 6 Apr 2023 16:33:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239674AbjDFUcc (ORCPT ); Thu, 6 Apr 2023 16:32:32 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E6FA5EF for ; Thu, 6 Apr 2023 13:31:57 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id g18so4213600ejj.5 for ; Thu, 06 Apr 2023 13:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mL4brmswtz5kXr1fmKwInCxjlH6he8VKwj0V627SpbA=; b=RjZypuk+y5AU7f3XGxF5Rl/jr+svjnDPTN9iBF6vzU2NIzHfxpiTldbo9kjAyzTdbg siMjyV5++Q/pJbxL3XpSeIi5EYdDDBVkmNTDsZR7PASY3ISre7+gaVxy617XJ98Iz28T 6XxNmWW3iK3GSbUNNXZWOdt+LPtPv3AOZd/sfF1Gx2iDkRv8hDvlYixMzzWZkOS59c2U Cr7A2FRodgYfoRP7uAoT/UEfvocSX5XwEetx8J54khfAJRRib2MIkTpjqVAXRfX8eZsP Td7j3+I1vKj7aIDWtHX87uEC8KUPDhqVYm1n/Zk9DE43P/PjyqbFFqI6cXyIPIce4d4m IL9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mL4brmswtz5kXr1fmKwInCxjlH6he8VKwj0V627SpbA=; b=mTAVE/o1uX1dRaKkeI3cvBVX82vEIB0GE2N2l2G+NUU6iVxhkFebnUWusYS5V9HPKS R+oUmJJcwkxjdJ6DHt0cKEIab1Ipi1viYDe4wur7cugn6GzBJqJDaHm1nWPPwIaE7pjv 5cOHlua3LQpwqW08AuN8Ub0PN5uwwrkCFlSXEBcDPzqCCIsCgykw62HM6tCfdOVDRxly D0dPffE42mgUdz9tSD95Iaxb/cEestnvOQMDHgsjGVwrxCm3Jir9nCpZtGjR8ZNLEr1n Lk4VyMKuxn0hoS6ZESr7XBfH30OabWib5HahK6Roilyg3D5zyx8Pw6zgi3fgE2iCDeX2 0EvA== X-Gm-Message-State: AAQBX9dCdlZq0yyqM9tITxomKJpY7FFmUiPFRMOJyvai4hahrp+SaiZG IPAlKCmk1Zozk35A5VWcNgiIaQ== X-Google-Smtp-Source: AKy350ZCJBJl8mtDFBbKnabpZnzVxKYkofKV7TXIl6boLppM6CpYFOeo9dFuZLiozCFvFobLsk6V3Q== X-Received: by 2002:a17:906:aec8:b0:931:59f:d42 with SMTP id me8-20020a170906aec800b00931059f0d42mr171521ejb.29.1680813116456; Thu, 06 Apr 2023 13:31:56 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:55 -0700 (PDT) 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 , Luka Perkov , 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 18/68] hwmon: i5500_temp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:13 +0200 Message-Id: <20230406203103.3011503-19-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/i5500_temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/i5500_temp.c b/drivers/hwmon/i5500_temp.c index 23b9f94fe0a9..7b00b38c7f7b 100644 --- a/drivers/hwmon/i5500_temp.c +++ b/drivers/hwmon/i5500_temp.c @@ -88,7 +88,7 @@ static const struct hwmon_ops i5500_ops = { .read = i5500_read, }; -static const struct hwmon_channel_info *i5500_info[] = { +static const struct hwmon_channel_info * const i5500_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST | HWMON_T_CRIT | From patchwork Thu Apr 6 20:30:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204145 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81F6BC77B6E for ; Thu, 6 Apr 2023 20:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239715AbjDFUdO (ORCPT ); Thu, 6 Apr 2023 16:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239602AbjDFUcm (ORCPT ); Thu, 6 Apr 2023 16:32:42 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318E1A260 for ; Thu, 6 Apr 2023 13:32:03 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id j22so4224114ejv.1 for ; Thu, 06 Apr 2023 13:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QqwHPALogIS8o9t9XI2PCmXxA830L7wP+ne1/9jP4lo=; b=iv6ANrjKsFP0ZigiJpgOTigvQSupXqaPpqtdag1G16pm8J24/j8ce5L59ndg9RVJ8a sl8QwkCQWTZa9O0Gn+bvzggaqpnbYHvfeyTUgLOCg+ZDW5yNs3g7jACg1hxEmrqP7cyZ c+fnfEGydnbknteHJhk/qtPjj/w4qg5aJpXiiGry0lxJB+8tYqBOUrMBh3As3EW64IPN drOMGpdkrx43DerEn2p1hSLmMTEvdOhbYYG3ELOksDBAZeZLFmUxAShY+k8uUi1Z+sBm NNiZ2ZDu6CtGDXTvqDsNFktW/F/zGay+uRP5ntdsrwTrDA+k4/CDeQhtEoXayPoNfXj6 N3cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QqwHPALogIS8o9t9XI2PCmXxA830L7wP+ne1/9jP4lo=; b=yuWF7Djdsws68Dg53aQGLkxxRj2rRcuN6rx191lBpH3TiI4okw0Q2M0l6VoIHSDZlI vdq3eI8K7D5NwwpVG/J/8shshfpEzZhr2094oT/pBnCtIQBwi/zPxlHGg+MhKpQ0d/f4 6M0ysOArnW1MLqKiW/Dvs6ua6vAg8cdEB30KjWghc18CJDLl6HQ5fxjnOJXyssqXlWTx CDN7IkaqV/3belQ/4cfy0zJXOKfhYr4RhLvAhhr3p2CNeagY9WBbwUvrHBQbBidcabiH cx39ee5fZeB/6xDn8GDyLBdjoo+Q08onDYqGDsLBbRAaiYZfyUmgHstMdywSfCu/gGgK wVEg== X-Gm-Message-State: AAQBX9fFvNPsXFKcsqlOK5uc3qNDW+iN/lCN78lWFvFJoYd9HaxYY9MH 3/Gti0glqIdJzUgQXH+AuQgl+w== X-Google-Smtp-Source: AKy350YNTXkM6xAyWCAEyvanHLn+j8HqvbNU+aogRqOPOmE/HfD4bNGokqkvcOYR0LGhqiUrpvHSPQ== X-Received: by 2002:a17:906:260d:b0:93b:62f:82a3 with SMTP id h13-20020a170906260d00b0093b062f82a3mr238281ejc.6.1680813118839; Thu, 06 Apr 2023 13:31:58 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:31:58 -0700 (PDT) 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 , Luka Perkov , 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 19/68] hwmon: ina238: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:14 +0200 Message-Id: <20230406203103.3011503-20-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ina238.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ina238.c b/drivers/hwmon/ina238.c index 50eb9c5e132e..8af07bc0c50e 100644 --- a/drivers/hwmon/ina238.c +++ b/drivers/hwmon/ina238.c @@ -501,7 +501,7 @@ static umode_t ina238_is_visible(const void *drvdata, HWMON_I_MAX | HWMON_I_MAX_ALARM | \ HWMON_I_MIN | HWMON_I_MIN_ALARM) -static const struct hwmon_channel_info *ina238_info[] = { +static const struct hwmon_channel_info * const ina238_info[] = { HWMON_CHANNEL_INFO(in, /* 0: shunt voltage */ INA238_HWMON_IN_CONFIG, From patchwork Thu Apr 6 20:30:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15CE9C76196 for ; Thu, 6 Apr 2023 20:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239874AbjDFUdO (ORCPT ); Thu, 6 Apr 2023 16:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239715AbjDFUck (ORCPT ); Thu, 6 Apr 2023 16:32:40 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C3CFB44E for ; Thu, 6 Apr 2023 13:32:01 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id l17so4227013ejp.8 for ; Thu, 06 Apr 2023 13:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o7Jy8Z4lQeZ0wRB6o7UIjx/s2l2tRer+BWQLAS8zWPg=; b=Z2eFE6i7URGSrUcq19N/qYIU6025nFLK2hWRYbP7q/Cq06Q69LTeZs5RMcQTIMXLVb 3GHpjVPXAqoVVTOw6JK42HXPDXsTbbsqk4Kwz1CSpH2dicwn7L3p65C+xVDebLPONsHT pHUTiFhJhi53VA8QEY6qBY9w2OgxhjcwL+GG1X7ApeF/CYuxstrcEuf3/hopgWFiFrOI weqXUj7Jn1UWWf1nKdrL/UU31no/btv0AYqzRv3ZMmjd6QfDg6RiR0NS7benxEF+sQK6 R1mBFXwD5ecjSe6BvqnE5orT7bskqLCxT8XxJ5oeu+D3fsYmXXR4GBDYcPO6jVEBvqia nBjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o7Jy8Z4lQeZ0wRB6o7UIjx/s2l2tRer+BWQLAS8zWPg=; b=q5GvZs4+/jBpAS/BuoqiObjnd1zfeebr2d2HPf/BqtEgACjIJfcP9QUFqFSeJYvyVr NK2M9DMamVCfBepv1K4wBQO7wUE4Wy3MR9VfPMI9abF71QJlfmfCIItuN8bnXDF16gDl sFygV3Tjci6mySAUUXrk4lI5twXFoYI0IEe1p7JidGrp3AjLvGGM5+mFQ6Dn4vGcQTiw ximYDx5uAvRY3ljpWgvsbnRqu+g8gUHqPHoHwfLYalCADLBK3k7v1L9uNcg0kYbEzh2G 3EDpMT+YogkFYQNSGKdcGhCBZeLlDTRRLsOv2pL3Rmxrtr+5zw5L5SQQPm2icl2kxOz2 Aedw== X-Gm-Message-State: AAQBX9euac8am3FGNvc07/lL8WZbuK8QfaVmQ7jlZISMGreSp2WM5t8g G34aJL4Tsq6v+wOcFnCtsiuE7A== X-Google-Smtp-Source: AKy350ZWpcLNtPVNGNTGeWcT9D6JcdnabpEIq7kEjhcu9FSp1PxTjFsVhQwwsMEPT5I+96ZRKvmQ6Q== X-Received: by 2002:a17:906:6046:b0:93e:9362:7607 with SMTP id p6-20020a170906604600b0093e93627607mr129978ejj.20.1680813121112; Thu, 06 Apr 2023 13:32:01 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:00 -0700 (PDT) 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 , Luka Perkov , 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 20/68] hwmon: ina3221: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:15 +0200 Message-Id: <20230406203103.3011503-21-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ina3221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index f3a4c5633b1e..2735e3782ffb 100644 --- a/drivers/hwmon/ina3221.c +++ b/drivers/hwmon/ina3221.c @@ -650,7 +650,7 @@ static umode_t ina3221_is_visible(const void *drvdata, HWMON_C_CRIT | HWMON_C_CRIT_ALARM | \ HWMON_C_MAX | HWMON_C_MAX_ALARM) -static const struct hwmon_channel_info *ina3221_info[] = { +static const struct hwmon_channel_info * const ina3221_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_SAMPLES, HWMON_C_UPDATE_INTERVAL), From patchwork Thu Apr 6 20:30:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204146 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FE23C77B6C for ; Thu, 6 Apr 2023 20:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239795AbjDFUdT (ORCPT ); Thu, 6 Apr 2023 16:33:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239486AbjDFUct (ORCPT ); Thu, 6 Apr 2023 16:32:49 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC65FBB9E for ; Thu, 6 Apr 2023 13:32:04 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id sg7so4213369ejc.9 for ; Thu, 06 Apr 2023 13:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y2mVQ5empood++BDorTJ/weXm8Mrumxl4wyeCMmuFPc=; b=DRP5f0xCBkopIx7BmxPv6s1+3FId1k68mLGA9qo2Ng8EZstP3Sy+utxgejlyUM/RcI EsKNucC0AtqH8zTLd7M+LjOzpl/Mz2ZgGFwbDXqLWo24co2uqs4y08qAPGD0epTPmUDn HqbghHxgsKm2QGnpbFyDEjWpRJqlqR2VA0YIYYuVb3ug34fTs78bGdoN6T7iz+xcPavI eEZLasfB8HV22tARMLXazLczPKWcfXzyRpJX/RRm/ftFCizli/zRyzL7zdvp+RJZJwWP sKPh4Ii4UelEha6smoN1/1l2X1RzB4E9iLl1hxkgjT6138duMap5w2dVkOmyLbZ2FjsU opug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813123; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y2mVQ5empood++BDorTJ/weXm8Mrumxl4wyeCMmuFPc=; b=hGVkCEj9VY17LUktLJon0zlgQxMKp+F+5TcAqyt2V1gTCJGd+eqNoTbd/fAWQg54FV jyx+rsfR6yRpc+81i4Tiyqk50FpunoZ3VECt92Jg9jEFkGkkKVNzsu3yceULq6m9HrMO Fq6L0z0ozws8hCNu4hY+bPKQ+xsvRTLq9exHziwNEfb/PbRr99T/mWQDFvVm9ZdCzNG6 A1PrDKCUqalNi09rUgcezU6u764JLmSyA7bG4slFEScaAn9d83PO04tAj/xos92zVs3z HClcYDI2n/wh0tf0bdK2JfhniNOLkrpfxKxsjA7AFI/SYTyPgWOSJ23/+VS8MfGOIROn K/8g== X-Gm-Message-State: AAQBX9eBXtXtEyHZTy6QUWM8koQUDZIfn8GcaVFqJCXK2jUbmZBC/e/S BVZm4af4GpumOqZ8GwNnWiST7Q== X-Google-Smtp-Source: AKy350at4RVASepxc3SPs3+U+hY5w5cRaraJu7UW9VBSvb5rm8OUubA+yjerPfhwRUJ+h3KdjE6snA== X-Received: by 2002:a17:906:46da:b0:949:8772:8195 with SMTP id k26-20020a17090646da00b0094987728195mr134045ejs.38.1680813123383; Thu, 06 Apr 2023 13:32:03 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:02 -0700 (PDT) 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 , Luka Perkov , 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 21/68] hwmon: intel-m10-bmc: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:16 +0200 Message-Id: <20230406203103.3011503-22-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/intel-m10-bmc-hwmon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwmon/intel-m10-bmc-hwmon.c b/drivers/hwmon/intel-m10-bmc-hwmon.c index 2f0323c14bab..6512f4bec79a 100644 --- a/drivers/hwmon/intel-m10-bmc-hwmon.c +++ b/drivers/hwmon/intel-m10-bmc-hwmon.c @@ -24,7 +24,7 @@ struct m10bmc_sdata { struct m10bmc_hwmon_board_data { const struct m10bmc_sdata *tables[hwmon_max]; - const struct hwmon_channel_info **hinfo; + const struct hwmon_channel_info * const *hinfo; }; struct m10bmc_hwmon { @@ -67,7 +67,7 @@ static const struct m10bmc_sdata n3000bmc_power_tbl[] = { { 0x160, 0x0, 0x0, 0x0, 0x0, 1000, "Board Power" }, }; -static const struct hwmon_channel_info *n3000bmc_hinfo[] = { +static const struct hwmon_channel_info * const n3000bmc_hinfo[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST | HWMON_T_CRIT | HWMON_T_CRIT_HYST | HWMON_T_LABEL, @@ -154,7 +154,7 @@ static const struct m10bmc_hwmon_board_data n3000bmc_hwmon_bdata = { .hinfo = n3000bmc_hinfo, }; -static const struct hwmon_channel_info *d5005bmc_hinfo[] = { +static const struct hwmon_channel_info * const d5005bmc_hinfo[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST | HWMON_T_CRIT | HWMON_T_CRIT_HYST | HWMON_T_LABEL, @@ -280,7 +280,7 @@ static const struct m10bmc_sdata n5010bmc_curr_tbl[] = { { 0x1a0, 0x0, 0x0, 0x0, 0x0, 1, "CVL2 0.8V Current" }, }; -static const struct hwmon_channel_info *n5010bmc_hinfo[] = { +static const struct hwmon_channel_info * const n5010bmc_hinfo[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_CRIT | HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_CRIT | HWMON_T_LABEL, @@ -432,7 +432,7 @@ static const struct m10bmc_sdata n6000bmc_power_tbl[] = { { 0x724, 0x0, 0x0, 0x0, 0x0, 1, "Board Power" }, }; -static const struct hwmon_channel_info *n6000bmc_hinfo[] = { +static const struct hwmon_channel_info * const n6000bmc_hinfo[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT | HWMON_T_LABEL, From patchwork Thu Apr 6 20:30:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1AF7C76196 for ; Thu, 6 Apr 2023 20:33:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239505AbjDFUdW (ORCPT ); Thu, 6 Apr 2023 16:33:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239643AbjDFUcx (ORCPT ); Thu, 6 Apr 2023 16:32:53 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4557CAD1F for ; Thu, 6 Apr 2023 13:32:07 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id by26so4208692ejb.2 for ; Thu, 06 Apr 2023 13:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oNHFEWZE2izMo2eONaxZOZH9mOc3OpiNVeO39Ug9Z/c=; b=ZoD/OTkABYZ0aA1MRcHeIcK7uDNGCJaLBZMiRQKM5KVhVJxZJFIclNEyGRxL9XRvkS cIyw6RpS276Iu+tFnk7f4ww+TNKvOaqa/2Tx2FtZGbAPoDRaGr+Xwa7iqOrf9rklzUZr 2A29SMrSzU7EjqK5SlV9oQtlSghV1HJQUMJzdLn3i6eXYwdK5bhx/e437w+x+9gc5yhe ow2aRQMaGQGFl6Kt6uIKgRJ66jzn6uyKggl+bvEPLFyXNONVWyVPXg+B5o+q59E0pEa5 4S/Vvfj8AM2V5v50Ot7caixW+ZjzHqCnv57G5IdXvcEVSf94wuQtXLTBN/6je+YKAo2h lJyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oNHFEWZE2izMo2eONaxZOZH9mOc3OpiNVeO39Ug9Z/c=; b=SCV6anKxUurt+AoeXQYRAQ+FosYQ3o2pildGKNYNIBilfXSvafvUKhmIEesXHlPkA3 24JNhsLHbM0Tvd8rdixoB3UMQ8dFqnnoM8NxL5pxt7islbDrFO2M0KP5A7a3u3AG59RY 2UhEVh4FWCzvC3OR9pdYVWXk4obG9OvWm6tPAc7U8cz3s0UKSQ6mubafa75D5ezZcyRQ RugyAExxrlNEytzYRS4YYQi9VWgKib25K2fOkWKJd1rMNVaX3r92sJAdwA+m8FOTy6l0 D+XUVTJVsVLgqTPnGaPsoSvzGzQhJK20hmKXkZ9TlKn7XoJ8t0zSRVXcNSycr4t140QR BlSA== X-Gm-Message-State: AAQBX9dEv03kQhDgJfHQzEWcYLSPAv3CgHJhsKwfs18bdNCxnOBAJVPV c18J1rfDPeyUOlqlrpkvnz5oBQ== X-Google-Smtp-Source: AKy350ZcgjGKivvgvq+rEQGqcwWvcyLCWLsGzdryLHVXKEQtzAXO3j8S/kYDxAPo+7yEF+TFzQk5Dg== X-Received: by 2002:a17:907:210f:b0:948:a975:c79c with SMTP id qn15-20020a170907210f00b00948a975c79cmr227039ejb.15.1680813125719; Thu, 06 Apr 2023 13:32:05 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:05 -0700 (PDT) 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 , Luka Perkov , 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 22/68] hwmon: jc42: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:17 +0200 Message-Id: <20230406203103.3011503-23-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/jc42.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index 8523bf974310..4c60dc520b12 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c @@ -450,7 +450,7 @@ static int jc42_detect(struct i2c_client *client, struct i2c_board_info *info) return -ENODEV; } -static const struct hwmon_channel_info *jc42_info[] = { +static const struct hwmon_channel_info * const jc42_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204148 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12577C76196 for ; Thu, 6 Apr 2023 20:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239768AbjDFUdd (ORCPT ); Thu, 6 Apr 2023 16:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239859AbjDFUdC (ORCPT ); Thu, 6 Apr 2023 16:33:02 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38AFFBDD3 for ; Thu, 6 Apr 2023 13:32:10 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id n21so4222223ejz.4 for ; Thu, 06 Apr 2023 13:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TXFOj5XP6GGH/xdoeDcQ495WqTsc3jvxQGcIULPs+bA=; b=tAH530IsOfJwLPhjCRb2a6QLiFZ+A4sm93VHs6F2KU1UpCdiHUfq/w8KyepLOuG+JS VbATh4yTNe18i7hex3ZgKFUkiw0ZZ0yFZHXb5X7VEkIjfQR+3rvf81XZOl3L3/ZXg0Ak NfRF92uZAuY/FFvihjWGdG2NzU2+mHlC6Mb6bsTEraHlg1z+GeNKIaTVsHCBgW++TR4l I6knMQtQhxoBs/FZFfoVnQbbqOXa6WHlTFCxboFnXtYLlqzpXDH50kxvOtHQAFAAo30Z XK27U08kPOKn3KmigfbSCVEzGRhYqcJHuaBNPL1V6om3YrBPNsBUHnLqkBtgWk4SJvxA tWOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TXFOj5XP6GGH/xdoeDcQ495WqTsc3jvxQGcIULPs+bA=; b=Z9muVo4t7ftnjxtiNEzQCk+pj32GC9u67YIR3LR2PIDWJqjTSyFxASMmiiYLkyjFCZ kVz3dKvM7DNUJzLEWIEHjsqWbu0SOrnJs6Qz62tCYA6RBiSEu3YgTOZtCcu/BRK/m7w6 Y2BiiXlEzNVCJK5s18/vzSxAAIrWS999fy77riXjQkLm5cjiql6C/ADzEXPmkQXA92oF bkMdzVbBNUggR1PkfjmqMqvcYgrmct62pGfNfbLvadrHF9AZiFOWesLlRi2f2L4+PrpI f+wcpO2zZEjSW/hob0s+ps1jTcg+cwrNGiugaXZcWpyEQgonoDmLfR4DOm1/zUWyAI1B 6k3Q== X-Gm-Message-State: AAQBX9cKBlugFnsYOzoacHzMAfF1eQgLoAveqadtMfXhaz1jwe9pxW5V l4VB9mTO0Kz+sXlBG2Xs7ctgZw== X-Google-Smtp-Source: AKy350aCP7vJgYzvgsdr1w8OB+3cnrioQgc4Ehey8zq08G4w6/AHxqP7MSkD4NnYB5eXuIOSWR5N8g== X-Received: by 2002:a17:906:68d7:b0:931:99b5:6791 with SMTP id y23-20020a17090668d700b0093199b56791mr105268ejr.72.1680813128037; Thu, 06 Apr 2023 13:32:08 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:07 -0700 (PDT) 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 , Luka Perkov , 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 23/68] hwmon: k10temp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:18 +0200 Message-Id: <20230406203103.3011503-24-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/k10temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 5a9d47a229e4..df8f08740c1c 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -332,7 +332,7 @@ static bool has_erratum_319(struct pci_dev *pdev) (boot_cpu_data.x86_model == 4 && boot_cpu_data.x86_stepping <= 2); } -static const struct hwmon_channel_info *k10temp_info[] = { +static const struct hwmon_channel_info * const k10temp_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT | HWMON_T_CRIT_HYST | From patchwork Thu Apr 6 20:30:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204149 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 645E9C77B6F for ; Thu, 6 Apr 2023 20:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239959AbjDFUdi (ORCPT ); Thu, 6 Apr 2023 16:33:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239471AbjDFUdE (ORCPT ); Thu, 6 Apr 2023 16:33:04 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9898FB472 for ; Thu, 6 Apr 2023 13:32:12 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id cw23so4218020ejb.12 for ; Thu, 06 Apr 2023 13:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813130; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/VbBbLUbmYsB9ePpFHrMBDx88zoFjkZCXjdqcN0U5ek=; b=ZE1rxTOK1djFdNdrAhKpMrSEtLAvEiqF1wfNoSQfGz2WRdCnsAec1pqTEs7Aeh4Daz 5hMt5SrvsdLX1fAyDf3lUt/+DfA9sjmR1d6QUjOBHKTVqNJPqrMp57Py4g66QZVmqeot KjrJ7q6eSgPe5k3qHOEXUOTE/1iZa3ULlbig9d57u2pyy7daZ5VYQdBbFWxWpOUnbRJ7 VDlhFQInYWSZkQVNdTVB0VEtF7bx8Smb/GBymNgr+1QwqAW1u2jioBmcY7dQwFG9DQWS KjxVxjzNpMK/Eiwab5e+aRjsnXlglhvGPIdfnZzRxi8UA0fKEFgmHR1Gx/fsJATlPfMN QwCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813130; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/VbBbLUbmYsB9ePpFHrMBDx88zoFjkZCXjdqcN0U5ek=; b=1lxjCm3gTLQJvHBriU+6ylEqFmmu8/cUeB9oAqZWLXusDJsX5/y6BmNrSnza7kvDmD CAcyy1hKKv9uBmqBIn1dP2OOBMwDEU/wfPZc2AClIobvuasG0wCh9mW3xsEQ4XUy+6gx x7RvzJ+NBFhVWAmeG8Rll/YlZHk6XnnWaHaAqs40l6Yw5DGPnA8eWXIfJ5wKImAg8bro BYtxTBPacmPGeJz71eOKgLkxUVHx4g7wwJL2QDxs6i9ZZnEW/oRESm1zQKVwg8wH3Xpi 0cyWShw7W3NPktktwgG4nf3NLB6V3ZiJ8qMYSmT8DsTwUY4gt+gxKC4js/4L7+7l8f5K 4BVg== X-Gm-Message-State: AAQBX9d+unHGACS+WntNYz9pGuf77xifcGf1HulrhNdbtbmAqmnHMILK 9taxa+rlAerfqsqHCCJOaviEwQ== X-Google-Smtp-Source: AKy350bFQoFbQgZJrlPh/DTc3IetAgrPSG6bX2Fm1fMb/g+BV9MwE0u2UuNjXkxdQKCAQMcL/H/nCQ== X-Received: by 2002:a17:907:5ce:b0:931:20fd:3d09 with SMTP id wg14-20020a17090705ce00b0093120fd3d09mr7427601ejb.17.1680813130437; Thu, 06 Apr 2023 13:32:10 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:10 -0700 (PDT) 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 , Luka Perkov , 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 24/68] hwmon: k8temp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:19 +0200 Message-Id: <20230406203103.3011503-25-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/k8temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c index f73bd4eceb28..2b80ac410cd1 100644 --- a/drivers/hwmon/k8temp.c +++ b/drivers/hwmon/k8temp.c @@ -118,7 +118,7 @@ static const struct hwmon_ops k8temp_ops = { .read = k8temp_read, }; -static const struct hwmon_channel_info *k8temp_info[] = { +static const struct hwmon_channel_info * const k8temp_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT, HWMON_T_INPUT, HWMON_T_INPUT, HWMON_T_INPUT), NULL From patchwork Thu Apr 6 20:30:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204150 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CFFDC77B70 for ; Thu, 6 Apr 2023 20:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239478AbjDFUdk (ORCPT ); Thu, 6 Apr 2023 16:33:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239710AbjDFUdM (ORCPT ); Thu, 6 Apr 2023 16:33:12 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E0EF9749 for ; Thu, 6 Apr 2023 13:32:13 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id l17so4227914ejp.8 for ; Thu, 06 Apr 2023 13:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CNp3WYqV/V7CDaByQ6e7/ceMuMWEtGPx0KFJs+NcOj0=; b=PlCNPADLLxrpEitZeVrRHlscQjOgnnSh+Mk2MmQ3ulAO6OMkjKdPOAjyiWgYk44Beu FCKCoWAMDe3ZZFwFA908RF8ktFCR85AuvLlLSjgzvPnKP6QdSAoG+lH+8IrhYme8Luk4 9bpGbIMWzDVcjlVDgpiS6kxSU9QmqJuSYTihuiGzxPar8hU38iLg+XukWhebKaodFG3E knO9iHkp/j19RNRUysp0RKX7hKPEUehgY7cQ/xxVl0HEcsvp1aSkKfWZeUw3vWfi5Kjt W5uiFYcH/mThvS651XTGFlH+ffw+/0WHtYDheiSR6PxHt/KyvOWEn16TBp6vziXxBa3S IlJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CNp3WYqV/V7CDaByQ6e7/ceMuMWEtGPx0KFJs+NcOj0=; b=Da/TUIWX07uo8WpwYi11alnUqqpclfMRUiROMuLngCZ8a+b9yWJIZeJrZ+vogfJbFu 0qD20gHQQj+163cxfseI9Nz4l7Ezimm7HiC8J9xMB8OTQo/baNZOwqAjcaRgYFKb5iaj fsR8O4zrOaCPkx7YQ3Dh6JexpOPRxcGniMqlLxUA6OLykOydoAKhr1Cijpd2UPs3Oa72 5t6joLrctmiA/HyUTKR9WuR3COLVpumDoUl64Yr4KU9lHI0MVu/67nKe/hXilLOk4H8K 7Evakjt2LDHiwLI13yhG+S8yGj57ajC9ZhqY+JTrUm4psVW60qOei76755UQOV3+Iqkj SrAA== X-Gm-Message-State: AAQBX9d5ACR8PVtAaGAfOGMZS5WMsiLfpNxmPX/MyHJFlvtVPFWVXB2n V8zPlvoxXbXIOWeVaqikmRIVNQ== X-Google-Smtp-Source: AKy350ayegwpK76aPtDbCZC1X7+3Vf06lspI7rDhnT552IpPl+QIeLGxsAkDYKvDVzwY2yrD4EJFwA== X-Received: by 2002:a17:906:1412:b0:939:e928:5323 with SMTP id p18-20020a170906141200b00939e9285323mr97046ejc.54.1680813132640; Thu, 06 Apr 2023 13:32:12 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:12 -0700 (PDT) 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 , Luka Perkov , 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 25/68] hwmon: lan966x: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:20 +0200 Message-Id: <20230406203103.3011503-26-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/lan966x-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lan966x-hwmon.c b/drivers/hwmon/lan966x-hwmon.c index f41df053ac31..f8658359a098 100644 --- a/drivers/hwmon/lan966x-hwmon.c +++ b/drivers/hwmon/lan966x-hwmon.c @@ -260,7 +260,7 @@ static umode_t lan966x_hwmon_is_visible(const void *data, return mode; } -static const struct hwmon_channel_info *lan966x_hwmon_info[] = { +static const struct hwmon_channel_info * const lan966x_hwmon_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT), From patchwork Thu Apr 6 20:30:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F43DC7618D for ; Thu, 6 Apr 2023 20:33:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239904AbjDFUdy (ORCPT ); Thu, 6 Apr 2023 16:33:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239905AbjDFUdR (ORCPT ); Thu, 6 Apr 2023 16:33:17 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 314DDBDFB for ; Thu, 6 Apr 2023 13:32:17 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id g18so4216468ejx.7 for ; Thu, 06 Apr 2023 13:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813135; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nC4Ho9XQ3A1dG1FAYoaY4HIO2BIpL4alO+9K6+BTsgs=; b=kDGvTw0hmJmsnDrCz4hIVuZXLdBm39eCoSAUCsNnQg/ef7BuVqZJOAJLxaorLP1g5c FqP8AFOG5V4h57aeO1SH1OG0iRNKG/UwpwU+zxenNLmvjc3bbsyIJRuUjYd4UPPqALkx +es0NaQxAxlg+LntBNBgolGWFOjQjRrxoEJ6DyiPRhzz7igCAAhdknQFcufPtMs/QPAC 85DB88Vwi+1FqQLJK7MixKZvY87hBymdrF36NXftIt7B+AZH0E9KzxEscKCehOGtfaPi 1veKJgR6762YXAHvIbES1oqlPZuUZDuNPxoTpsb/LOeHGTyS9klp9q4Y0sVnMh2QxHCG 4eyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813135; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nC4Ho9XQ3A1dG1FAYoaY4HIO2BIpL4alO+9K6+BTsgs=; b=xRwAoVSQrPWkxhNNKd+3OnNKw42cOuyKClwzjMX9l6CDZAkhp+gLkAg6w5TpcSauci PhpiusQDctYXGjr/naZNxYKOdDnCK5N9/cSWJyR9OC276Qbu7O/zvgqS+lv9zd5o/pLK 3EiDkPsfOyO5/OfyKx7XQZmPF7a3UWIB3vOLxPkDXRz5tNVNIoBL2iDsFXKjybR4RHsa gB5bY1Jj/ePIzhYjYz9OdpA7JG9eKdf7xmTgRp/sBWJ4tF9bVJasLLh9uzEdGaKXY7kM MWxz+6T6A2V+ygegjGVzj4z2gA7U3MDwUX9Dym0BRmycUSWIPCSdG7wwY5gBoZzzhFd2 fd+A== X-Gm-Message-State: AAQBX9dKK1WOwRA5Oyw333muaQwqHLNlpvjAZgNuiPPfSzklC20w0Bdj 0vDtp90sNXggG7rrnG5T5InIxg== X-Google-Smtp-Source: AKy350aHb3PgCA9WvGm/QYvu5iU4JMu9zHtbpU+PZbRoKdnmqSGADefm7bmbUEKuKYu8clGcXbSX6A== X-Received: by 2002:a17:906:605:b0:889:58bd:86f1 with SMTP id s5-20020a170906060500b0088958bd86f1mr182249ejb.14.1680813135402; Thu, 06 Apr 2023 13:32:15 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:15 -0700 (PDT) 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 , Luka Perkov , 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 26/68] hwmon: lm75: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:21 +0200 Message-Id: <20230406203103.3011503-27-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/lm75.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index bcc3adcb3af1..dbb99ea4a0ec 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -512,7 +512,7 @@ static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type, return 0; } -static const struct hwmon_channel_info *lm75_info[] = { +static const struct hwmon_channel_info * const lm75_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2886FC76196 for ; Thu, 6 Apr 2023 20:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240013AbjDFUd7 (ORCPT ); Thu, 6 Apr 2023 16:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239918AbjDFUdV (ORCPT ); Thu, 6 Apr 2023 16:33:21 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B149EB471 for ; Thu, 6 Apr 2023 13:32:19 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id qb20so4218983ejc.6 for ; Thu, 06 Apr 2023 13:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813137; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wGgSmDun0Ka3ENM2dsOo9c+VSxguejpVGHkMFXaCcqA=; b=MUiM7bglLZqVCKsBSwDDkMv7LvSjNxNCs/0PTUXNkcKvc9liGgPLm0ici6sWKV2qbd 1WfkT8pkPiJWIF8+y11XHFB85qJsSg/9Za0u52IOA8PMRfIXrdhmruMPOGQeLxKfOnGY KbsWXZWnx65MO2+JBIbf0gLFPP/KC/pdmDTtOW7BdurQXCwUqfAbdE0AuL4G8EMH7kEI VuRR+7aK1iAecpo7/aw8apuAP8dPPCiGerws0AaqVAI+dYO6wYL/e+77HRWf65pNHD34 6VBeP7MW/IyFucHwruF95DP0b2Y8kBXeT7SlQcetnLF/I/+rcMXPng5TAIsPziZiOmqc 4uyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813137; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wGgSmDun0Ka3ENM2dsOo9c+VSxguejpVGHkMFXaCcqA=; b=w4L6B8t0gjNEOcyQHeIMdI6NCDdeBB/PIBzxXVA+s0n7YmZIiTh8chda2RYwwA8xcA /aK/3s/9R2HTunmzOwyAjRFH16hVj91Z0K3xInfKeObmXblEvNBqRjGmVPrLZ74S6IyV qAYyna0pZUp9F6Qmi0ArY7McPJFy3/4D4AdfmflKcgypBT4f+0shh5z5+R0uQJTYybKo h63HKWdUpwVmrsvj0T0h4BP/zXVIni+kd6aIvXGSdY7Xc9WGZCmeRNk2+5uSOQsqEsUg d1iF4Kowmsq/kr7SZjD6BBOzqNkb28yfCOoReTF/wNEWTBIX49MtfOc2KbNijWLqgXPl jJ8g== X-Gm-Message-State: AAQBX9fxh+IK10NU7Or1iyzj8zGLm+//VJ4Z/MXhwoMe7kL8Ce5thEGb kRANNk6MSGMullmWaq7+QGETfQ== X-Google-Smtp-Source: AKy350aFQhS8NkCHu6j449nJK60w/ICqdvNrbFT+w873VTYfdgfIjtPAcMmUwC80gKAmg9AXqnXKoA== X-Received: by 2002:a17:907:6744:b0:930:d30a:6c20 with SMTP id qm4-20020a170907674400b00930d30a6c20mr154044ejc.17.1680813137576; Thu, 06 Apr 2023 13:32:17 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:17 -0700 (PDT) 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 , Luka Perkov , 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 27/68] hwmon: lm83: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:22 +0200 Message-Id: <20230406203103.3011503-28-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/lm83.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index 616449f2cc50..bcaf31ec176e 100644 --- a/drivers/hwmon/lm83.c +++ b/drivers/hwmon/lm83.c @@ -337,7 +337,7 @@ static umode_t lm83_is_visible(const void *_data, enum hwmon_sensor_types type, return 0; } -static const struct hwmon_channel_info *lm83_info[] = { +static const struct hwmon_channel_info * const lm83_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_ALARMS), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT | From patchwork Thu Apr 6 20:30:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EA13C7618D for ; Thu, 6 Apr 2023 20:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239672AbjDFUeB (ORCPT ); Thu, 6 Apr 2023 16:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239741AbjDFUdb (ORCPT ); Thu, 6 Apr 2023 16:33:31 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CD8B743 for ; Thu, 6 Apr 2023 13:32:21 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id lj25so4211727ejb.11 for ; Thu, 06 Apr 2023 13:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3WDgIBkollEzDBIBjWhtjP5ugtMko4aj0Kcc2FaKa74=; b=R/wx04KxX7kTGS1tkTDAu14ouXso0l5PgJMuS4BC9ZqoTgFumWIY68wpkSHtUdTlIO gF2BT/RMDFfHRWEiTPUeuWoo4JOFvGl7cObxgV2+6qm9dkk7RIp2iktkHCnHWNDPqYz+ 0vrhmwkd7YTHzw+T8QjC4SzIidAEMivBBBrmnKmpbPSGjDQxltVG9Gkm/3WCQrY0iUaa D20+FPkuIq1jyWZSimsciJJuYFCfZ2LXGh7l1uJB4C6XfZGjqnTuJ9hZ6IDQ0H4FjptS QeYOYdf7Hwzh55/ssuHtp90ccijyIeibonJYzVGsV7H9xnxX/WxOuGQ9SR/bt8zj1KiM fdQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813140; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3WDgIBkollEzDBIBjWhtjP5ugtMko4aj0Kcc2FaKa74=; b=cIx63sSiFBm00WZBmAnHJp02wUPqSTKciEign0Zm1sZN1p+payKvhAEZm/8IQuiXHT BsUdI/XDcQTvzElawCeCs9hAH/Opyl0Ojo//wly+oT8kTW2Z0FPfCtySYep1kJEfPJUI VhSM0S7O8nugVsg6WFmIRJ2eP/hcJnVHM82dI5hCM9pkjNJQ5G9hw3IZZfARmhiZFFzz 95AgPjBL7gu6XdCrSlZrQHzc8sS0eZzw0swchcuyLnvaJH2CruAIsEjNXNELslpEL0/X siemzdS24MLlVVn3ZQKoA4ICJyGEvpMosagHanQd9QzitxyiXJZhobrbI6zXtW99cGBP vAFg== X-Gm-Message-State: AAQBX9ew7gi03fvzOUTxX97kN2/thuYCcMPxxXCMLyNv1AEPaNfMYmSO J11Cdpny6ZE9/Wd/SE8XCCe7QQ== X-Google-Smtp-Source: AKy350Z2LdQYIdnwn8LF++hSLAjg3GDMSKGQ3iuIRuhmX80GFpyd6xkh5ySgSj0g/RAFei0/4fSjhA== X-Received: by 2002:a17:906:b05:b0:926:9c33:ea4 with SMTP id u5-20020a1709060b0500b009269c330ea4mr221643ejg.27.1680813139797; Thu, 06 Apr 2023 13:32:19 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:19 -0700 (PDT) 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 , Luka Perkov , 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 28/68] hwmon: lm95241: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:23 +0200 Message-Id: <20230406203103.3011503-29-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/lm95241.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm95241.c b/drivers/hwmon/lm95241.c index f1ed777a8735..647a90570bc6 100644 --- a/drivers/hwmon/lm95241.c +++ b/drivers/hwmon/lm95241.c @@ -409,7 +409,7 @@ static void lm95241_init_client(struct i2c_client *client, data->model); } -static const struct hwmon_channel_info *lm95241_info[] = { +static const struct hwmon_channel_info * const lm95241_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204154 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 181D5C76196 for ; Thu, 6 Apr 2023 20:34:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239939AbjDFUeI (ORCPT ); Thu, 6 Apr 2023 16:34:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239943AbjDFUdh (ORCPT ); Thu, 6 Apr 2023 16:33:37 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3EB9AD10 for ; Thu, 6 Apr 2023 13:32:23 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id g18so4217068ejx.7 for ; Thu, 06 Apr 2023 13:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sQG7cqdEyfvgPiaN3cNryt/86XntNmRJN2oVu5IHW7Y=; b=XJ44jdrRUc4kmM1br66U6rAOf/+J2P4kKVwI+KigpUoEt84wEJ7+ahpdDZh0lXfDsg Zo+YSwYFZeTAdqXM5z1SKrt0YWzUgauAPRPkAmwG8zZwUXR9Kz//biE2tQLr20a2eybt goJiW94Kcuan6+Eq33KmOod8cL+wq7JoiGfBxsWVSlGlD42arsqJI9o+hNMNGa4gwtDR sOBCJvALAiEB2jUn/42KnmlOtZmEHbtffkvFpHS4faMyw+tvioNqFy8kJbFtI6AFZOS1 cnUaWGdtiR38mhNGPVZymKjgNosdn20ThR3rBSsau736cXbtjAFQRoNixz0/0nC7YO/8 yNgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sQG7cqdEyfvgPiaN3cNryt/86XntNmRJN2oVu5IHW7Y=; b=A+WyeXAPY/Aa7igPhXj9BsWVD5rYW4Ct3BmAgEGjsmv69Ss26AaUrsCPboSzyIbuXz 7tbG/qi9YbTVykbULTXHZzxFFix0YISdYQ6aJFTC8o989CMiR1XOsudnH4bOMAjRmOP2 YADygfxvqWuHOOkknyEnqpv0uSPzdInTfiFuQCSYE5YEZqN6CwhnVeiGfy1r7DYuiNP+ hvHLTNaAPEhpt6GUd1GN8yMbA2ltEbREiLpLSMT0GYATO1/p0NONIY0xADlsL09PaB1J E9kx3p2kOXBkdn1M1XdTXnXgkuyJVGpbG/t6kDlIGKSJ5SO6zBtF1GfNuXTGnGkFU3My sU4w== X-Gm-Message-State: AAQBX9ffpNpdbL8Bmau04sm4B6M3Jp4PYZnhF9fjLerrueyM6e/r6Lnm j0wEd20AosNaMVmzhAeLkFOxIg== X-Google-Smtp-Source: AKy350Y+6+5n4zHzDsmLkCFWD6JwwfjRxF0GIrJC3syTwj2hmXC7+JMPJgNcDMorii71vq2OJNJ7Zw== X-Received: by 2002:a17:906:39c8:b0:93c:847d:a456 with SMTP id i8-20020a17090639c800b0093c847da456mr167306eje.22.1680813142562; Thu, 06 Apr 2023 13:32:22 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:22 -0700 (PDT) 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 , Luka Perkov , 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 29/68] hwmon: lm95245: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:24 +0200 Message-Id: <20230406203103.3011503-30-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/lm95245.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm95245.c b/drivers/hwmon/lm95245.c index c433f0af2d31..4236d1e0544d 100644 --- a/drivers/hwmon/lm95245.c +++ b/drivers/hwmon/lm95245.c @@ -523,7 +523,7 @@ static const struct regmap_config lm95245_regmap_config = { .use_single_write = true, }; -static const struct hwmon_channel_info *lm95245_info[] = { +static const struct hwmon_channel_info * const lm95245_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8802C76196 for ; Thu, 6 Apr 2023 20:34:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240067AbjDFUeR (ORCPT ); Thu, 6 Apr 2023 16:34:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239875AbjDFUdv (ORCPT ); Thu, 6 Apr 2023 16:33:51 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A43BDC15F for ; Thu, 6 Apr 2023 13:32:26 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id l15so4221865ejq.10 for ; Thu, 06 Apr 2023 13:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eDyUmonauZ8nm6n5G/LkXb2fBKeLEqNmyMFXN+56R/0=; b=YMS5yzUgMpMduF8w1083GJyyM6G6mP2dHeTaOtQucecobZTroK8AAqIAmDn6/gJfrG ixVUYsEiSU+LJT4zWFOe7Ptebv771vH7Vay68cGCplldTOwBeRcj1S0c47TJagJd9Ab0 B0VIJAcrQ1aVhxBoW5MBMLiegaF47uXPlYUF0SJ6QCNdhhkinlV8OPOngm5VKzqrURVS 50xVbFPq8CtFxAmoA7S3p7KME50ER3N2prf22Ax4x/dy9mtv9rg/XqrNnj4kjT7Dqwx/ dxV/zlM/71fKfQn5h7ZzgAVkNSeuHav8BPytem0sIENRe/dSezZUULJjjpodkHqvG/Ex l2DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eDyUmonauZ8nm6n5G/LkXb2fBKeLEqNmyMFXN+56R/0=; b=SIxHK59Rf3xndjxOZ1fCEiMu8Jh2ytyr6GJib4taBvKcZ98A4uY55M8IBFnIzbZlSp hftWFEPqPwC8T0XpJtfVAqLn6+RbpC/QmoLs6ZXUHPfCwjWig6HF/xEfQg6I/FtN/KbL nnrxUHhoI6sn3RcOaDIfk0aAfMPHRqYxLqQkLx6GaB7MTk2krLz8H+w8OyRwy4v92hr1 56qrvOpK+VK1HBUk4e4dw9O4UK9Yy/r5EKyHH+G4OMfzSCOXyBtLph7tQ6Agg3bctQ5F GAZ+G6U3wvFUju4ABwi0b7KeiNhslaE6SAnrNPxvVsv6N7jeaoZhOeGhsME2YTOL+vVr aygg== X-Gm-Message-State: AAQBX9fYdMYY8bNmh4PckgWxGEgUMovoxpd4/LA2MTeeKc9KBmcVIcgW 29CJtshetJA6UajICSyDLyVxMA== X-Google-Smtp-Source: AKy350ZF8nPTGR4RDE9lm1XOWYeECS7YDWeUJSraSmbL162uZx4DgwowpRCXrEnbKVyGKSKX+TbtLw== X-Received: by 2002:a17:906:80c9:b0:931:2306:f363 with SMTP id a9-20020a17090680c900b009312306f363mr150222ejx.21.1680813145115; Thu, 06 Apr 2023 13:32:25 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:24 -0700 (PDT) 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 , Luka Perkov , 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 30/68] hwmon: lochnagar: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:25 +0200 Message-Id: <20230406203103.3011503-31-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- drivers/hwmon/lochnagar-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lochnagar-hwmon.c b/drivers/hwmon/lochnagar-hwmon.c index 8b19adf2eeb0..9948e2f7208d 100644 --- a/drivers/hwmon/lochnagar-hwmon.c +++ b/drivers/hwmon/lochnagar-hwmon.c @@ -321,7 +321,7 @@ static const struct hwmon_ops lochnagar_ops = { .write = lochnagar_write, }; -static const struct hwmon_channel_info *lochnagar_info[] = { +static const struct hwmon_channel_info * const lochnagar_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_LABEL, From patchwork Thu Apr 6 20:30:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204156 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE38DC7618D for ; Thu, 6 Apr 2023 20:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239651AbjDFUeS (ORCPT ); Thu, 6 Apr 2023 16:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239891AbjDFUdx (ORCPT ); Thu, 6 Apr 2023 16:33:53 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03EB4C147 for ; Thu, 6 Apr 2023 13:32:28 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id 11so4215926ejw.0 for ; Thu, 06 Apr 2023 13:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VO8RtXIHFkMLE4x+ayYSzlFGwtzjPkL5W8IJ6F0GzS8=; b=apdHVJ8hSomWaRwNZFrCjodO6msIJ9UHad9g6Lo+PsFhBQMiPOTr2DFzkGODMoxibn dpFAGVlikYfS3JUQ4Bj1RzUJgaJflrGMwCYp8yuRld3y/1Qt2+pGw11b8kJtMiIjeYq1 luj7//ijoJiyi1gw57kdB5YqFbm+uNlRiT8JedTrwsfM/Rrmq2gL3dqTviaYDqr9fnnp 1W44Dn/BiLYDuFNOJvsxyaDhZqUc6tbP9oTr2agQlLTXqG3TmDftmogdaOfBo2XEPhTM rR60MZMcZSk4E8VLgEH/oaBzhF//FHfDNCXLuUsuUuitVyW0kXoHHcQLe9yMWrNgSsEL A6Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VO8RtXIHFkMLE4x+ayYSzlFGwtzjPkL5W8IJ6F0GzS8=; b=tRQM4l6I7h0SD/xs9EN5bR8k/VusAfJZVKFLc3Atkt1/cyigTTIe3zbBMfKpqPI4gi Ep6KS4jl2+Z5St0SJvdQI6lj7nyjhjVOMALwCuiBMiIgoAhvpQBIDG7Py+K8Xjxa4urA paW9BnEh786u3C3otAXUNljgYRdDgjgS6+LXYRj8IbKBf1wgyB06oE8JFUnaM92XRsOc gCv/uAWb7XAyV17wzC+bB8DO3eHd9s/Q1gTdKZcZk0mxHprEabuXzYMI+zN5Kc99uKXh FD+fqYgqI08RKyRA3ZEadAO0IJsqwz18+S0acTC+WPCfCq0+/BP7PPQ/X9+8/yaeGObp IR8Q== X-Gm-Message-State: AAQBX9eZtL521RRYNDVWRYnM738dZtv3XXq/RBJE9fYWULTPtLFLsbKL NLcd23hnvU6ARo5zgU3Gf158HQ== X-Google-Smtp-Source: AKy350YVXbd7mbMYmNs+P106hie3P3mdVmAith2NcpgquwP46kH15TOkGrlublH5uA0343kN/kALwQ== X-Received: by 2002:a17:906:55b:b0:93f:9b4a:12f3 with SMTP id k27-20020a170906055b00b0093f9b4a12f3mr222010eja.10.1680813148417; Thu, 06 Apr 2023 13:32:28 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:27 -0700 (PDT) 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 , Luka Perkov , 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 31/68] hwmon: ltc2947: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:26 +0200 Message-Id: <20230406203103.3011503-32-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ltc2947-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ltc2947-core.c b/drivers/hwmon/ltc2947-core.c index 2dbbbac9de09..d2ff6e700770 100644 --- a/drivers/hwmon/ltc2947-core.c +++ b/drivers/hwmon/ltc2947-core.c @@ -901,7 +901,7 @@ static umode_t ltc2947_is_visible(const void *data, } } -static const struct hwmon_channel_info *ltc2947_info[] = { +static const struct hwmon_channel_info * const ltc2947_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_LOWEST | HWMON_I_HIGHEST | HWMON_I_MAX | HWMON_I_MIN | HWMON_I_RESET_HISTORY | From patchwork Thu Apr 6 20:30:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B281EC77B6C for ; Thu, 6 Apr 2023 20:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239918AbjDFUeh (ORCPT ); Thu, 6 Apr 2023 16:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239653AbjDFUd6 (ORCPT ); Thu, 6 Apr 2023 16:33:58 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E6D4C178 for ; Thu, 6 Apr 2023 13:32:32 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id n21so4224068ejz.4 for ; Thu, 06 Apr 2023 13:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813150; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i6JbQJiorXC7teiECO3hQBxt4FlCv2MlUvUkFyuxz0k=; b=U1ICoYYwYwbOimkM7r9J3JON/FvSAKmAqIWF9gCVuWs3wiDIFQtgPQz/XK8W4diEsB eg5lQiZ+HP2WyZaBwXj8GEJlu4Q+QJPlmnOZGF0MguHwBvS2/iMP2yirU9rim7RbHAE3 /ZDGABwquYh9GoCpLqOUunF/XtxxBCtJIq2RWwO9j1NR3GbtQwNrSW/ehxBTIuyY9Q9j lw6F/flDtl6Q4JW1pX0P1zj6gnu5Y8WrlTo9KrZtebRMn/OJr7yTONxCwePVGAypeYjN 0aFTLsdhT4TcNHCGg3HPEmOHIWIvxb1kOfWf0EKAUE18sxqvCXvLTz7rt4JC0XSVzEKi +CgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813150; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i6JbQJiorXC7teiECO3hQBxt4FlCv2MlUvUkFyuxz0k=; b=UOixUKh20yaceJybggkWiKCxEl/e3StL1D3eQaNY1/R2vo3E0hcWAB1mMigOPj7GXO UdV8Oj5strrMBAhCmqqNu7ArQyPIfor8RFCSYPrRjoOhnRBsl9s9nP7uB7VunMFBg/qo CTyUg0FJai7hUfWV+AidGPsySncZbtykTNv+12N/ltxq1s641Ts6s4ngWMwP/r2WIGTB DpLpRL8MNWapcKWO2sVnVmxlZkAnn9yiTqKPr4MgTWkJ1NdlswEpRfEFSgg7tRoNooRf 23h/kT9O+TQla1Wujz+s741cfUQrzxIktt72w51HCdtWPv6+fuOClqT8L/DH1KZQ3f68 wmxA== X-Gm-Message-State: AAQBX9d9YaWwiD9iliuht2ZUCY+jsIs0ywl6OsdUTvzwlerXGSG2rtxO 0qG8/ltoP/t6tuHtVLNpSrU3aw== X-Google-Smtp-Source: AKy350bZbUwgdfxxvOH7aNNMLToPrjoY0uU/pjuSpPG3PsJDbgm/81WmB/eULaoFO7UA7TtjwHBtSQ== X-Received: by 2002:a17:906:cc5d:b0:932:ac6c:7ef9 with SMTP id mm29-20020a170906cc5d00b00932ac6c7ef9mr142631ejb.22.1680813150619; Thu, 06 Apr 2023 13:32:30 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:30 -0700 (PDT) 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 , Luka Perkov , 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 32/68] hwmon: ltc2992: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:27 +0200 Message-Id: <20230406203103.3011503-33-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ltc2992.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ltc2992.c b/drivers/hwmon/ltc2992.c index 69341de397cb..429a7f5837f0 100644 --- a/drivers/hwmon/ltc2992.c +++ b/drivers/hwmon/ltc2992.c @@ -812,7 +812,7 @@ static const struct hwmon_ops ltc2992_hwmon_ops = { .write = ltc2992_write, }; -static const struct hwmon_channel_info *ltc2992_info[] = { +static const struct hwmon_channel_info * const ltc2992_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_IN_RESET_HISTORY), HWMON_CHANNEL_INFO(in, From patchwork Thu Apr 6 20:30:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD2DAC7618D for ; Thu, 6 Apr 2023 20:34:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240041AbjDFUek (ORCPT ); Thu, 6 Apr 2023 16:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239751AbjDFUeE (ORCPT ); Thu, 6 Apr 2023 16:34:04 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57B69C655 for ; Thu, 6 Apr 2023 13:32:34 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id n21so4224234ejz.4 for ; Thu, 06 Apr 2023 13:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813152; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P/OgocotLPfWzU4xO81UUQj8QQ2q6pWI8hVfYeZF6v0=; b=JCqj6HRrSMiL78IGpyhG0UjUaikqNMwazgPB7//D9j0xI4RWEpwX6e7zkloS07hVoj Z7NkWYi0uQr1lefpl4Enf7aOaTfXl4K7gTo0oZQvclbSmlVcm+NvE/53KiZ7oJuVT54d 7Ujmod9W3PQbhXoZ6TlptoXUE8A/CHIzmgM90D+v5RwmoH5Z6h7dRswpUSITOnxcwsiN R357RMVkbSQDqH1d9kJVG8A1qJbtNOnl+pHVmSiHPchrKxbFDR+ETtYyvFWhw2zlcpu9 ajDSO0UYZRy4a0Fvg0OVJ3rp2FjcwdUMIALu47VnM6hII1RyR+AqEnpQBRiRZKrf2FXA byYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813152; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P/OgocotLPfWzU4xO81UUQj8QQ2q6pWI8hVfYeZF6v0=; b=FDw9cndsdtfYInanaU3M+lXrK4GB3f+QC95x3yOUwyfx+u0B7olrClyAfBI+WgTzLY kZx6e8qav6Y/fyELY+ZVKpbClJt2aOkR1TtHCwChWAl2sywOnINq1QTIJPNSsfsbTRbJ ogBH37zI4PQH7xgFczlpS+/aYKdJ3Gug7nDKAAy4u8t0i8H5CPZdgO9NurZd6BXUr+ZU hOR2e+9fzo/C/sigh58gfztKZj4DAbZ9VJbN3bB7UDg6Xew8MeSOBrootLGiQHZsw7X7 iMe/t2SkpFCtQgsYIT14wCADalcTPSCOGbXvIiTGrdge7UgjPi0KJQn0U6xOrhpJB9D1 VltA== X-Gm-Message-State: AAQBX9d2y0d3C2ZUPVq6XJ7JXrI79KcIdMe38X8rKvLBw3rUdze+9Jje 2DilZ8WOH3Ppl6S9HqhPA9MtcQ== X-Google-Smtp-Source: AKy350bUxfidEPotTu0InM0uokm/nb+xqmD4jxUxuAcr/cC92RMUZ9HUOWdYnRwe1kELJZIqEZsJUQ== X-Received: by 2002:a17:906:190d:b0:939:e870:2b37 with SMTP id a13-20020a170906190d00b00939e8702b37mr117470eje.70.1680813152754; Thu, 06 Apr 2023 13:32:32 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:32 -0700 (PDT) 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 , Luka Perkov , 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 33/68] hwmon: ltc4245: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:28 +0200 Message-Id: <20230406203103.3011503-34-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ltc4245.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ltc4245.c b/drivers/hwmon/ltc4245.c index 57cbaf3b39fa..fb9bc8dbe99b 100644 --- a/drivers/hwmon/ltc4245.c +++ b/drivers/hwmon/ltc4245.c @@ -387,7 +387,7 @@ static umode_t ltc4245_is_visible(const void *_data, } } -static const struct hwmon_channel_info *ltc4245_info[] = { +static const struct hwmon_channel_info * const ltc4245_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT, HWMON_I_INPUT | HWMON_I_MIN_ALARM, From patchwork Thu Apr 6 20:30:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 695F3C77B6E for ; Thu, 6 Apr 2023 20:34:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240137AbjDFUem (ORCPT ); Thu, 6 Apr 2023 16:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239576AbjDFUeI (ORCPT ); Thu, 6 Apr 2023 16:34:08 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0413C658 for ; Thu, 6 Apr 2023 13:32:36 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id 18so4219302ejo.13 for ; Thu, 06 Apr 2023 13:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zeOUixAi/gafQse1TlsC/rFgutjhxjD+isGU2Fyr4iw=; b=qBt12SWqNaZLTSfbFTSlPCwVywTDl2S06oUkfOqIBFP491mmTtMXn+faATcraquTQY qYMwWn2c0DV+KHUKv2P3TF34GbHgLADNWPwHg1g3lCstScUdIkLMaSX6B1SIkNS+gMQ4 3V9zRTZJkkMZPakZEZpYRlrP0PbU6YuxIMuLvcoxKw8OPoW6fmG479okxU0RQKEVmjCL Rl1aoHbslbYgG7+pSvsIsh4YbmXmxIIJCJELAl5iUTskjOoLf/CQyGJQArMmZCJEFwRw wCY3FJ3YPNaKeqrieDpWQst6k++ZhDVt3vJ+FCW0aLks+kb4Uz94C9Q9sQfQzyWFiq+f zLSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zeOUixAi/gafQse1TlsC/rFgutjhxjD+isGU2Fyr4iw=; b=eiCEBKyS6CKJJeOrwHpqaFzkJY71hJC3WqMKCArEIpdfleR3TI9kkBQvxCOgffVHLy ZZLbFdCB3iqz0bRJMj1FgLgIxL9nORY6eZEgq8cu6pqEqwp4aEUNfHi7wfkGEbA5FzJQ C0xZf/T9VjrvqBrRbVNa1iNPBsgtqBmoAovckkkwEWjBPCXio5m/oV1kcN6GJ7ITaU7m EaPvc113XR1r9KNK9sVzHnATtKOtDYHejzFX1jlwkz0JGhNncvjcmMfGhvFir379DS0W kWo18x9wdJbyZf8x8oymxAY4DOLC9XlTSJvjFFbmoQuDqRVbcTWiZUwyubOVd2bRRqJu tSzw== X-Gm-Message-State: AAQBX9eX9Wm0vNQcIi3A3ZoSJqr82KOJUoH2WK3l9kBbGnV09+lZqIkc /tUzRHSsdg1MNOPgKGJn5EjOnQ== X-Google-Smtp-Source: AKy350amqDJbdQRa0fpfvDPRb0xsNyl9DO0v3HM0r1nvweJhx2b/T3k0IXoq84Tob+DOETJqUP8DPw== X-Received: by 2002:a17:906:d04c:b0:937:4001:6eda with SMTP id bo12-20020a170906d04c00b0093740016edamr132439ejb.38.1680813154963; Thu, 06 Apr 2023 13:32:34 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:34 -0700 (PDT) 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 , Luka Perkov , 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 34/68] hwmon: ltq-cputemp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:29 +0200 Message-Id: <20230406203103.3011503-35-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ltq-cputemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ltq-cputemp.c b/drivers/hwmon/ltq-cputemp.c index 019e770d4c0c..08e09a82acab 100644 --- a/drivers/hwmon/ltq-cputemp.c +++ b/drivers/hwmon/ltq-cputemp.c @@ -65,7 +65,7 @@ static umode_t ltq_is_visible(const void *_data, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *ltq_info[] = { +static const struct hwmon_channel_info * const ltq_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98A26C76196 for ; Thu, 6 Apr 2023 20:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240168AbjDFUew (ORCPT ); Thu, 6 Apr 2023 16:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240071AbjDFUeS (ORCPT ); Thu, 6 Apr 2023 16:34:18 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C1E4C652 for ; Thu, 6 Apr 2023 13:32:38 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id j22so4227548ejv.1 for ; Thu, 06 Apr 2023 13:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nZ9T/kpTs3+G1fhFIIx9oKlSAleOFgKL5NAv0H+g2QE=; b=LaBtgceZE8cV6EyJxI34ydQeqmL2JrBiiWsn3ljlZadN0XYLm7dNSfZ8T2h7UC7VSY R9iZRsxoetgZjnylmORQEdDnSHn343WSLF4dOBaoqkVgRW6dtZ2faaea4Kt8geQPfDek /EwK30ybidaDD/kGorrww59rn3A2FTkEbUot+QlP7YzQtM2UpQAcJVut2PtnALeUklta dTsI92V3Uimpw1MV1wMDiPWs61lB7jEYVWygbgNBDtVSGxMsK2MZlztYUo+PXECn4IL/ Ku6OIg7VNoAvLLvyl1xcyz4St3iUxms9yT4uLNi7quHCHlt+jC8Gqr+654B8kSikeLAP FzZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813157; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nZ9T/kpTs3+G1fhFIIx9oKlSAleOFgKL5NAv0H+g2QE=; b=syYY/C+LM5LWTExCO1cJ3XZzBXDJBYUrVkMN2poHKjHsuD0WE7aFDl1bSnZsfuZl1L DQ+ivNZau4bLvaIOdE75D0PM6Hwcw4QThmw/qmG2ozSQ4Tlsq59me9u3sCqTGWZtKqY0 alLuSsvUMteOtTSv85D9k8vns8uKV2MAr3BQpfpg6pD2d2N7FCJykT2dUH61NwfaNT/n v6ST/pMVm5qjS4hNom7r7DPaAznq2CbCtDB2ld6lIUQSGXdJRxy5RDKXLumdOxM2aBnP 5rWayYbhpwZrq6UBcDHyWEeu6Q2g43GJsrG+4YRik7HmhmWd4+jwnMpsiuWtc+hByn6f I2ug== X-Gm-Message-State: AAQBX9ciBX2F485pKVPWiV3WKz/qHcSrKdT9C/+w5di2LguY6/Yyannw KJC/Yno9khL/Y1lh5awWPvyIjA== X-Google-Smtp-Source: AKy350bzSrWUeiQT+mO4fswYuEyv5WnNzuhH3RCOB7Fm42Z4puqXwvSFTWLi8fBKTQEgfQDSFBEQfw== X-Received: by 2002:a17:906:c9d7:b0:933:1b05:8851 with SMTP id hk23-20020a170906c9d700b009331b058851mr170737ejb.16.1680813157439; Thu, 06 Apr 2023 13:32:37 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:36 -0700 (PDT) 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 , Luka Perkov , 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 35/68] hwmon: max127: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:30 +0200 Message-Id: <20230406203103.3011503-36-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max127.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max127.c b/drivers/hwmon/max127.c index 0e21e7e6bbd2..49de1d2be294 100644 --- a/drivers/hwmon/max127.c +++ b/drivers/hwmon/max127.c @@ -285,7 +285,7 @@ static const struct hwmon_ops max127_hwmon_ops = { .write = max127_write, }; -static const struct hwmon_channel_info *max127_info[] = { +static const struct hwmon_channel_info * const max127_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX, HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX, From patchwork Thu Apr 6 20:30:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39B0BC77B6E for ; Thu, 6 Apr 2023 20:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240076AbjDFUe4 (ORCPT ); Thu, 6 Apr 2023 16:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239808AbjDFUeU (ORCPT ); Thu, 6 Apr 2023 16:34:20 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5490DC656 for ; Thu, 6 Apr 2023 13:32:41 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id cw23so4220754ejb.12 for ; Thu, 06 Apr 2023 13:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ppNE/j5dH4h2kt/jgazVM6wfbsekqqd/ryXw3i4bi1M=; b=cQgako4VzcQupeFA8QvrnuOXoQ5KeRWJ1lAGsViufDEK8wPY4Nj5S1aYfozyq6/bU/ NAv+2rf5QIGvFjbb0f7CinR03b1RxkXEQ+lyM5bhcW3jfUupKTOJM0+MLKGeSIi/trsn Eta0Qdrcxi7qmX81Um3MTiLu8D/Gu8SNu90BCc3E270I4w3xH3bfBQvomRv/y3/exaWl 7j99fW+W+fbPgH5dvpuwWqDXwEi22ruCJXJZUvSo1epPn6D7ExpksQ4JsvQ3LxBx/IeP Ax1fkWw7nAUpf2oIGXMHplxMFJSXgv6mqpA136lolg5Ek1FMixre+pHiOjWYNQjLiOr5 a9Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ppNE/j5dH4h2kt/jgazVM6wfbsekqqd/ryXw3i4bi1M=; b=HamigfSukvlxGSQ59t7xtSbRkZqRUJuWnX+REfuZ0ZV9ucCNHYQEBayCD123rETxjJ GhdB0R+PBWu78IsI26dZLeVpszUkqnBxLudYfeDDLmDVM9+1DtkgVFXLRxEEfBcDZWJM KtH7P7Iy6lsa3Q8yEWmJd+KtbWq2QqtaHpJ31v/0eGTjBg71MiIugYeIB7zeO3ZAZMTa dz0sXKWDVDnIs9UH6f9S0Zw9Dh9clHKuok6tRQK2c299HuP6D+z1aEFLv8WG9KEU0G9d 3MEGE5aT4ilasMv14Ieh8rwmCcrBeBC2VHOyLX4JdF7idIngGtDpXhJG4/aE+4ebljJ3 R0IA== X-Gm-Message-State: AAQBX9dRwPazK4TRvZRUIF2a0DMBCfb6Pqq7BYiFFHENVV1SpPGBmxPA lRKzRQ0TJv8pITAD8fBGFZsdWg== X-Google-Smtp-Source: AKy350aghcMvibuC07Vsb1fyHFGf7R3/xbMTh207yfOWRgC42TQZhq0hGqVSSQR51VINp6KB122GeA== X-Received: by 2002:a17:906:f142:b0:948:f810:2960 with SMTP id gw2-20020a170906f14200b00948f8102960mr6266458ejb.22.1680813159668; Thu, 06 Apr 2023 13:32:39 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:39 -0700 (PDT) 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 , Luka Perkov , 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 36/68] hwmon: max31730: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:31 +0200 Message-Id: <20230406203103.3011503-37-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max31730.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max31730.c b/drivers/hwmon/max31730.c index 746a767c9fc6..924333d89ce4 100644 --- a/drivers/hwmon/max31730.c +++ b/drivers/hwmon/max31730.c @@ -248,7 +248,7 @@ static umode_t max31730_is_visible(const void *data, return 0; } -static const struct hwmon_channel_info *max31730_info[] = { +static const struct hwmon_channel_info * const max31730_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA477C7618D for ; Thu, 6 Apr 2023 20:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240118AbjDFUfI (ORCPT ); Thu, 6 Apr 2023 16:35:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239647AbjDFUeh (ORCPT ); Thu, 6 Apr 2023 16:34:37 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02438C67A for ; Thu, 6 Apr 2023 13:32:43 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id jw24so4222061ejc.3 for ; Thu, 06 Apr 2023 13:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yu09rRuq25z5vSgNy1uvwATC8+EvP1JWMz5329MS+70=; b=Er6spU2uAbZju8iYd4yhN6tt1CtOtNQzNFT+yYRHnRP/5jjQX8N7RirDF6DGIA2kQC 83ax5VbrN5FgKerCnIzVQRZMjJexJomDZ6LtuwTtKSTbMwGHrnnNVDHjqvBC/EN8X/Av wjwSqiHeFGRx+IcD7T0WLfTlgtbcbe3vbzRL0pdLBB81Ib+1n7Bs9v01REshrVjYUxiS UhPaAOfCNuKPtZn1KxaQw0H3ZXwUYN1XNJRTjDD/yoH9gkq2ZblWiqGCH1tWaQABrTzS 8aRY2nKPl6D1rzBKjoDf4j6OlLG0MYNalyJU9fGGy0+Oos2YirdAkawRLXpdBI96qpZ5 utOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yu09rRuq25z5vSgNy1uvwATC8+EvP1JWMz5329MS+70=; b=1EOFwaGCeuOAKOM7O/DPlOwwU0l7zUftdy4j3KQ87lxNQkeyg63rLacuLNb53ONU69 AQ7mZYtMGqDNDu2v/snlQiR5GkLHs0G5TKCpHztnxfV2TIugOElBqg0xWzvFFrnVLvKd sklvd0vLFu3B6OZhiLHt9klQQDNF8bfhBVTbcDii80N0ylT1GcwvdTZPsWFkWhy5pGDS xY9j13eaIqk4md3hLw5UHMbLdlmmzBvkweWimDkVP+1mIUrzypM0GshFocAUk3Ao6DwP WWLbiTh1Qra79+KZhzZsf1ln2LPdNj6m4D2q+n/Ob5ODtrrWvmgH8ynDrTJIAdDN2N8c +pKQ== X-Gm-Message-State: AAQBX9cCGX8tfX1E7s8VsnxlQzQ50PAjUNEQ6lJaMJxfv31TiUjLM6mP 1N2OJWqFB3zNxY6PK1K/+LM2Wg== X-Google-Smtp-Source: AKy350Y2U0dgGwrPTwBB5Jgq8qLRVpEH7+smPCxiK1hop12hSkAyhsBX5i0qbVARF5sKL2C+fHU+5A== X-Received: by 2002:a17:906:b206:b0:932:5f7d:db33 with SMTP id p6-20020a170906b20600b009325f7ddb33mr128737ejz.34.1680813162311; Thu, 06 Apr 2023 13:32:42 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:41 -0700 (PDT) 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 , Luka Perkov , 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 37/68] hwmon: max31760: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:32 +0200 Message-Id: <20230406203103.3011503-38-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max31760.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max31760.c b/drivers/hwmon/max31760.c index 06d5f39dc33d..4489110f109c 100644 --- a/drivers/hwmon/max31760.c +++ b/drivers/hwmon/max31760.c @@ -318,7 +318,7 @@ static int max31760_write(struct device *dev, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *max31760_info[] = { +static const struct hwmon_channel_info * const max31760_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(fan, From patchwork Thu Apr 6 20:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0F18C76196 for ; Thu, 6 Apr 2023 20:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240198AbjDFUfR (ORCPT ); Thu, 6 Apr 2023 16:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240128AbjDFUem (ORCPT ); Thu, 6 Apr 2023 16:34:42 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07855CA07 for ; Thu, 6 Apr 2023 13:32:45 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id 11so4217901ejw.0 for ; Thu, 06 Apr 2023 13:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KyU4R7+rVxuTRbNla/dZpdNR+174rHG6NC4kuQr/+W4=; b=ZyrN+KeV4TLYQjcjz4bAGx6FzuzFIaHoyBJ5Q+EncEHnlNTdRX/2/NLxQnpRbIE5PT cDRXu63gYGKnCgiY/+fnjRbbfcJkLjU7J++SdbVaYF16jIHuufsGSww3oXT48GPvvCK0 ejWy2bvrxJbVbkpOEmIcXBq9hcBM4TXyqYaFMFMd3jn9kOIrItEvSCSmwzn4J23gnxNk mFue/Ou4BfYZ+WhEV7A2nwxOuBJjYH34fxSLVVTDGCdxLgtpfR/EvIXNy/iITrRB/WIl qsihOJlw1tqaSVWLyacyyMg4f1GOJ8q0VJo6dAk9UUpZXTInEgb98q0RTNJTJgNUdXSe x3aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KyU4R7+rVxuTRbNla/dZpdNR+174rHG6NC4kuQr/+W4=; b=gs8dMmjkutSK93fFq79uXkh5EQaIJi3QWzS2ngmhwmsdgyjYJp6EINLD4fR165nHqy ehzHmhImnWi/IlnjPIOXn1GZstGqQyC4lG82d8i3TGBbYk2Fksun+tlT7DuhM8yQssZd y4nHWdU0wcVKk4XHZ3me7Og9DriZLYuJHHJuaZJzc/GEz2rmFS9AKR6vVUgmAgicLN4O 3Fm1zbISYr4QHZcxgI0aew3hmZtUVIfRJRGI8ifjk/DtFLaMx0yGzwQzFoWvwLbn7flw qd5EGKNwMlanTG54qkuECSdy9uqr869ZFT7+CVaD7WODU2c6NABEj+cRJH78T7rzZcob AFcw== X-Gm-Message-State: AAQBX9djJHPsr/oj5aSceN9FNmmhL/i/6TMOBTMjhHp48DZscXjfTx+O h1fGL+KzlqlG3T+JAlqA6injJw== X-Google-Smtp-Source: AKy350bii7iEoKCPegCaCQ0FeAKw4HkZrsyHUjyITLNrI94PP6vX0m3OcrNQyQTeoBcZRZQaL0ysFw== X-Received: by 2002:a17:906:399b:b0:932:a056:e77f with SMTP id h27-20020a170906399b00b00932a056e77fmr97415eje.60.1680813164450; Thu, 06 Apr 2023 13:32:44 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:44 -0700 (PDT) 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 , Luka Perkov , 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 38/68] hwmon: max31790: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:33 +0200 Message-Id: <20230406203103.3011503-39-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max31790.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max31790.c b/drivers/hwmon/max31790.c index 20bf5ffadefe..6caba6e8ee8f 100644 --- a/drivers/hwmon/max31790.c +++ b/drivers/hwmon/max31790.c @@ -445,7 +445,7 @@ static umode_t max31790_is_visible(const void *data, } } -static const struct hwmon_channel_info *max31790_info[] = { +static const struct hwmon_channel_info * const max31790_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT | HWMON_F_ENABLE, HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT | HWMON_F_ENABLE, From patchwork Thu Apr 6 20:30:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82287C77B6E for ; Thu, 6 Apr 2023 20:35:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240051AbjDFUfS (ORCPT ); Thu, 6 Apr 2023 16:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239778AbjDFUeo (ORCPT ); Thu, 6 Apr 2023 16:34:44 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78010C67C for ; Thu, 6 Apr 2023 13:32:48 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id lj25so4214581ejb.11 for ; Thu, 06 Apr 2023 13:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KSE59ealLQGHAo2Ku4q/7kg+0lPG4LrulmfGJlBd0ZM=; b=L6tafJzL7iokaK6Im2wvNbxtPfUxPXdCSGsMaWxwbyBHMH5eN00dzBsXBw3wwwJ+MS Wa+82tzfWCZQxNiDXLLYzMwaNxb/pjfdcoy3GOBW8NSS7JlPcK9CCbDgRLwcPugvQ10+ NtdpVlbf0e6cdfJfj4+yzQnfbWNm2zmAZJjViX1ICsqTKQsPsYEwBBeGwSCIGhU9X9QV gva/svt7TM9U4+IK5jGDZZNTWxTDH9+XmxdcZuuGRdm9OqUcg9D/kOUyjOSx1clNGP4N 221m5pE1b+lfaU7G2d8GSdFOU/j3Fl2fS8HO8VXdtw26CBWNrb/PTwylA2dThs96eRhm 49+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KSE59ealLQGHAo2Ku4q/7kg+0lPG4LrulmfGJlBd0ZM=; b=CYVKRlUXHG2SEUzQ3eC9E1Ch89dSF42El+JIhbDX+ZHEK4v50knFWgc0Bmd+pATY0S fWQP/oQLk//LiC/nIzg0gjDtTispybDUfmviR3CX536UgM7Hmem8IY2VIiFQgzM+oTvG TJbw8tlThOmJN4cfX9jIM9v9VbWXLZeFQOE10yN4GpablpG7j6wMLLMoOwxnTWJAWYND VfHOOFfzIxAiQYt+TPzk4EmcHYPDRX6u0FLm75mpz2h7+CWy8RB6f7bVSYenCyFWBQdb EHGUzv6yudj+beqYpFcLSkfo89wF8TxKxMutZgYrwgExt1LsshMSOD+lJ47ybSnCYgay vLvA== X-Gm-Message-State: AAQBX9eQZVRbktU0TibUUfYUkvQa0WD9Y6pKDx42mEbSBRvgqGMXwBv5 yfG0dYh1Rq9UnhhklX7RAqB+3Q== X-Google-Smtp-Source: AKy350aZj+3xCiX8S0pmVurfz0JVDCPQPUB25bHCuItaGxTlBdkkkiR0kaYcyf2W183XNNf/H26hTg== X-Received: by 2002:a17:906:d0d2:b0:933:1134:be1e with SMTP id bq18-20020a170906d0d200b009331134be1emr115611ejb.53.1680813166736; Thu, 06 Apr 2023 13:32:46 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:46 -0700 (PDT) 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 , Luka Perkov , 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 39/68] hwmon: max6620: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:34 +0200 Message-Id: <20230406203103.3011503-40-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max6620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max6620.c b/drivers/hwmon/max6620.c index 202b6438179d..0f277d945ea2 100644 --- a/drivers/hwmon/max6620.c +++ b/drivers/hwmon/max6620.c @@ -401,7 +401,7 @@ max6620_write(struct device *dev, enum hwmon_sensor_types type, u32 attr, return ret; } -static const struct hwmon_channel_info *max6620_info[] = { +static const struct hwmon_channel_info * const max6620_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_DIV | HWMON_F_TARGET | HWMON_F_ALARM, HWMON_F_INPUT | HWMON_F_DIV | HWMON_F_TARGET | HWMON_F_ALARM, From patchwork Thu Apr 6 20:30:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204176 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B612C7618D for ; Thu, 6 Apr 2023 20:35:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240084AbjDFUf2 (ORCPT ); Thu, 6 Apr 2023 16:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240090AbjDFUex (ORCPT ); Thu, 6 Apr 2023 16:34:53 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BCCCC01 for ; Thu, 6 Apr 2023 13:32:50 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id l17so4231992ejp.8 for ; Thu, 06 Apr 2023 13:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vhwGvdUF+7fwd5PhumtiSc1TmIcW9E51JLUOeBF/1GY=; b=b9hQWvBcTnT1CUox4p9xbf1lbIXxG+RcvFWZwo2pgara5YORXkPLb4bfBDlokb2BIx hZhHAKykuzPaPpfC7buTpoVB/PLte4iZ6zHzYuapEjD2RmuvnC+v3fpPc23ZA9tUG8dc UIfJ0ex6pVJ6IzIaABBmX48wcvbnLstESzKnIm+4wCvLvUO/dbh8pAUzkIeU14fR4uPg vi2swW+1RI4Gr1xmu7z3k7iq0UUqugnDJ/4HQD/29BTFtD/te1wziIcY7eUiMrJQjmXT HihL1r7FuCTTouAufUEhJPOUlUNET9+gaWESIsAub9bGEvpwAikPbdjoVpgZEVoJaaVs VOaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vhwGvdUF+7fwd5PhumtiSc1TmIcW9E51JLUOeBF/1GY=; b=qjqrmVTFN83rqLbfiJ7mg/Qxlau/aaBJy0MddtCW1BMMA+tJRXIQBtHCuMflBtkfen +AzisFQvPnAPnveTgFPVTnzaCzvODM7kuwL7DiYo4Bcu3tnj9ajBgTs3wqlsWDLrRK3j 6+1PV6EpmSR5PH/8sVAp8OinC9GemEZWcLOfP88qD//GD0ypXxW6eBcesK+lwV5+POJh ZLFbyWqXY0MJtrVrxyRy5Emv1kLR3mz/en1Sapb3bX3DcxRwGVO5QNOBOLnCyHgcUdjy xbnIa/NqnKHcjmrJcOrwr0ibJLiqVzP7JKXT+Fet7EtuAah88h5j0uGPmTsbUEIWucGD r3vw== X-Gm-Message-State: AAQBX9d5MCQ1Z4HPVi3PbKPY74WEQsb1WPNBdHERdOxhKixmk/s1rVtO vn00fFp0Bj1frIeaJ0fzxa+kyQ== X-Google-Smtp-Source: AKy350YxlEKCAkb5JxJK97l9oFq9lZAvm34QPhLiTrraT2zzuotNJJY0LVHdegiqyqoXFm+OMtm2Vw== X-Received: by 2002:a17:906:d787:b0:920:388c:5c60 with SMTP id pj7-20020a170906d78700b00920388c5c60mr119377ejb.41.1680813168917; Thu, 06 Apr 2023 13:32:48 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:48 -0700 (PDT) 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 , Luka Perkov , 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 40/68] hwmon: max6621: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:35 +0200 Message-Id: <20230406203103.3011503-41-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max6621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max6621.c b/drivers/hwmon/max6621.c index 7821132e17fa..0656eb1e7959 100644 --- a/drivers/hwmon/max6621.c +++ b/drivers/hwmon/max6621.c @@ -449,7 +449,7 @@ static const struct regmap_config max6621_regmap_config = { .num_reg_defaults = ARRAY_SIZE(max6621_regmap_default), }; -static const struct hwmon_channel_info *max6621_info[] = { +static const struct hwmon_channel_info * const max6621_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:30:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17AE5C76196 for ; Thu, 6 Apr 2023 20:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240191AbjDFUfc (ORCPT ); Thu, 6 Apr 2023 16:35:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239905AbjDFUez (ORCPT ); Thu, 6 Apr 2023 16:34:55 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A442BBB80 for ; Thu, 6 Apr 2023 13:32:52 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id lj25so4215283ejb.11 for ; Thu, 06 Apr 2023 13:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680813171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F6xd2tffMesWFruLPM1ew1mkLwGCByzlCgeOCdIQWX8=; b=DwuJ2jedcpUw2EfvPj3qQD1GgTtcC/5Qz7Treay1VS8UPa/mRtH03W7FaWhnMeSVe0 PR60NrOAMxI36GmZqVwHD489+b1fGEZXoaQmBJb8peldCOzclB6kz61j2O9c0o5njqSO y1ufd3TaYUXMgcSkqCXKyd/2sV8X3tI/OrX1pC2epQLCA+MC2DO6GQ44uHahiMQMOtSr zRDVEBJbiCJ/xklk8TCU5UPVgnqvvD4C/TsZNszCuOXo6NLxg+og6J50vyYNv19AS2iV NrFNV1DpY2Qyg0dFBMRhrb5DyS26YyhZ3QxL4x4LK7L737Iqxdg2U52WTqMDM1Rtw5Yf FynA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680813171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F6xd2tffMesWFruLPM1ew1mkLwGCByzlCgeOCdIQWX8=; b=HZLHx4UIYtaT7POFD/ilsZw/Smgt2jT4gk/ACM99sgfkiRoPUTZ5XXnrmQzxnPaAJj nEfs+bTyvaVRsOXNbww4F+LcZn7zm1y9dyyRXpVAJJDHpXRteCzO5uE/T61b6r1oaVry cTdlDLlNKncWbElnLwzXqKtl0PfLQXgAoctyuk1CW0uW8OTBWrhjwaNAk57kO4K9cwq8 d7kgUEfq4KdTUhKo65VCc0otO7wMW/4nOVz7Ixpzi/5v8zjsaVyNrFX2gzOJE22dvXMD ylKIYIRlk3ZuXZ0MH5F5vTpSyGvtOQ1FMZUC6S/owzcxDbTFILZXFiPqTIg+a1if78GJ 2erA== X-Gm-Message-State: AAQBX9cFUb1a3s+Qrla4aXYClYQSTT467uGDSsFdoVUsqCLQmuU+BoYN qgzi822jU5xkwomYF9ajSjvGXw== X-Google-Smtp-Source: AKy350YQQ4yv0Yy1Sm/TSHO4269gRNFhi/NQTvipZiwH14XFvPbV3LSIfiiAbAQvS7lc25T4DePO7Q== X-Received: by 2002:a17:906:a414:b0:905:a46b:a725 with SMTP id l20-20020a170906a41400b00905a46ba725mr6085652ejz.16.1680813171250; Thu, 06 Apr 2023 13:32:51 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:49e6:bb8c:a05b:c4ed]) by smtp.gmail.com with ESMTPSA id s4-20020a1709067b8400b0092bea699124sm1210330ejo.106.2023.04.06.13.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 13:32:50 -0700 (PDT) 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 , Luka Perkov , 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 41/68] hwmon: max6650: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:30:36 +0200 Message-Id: <20230406203103.3011503-42-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/max6650.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index f8d4534ce172..19e2c762ed2d 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -737,7 +737,7 @@ static umode_t max6650_is_visible(const void *_data, return 0; } -static const struct hwmon_channel_info *max6650_info[] = { +static const struct hwmon_channel_info * const max6650_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_DIV | HWMON_F_MIN_ALARM | HWMON_F_MAX_ALARM | HWMON_F_FAULT, From patchwork Thu Apr 6 20:35:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9A41C76196 for ; Thu, 6 Apr 2023 20:40:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239612AbjDFUki (ORCPT ); Thu, 6 Apr 2023 16:40:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240574AbjDFUkQ (ORCPT ); Thu, 6 Apr 2023 16:40:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70B5A12861; Thu, 6 Apr 2023 13:36:09 -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 6255E644AD; Thu, 6 Apr 2023 20:35:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C716C433D2; Thu, 6 Apr 2023 20:35:33 +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 42/68] hwmon: mc34vr500: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:23 +0200 Message-Id: <20230406203530.3012191-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/mc34vr500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/mc34vr500.c b/drivers/hwmon/mc34vr500.c index 6268e973049c..6a7a950a9332 100644 --- a/drivers/hwmon/mc34vr500.c +++ b/drivers/hwmon/mc34vr500.c @@ -138,7 +138,7 @@ static int mc34vr500_read(struct device *dev, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *mc34vr500_info[] = { +static const struct hwmon_channel_info * const mc34vr500_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_MIN_ALARM), HWMON_CHANNEL_INFO(temp, HWMON_T_MAX_ALARM | HWMON_T_CRIT_ALARM | HWMON_T_EMERGENCY_ALARM), From patchwork Thu Apr 6 20:35:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B14BAC77B6C for ; Thu, 6 Apr 2023 20:40:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240025AbjDFUks (ORCPT ); Thu, 6 Apr 2023 16:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240689AbjDFUk2 (ORCPT ); Thu, 6 Apr 2023 16:40:28 -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 A2965AF0F; Thu, 6 Apr 2023 13:36:28 -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 4A79760F91; Thu, 6 Apr 2023 20:36:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2008FC433D2; Thu, 6 Apr 2023 20:36:15 +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 43/68] hwmon: mcp3021: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:24 +0200 Message-Id: <20230406203530.3012191-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/mcp3021.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/mcp3021.c b/drivers/hwmon/mcp3021.c index e093b1998296..a5f7a294f33d 100644 --- a/drivers/hwmon/mcp3021.c +++ b/drivers/hwmon/mcp3021.c @@ -102,7 +102,7 @@ static umode_t mcp3021_is_visible(const void *_data, return 0444; } -static const struct hwmon_channel_info *mcp3021_info[] = { +static const struct hwmon_channel_info * const mcp3021_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT), NULL }; From patchwork Thu Apr 6 20:35:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A61B9C7618D for ; Thu, 6 Apr 2023 20:40:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240304AbjDFUk5 (ORCPT ); Thu, 6 Apr 2023 16:40:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240744AbjDFUkf (ORCPT ); Thu, 6 Apr 2023 16:40:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E67CABDD9; Thu, 6 Apr 2023 13:36:40 -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 723A9648E2; Thu, 6 Apr 2023 20:36:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 355BFC433EF; Thu, 6 Apr 2023 20:36:29 +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 44/68] hwmon: mlxreg: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:25 +0200 Message-Id: <20230406203530.3012191-3-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/mlxreg-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c index 96017cc8da7e..c2a96468c9b4 100644 --- a/drivers/hwmon/mlxreg-fan.c +++ b/drivers/hwmon/mlxreg-fan.c @@ -285,7 +285,7 @@ static char *mlxreg_fan_name[] = { "mlxreg_fan3", }; -static const struct hwmon_channel_info *mlxreg_fan_hwmon_info[] = { +static const struct hwmon_channel_info * const mlxreg_fan_hwmon_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_FAULT, HWMON_F_INPUT | HWMON_F_FAULT, From patchwork Thu Apr 6 20:35:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204198 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0250C76196 for ; Thu, 6 Apr 2023 20:41:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240137AbjDFUlR (ORCPT ); Thu, 6 Apr 2023 16:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240239AbjDFUkz (ORCPT ); Thu, 6 Apr 2023 16:40:55 -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 9C670D53A; Thu, 6 Apr 2023 13:36:52 -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 0E49B644AD; Thu, 6 Apr 2023 20:36:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61FA7C433D2; Thu, 6 Apr 2023 20:36:40 +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 45/68] hwmon: nct7904: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:26 +0200 Message-Id: <20230406203530.3012191-4-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/nct7904.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/nct7904.c b/drivers/hwmon/nct7904.c index ecc5db0011a3..007bae4c7028 100644 --- a/drivers/hwmon/nct7904.c +++ b/drivers/hwmon/nct7904.c @@ -803,7 +803,7 @@ static int nct7904_detect(struct i2c_client *client, return 0; } -static const struct hwmon_channel_info *nct7904_info[] = { +static const struct hwmon_channel_info * const nct7904_info[] = { HWMON_CHANNEL_INFO(in, /* dummy, skipped in is_visible */ HWMON_I_INPUT | HWMON_I_MIN | HWMON_I_MAX | From patchwork Thu Apr 6 20:35:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B7F3C77B6C for ; Thu, 6 Apr 2023 20:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240291AbjDFUlY (ORCPT ); Thu, 6 Apr 2023 16:41:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240322AbjDFUlB (ORCPT ); Thu, 6 Apr 2023 16:41:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02170BDF2; Thu, 6 Apr 2023 13:37:03 -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 82AD264C14; Thu, 6 Apr 2023 20:37:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 126FFC4339B; Thu, 6 Apr 2023 20:36:51 +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 46/68] hwmon: npcm750-pwm: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:27 +0200 Message-Id: <20230406203530.3012191-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/npcm750-pwm-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c index 11a28609da3c..10ed3f4335d4 100644 --- a/drivers/hwmon/npcm750-pwm-fan.c +++ b/drivers/hwmon/npcm750-pwm-fan.c @@ -629,7 +629,7 @@ static umode_t npcm7xx_is_visible(const void *data, } } -static const struct hwmon_channel_info *npcm7xx_info[] = { +static const struct hwmon_channel_info * const npcm7xx_info[] = { HWMON_CHANNEL_INFO(pwm, HWMON_PWM_INPUT, HWMON_PWM_INPUT, From patchwork Thu Apr 6 20:35:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9655CC76196 for ; Thu, 6 Apr 2023 20:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239918AbjDFUlj (ORCPT ); Thu, 6 Apr 2023 16:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239934AbjDFUlL (ORCPT ); Thu, 6 Apr 2023 16:41:11 -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 428A2AF37; Thu, 6 Apr 2023 13:37:15 -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 D06DC6451A; Thu, 6 Apr 2023 20:37:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C2A6C4339E; Thu, 6 Apr 2023 20:37:03 +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 47/68] hwmon: ntc_thermistor: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:28 +0200 Message-Id: <20230406203530.3012191-6-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/ntc_thermistor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c index 9c9e9f4ccb9e..ef75b63f5894 100644 --- a/drivers/hwmon/ntc_thermistor.c +++ b/drivers/hwmon/ntc_thermistor.c @@ -546,7 +546,7 @@ static umode_t ntc_is_visible(const void *data, enum hwmon_sensor_types type, return 0; } -static const struct hwmon_channel_info *ntc_info[] = { +static const struct hwmon_channel_info * const ntc_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_TYPE), NULL From patchwork Thu Apr 6 20:35:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02ADEC77B6C for ; Thu, 6 Apr 2023 20:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239934AbjDFUll (ORCPT ); Thu, 6 Apr 2023 16:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240004AbjDFUlN (ORCPT ); Thu, 6 Apr 2023 16:41:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6C7CB449; Thu, 6 Apr 2023 13:37:26 -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 70B5963F57; Thu, 6 Apr 2023 20:37:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6DAEC4339C; Thu, 6 Apr 2023 20:37:14 +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 48/68] hwmon: nzxt: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:29 +0200 Message-Id: <20230406203530.3012191-7-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/nzxt-kraken2.c | 2 +- drivers/hwmon/nzxt-smart2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/nzxt-kraken2.c b/drivers/hwmon/nzxt-kraken2.c index 89f7ea4f42d4..428c77b5fce5 100644 --- a/drivers/hwmon/nzxt-kraken2.c +++ b/drivers/hwmon/nzxt-kraken2.c @@ -86,7 +86,7 @@ static const struct hwmon_ops kraken2_hwmon_ops = { .read_string = kraken2_read_string, }; -static const struct hwmon_channel_info *kraken2_info[] = { +static const struct hwmon_channel_info * const kraken2_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL), HWMON_CHANNEL_INFO(fan, diff --git a/drivers/hwmon/nzxt-smart2.c b/drivers/hwmon/nzxt-smart2.c index e5edf8071f39..7aa586eb74be 100644 --- a/drivers/hwmon/nzxt-smart2.c +++ b/drivers/hwmon/nzxt-smart2.c @@ -663,7 +663,7 @@ static const struct hwmon_ops nzxt_smart2_hwmon_ops = { .write = nzxt_smart2_hwmon_write, }; -static const struct hwmon_channel_info *nzxt_smart2_channel_info[] = { +static const struct hwmon_channel_info * const nzxt_smart2_channel_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL), From patchwork Thu Apr 6 20:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6184C7618D for ; Thu, 6 Apr 2023 20:41:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240183AbjDFUlw (ORCPT ); Thu, 6 Apr 2023 16:41:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240225AbjDFUlS (ORCPT ); Thu, 6 Apr 2023 16:41:18 -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 1575EB74D; Thu, 6 Apr 2023 13:37:39 -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 A759D60F7E; Thu, 6 Apr 2023 20:37:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CBD2C433EF; Thu, 6 Apr 2023 20:37:26 +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 49/68] hwmon: oxp-sensors: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:35:30 +0200 Message-Id: <20230406203530.3012191-8-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/oxp-sensors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c index 36872b57912a..ae67207030e8 100644 --- a/drivers/hwmon/oxp-sensors.c +++ b/drivers/hwmon/oxp-sensors.c @@ -239,7 +239,7 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type, } /* Known sensors in the OXP EC controllers */ -static const struct hwmon_channel_info *oxp_platform_sensors[] = { +static const struct hwmon_channel_info * const oxp_platform_sensors[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT), HWMON_CHANNEL_INFO(pwm, 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: 13204203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD123C7618D for ; Thu, 6 Apr 2023 20:42:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239902AbjDFUmK (ORCPT ); Thu, 6 Apr 2023 16:42:10 -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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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), From patchwork Thu Apr 6 20:38:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204204 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29816C7618D for ; Thu, 6 Apr 2023 20:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240430AbjDFUmW (ORCPT ); Thu, 6 Apr 2023 16:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240275AbjDFUlw (ORCPT ); Thu, 6 Apr 2023 16:41:52 -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 47C33C160; Thu, 6 Apr 2023 13:38:49 -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 CEECD60FC4; Thu, 6 Apr 2023 20:38:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B237AC4339E; Thu, 6 Apr 2023 20:38:36 +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 51/68] hwmon: powr1220: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:13 +0200 Message-Id: <20230406203821.3012402-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/powr1220.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/powr1220.c b/drivers/hwmon/powr1220.c index f77dc6db31ac..9cb0c2de5219 100644 --- a/drivers/hwmon/powr1220.c +++ b/drivers/hwmon/powr1220.c @@ -248,7 +248,7 @@ powr1220_read(struct device *dev, enum hwmon_sensor_types type, u32 return 0; } -static const struct hwmon_channel_info *powr1220_info[] = { +static const struct hwmon_channel_info * const powr1220_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_INPUT | HWMON_I_HIGHEST | HWMON_I_LABEL, HWMON_I_INPUT | HWMON_I_HIGHEST | HWMON_I_LABEL, From patchwork Thu Apr 6 20:38:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D8BEC77B6C for ; Thu, 6 Apr 2023 20:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239772AbjDFUmg (ORCPT ); Thu, 6 Apr 2023 16:42:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240401AbjDFUmG (ORCPT ); Thu, 6 Apr 2023 16:42:06 -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 9F981C653; Thu, 6 Apr 2023 13:39:00 -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 C321560FC4; Thu, 6 Apr 2023 20:38:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9EF4C433A0; Thu, 6 Apr 2023 20:38:48 +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 52/68] hwmon: raspberrypi: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:14 +0200 Message-Id: <20230406203821.3012402-3-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/raspberrypi-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c index 1650d3b4c26e..65cc52e47db0 100644 --- a/drivers/hwmon/raspberrypi-hwmon.c +++ b/drivers/hwmon/raspberrypi-hwmon.c @@ -87,7 +87,7 @@ static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type, return 0444; } -static const struct hwmon_channel_info *rpi_info[] = { +static const struct hwmon_channel_info * const rpi_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_LCRIT_ALARM), NULL From patchwork Thu Apr 6 20:38:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204206 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 099E5C7618D for ; Thu, 6 Apr 2023 20:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240478AbjDFUmv (ORCPT ); Thu, 6 Apr 2023 16:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240423AbjDFUmJ (ORCPT ); Thu, 6 Apr 2023 16:42:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ABDDB745; Thu, 6 Apr 2023 13:39:12 -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 DB66460F91; Thu, 6 Apr 2023 20:39:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAB5FC4339C; Thu, 6 Apr 2023 20:38:59 +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 53/68] hwmon: sbrmi: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:15 +0200 Message-Id: <20230406203821.3012402-4-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sbrmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sbrmi.c b/drivers/hwmon/sbrmi.c index 8ea5a4d3219f..529f0e766319 100644 --- a/drivers/hwmon/sbrmi.c +++ b/drivers/hwmon/sbrmi.c @@ -265,7 +265,7 @@ static umode_t sbrmi_is_visible(const void *data, return 0; } -static const struct hwmon_channel_info *sbrmi_info[] = { +static const struct hwmon_channel_info * const sbrmi_info[] = { HWMON_CHANNEL_INFO(power, HWMON_P_INPUT | HWMON_P_CAP | HWMON_P_CAP_MAX), NULL From patchwork Thu Apr 6 20:38:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204208 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF3FCC76196 for ; Thu, 6 Apr 2023 20:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240485AbjDFUmw (ORCPT ); Thu, 6 Apr 2023 16:42:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239616AbjDFUmO (ORCPT ); Thu, 6 Apr 2023 16:42:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C60D55A6; Thu, 6 Apr 2023 13:39:23 -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 078F460F1D; Thu, 6 Apr 2023 20:39:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D011FC433D2; Thu, 6 Apr 2023 20:39:11 +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 54/68] hwmon: sbtsi_temp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:16 +0200 Message-Id: <20230406203821.3012402-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sbtsi_temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sbtsi_temp.c b/drivers/hwmon/sbtsi_temp.c index 4c37de846f93..7049d9464ac6 100644 --- a/drivers/hwmon/sbtsi_temp.c +++ b/drivers/hwmon/sbtsi_temp.c @@ -182,7 +182,7 @@ static umode_t sbtsi_is_visible(const void *data, return 0; } -static const struct hwmon_channel_info *sbtsi_info[] = { +static const struct hwmon_channel_info * const sbtsi_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX), NULL From patchwork Thu Apr 6 20:38:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2E04C77B6E for ; Thu, 6 Apr 2023 20:42:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240491AbjDFUmw (ORCPT ); Thu, 6 Apr 2023 16:42:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240096AbjDFUmS (ORCPT ); Thu, 6 Apr 2023 16:42:18 -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 61845B766; Thu, 6 Apr 2023 13:39:34 -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 F217162C36; Thu, 6 Apr 2023 20:39:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E02DEC4339B; Thu, 6 Apr 2023 20:39:22 +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 55/68] hwmon: sch5627: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:17 +0200 Message-Id: <20230406203821.3012402-6-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sch5627.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sch5627.c b/drivers/hwmon/sch5627.c index 25fbbd4c9a2b..1bbda3b05532 100644 --- a/drivers/hwmon/sch5627.c +++ b/drivers/hwmon/sch5627.c @@ -379,7 +379,7 @@ static const struct hwmon_ops sch5627_ops = { .write = sch5627_write, }; -static const struct hwmon_channel_info *sch5627_info[] = { +static const struct hwmon_channel_info * const sch5627_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT | HWMON_T_FAULT, From patchwork Thu Apr 6 20:38:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0F65C77B73 for ; Thu, 6 Apr 2023 20:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240136AbjDFUmy (ORCPT ); Thu, 6 Apr 2023 16:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240362AbjDFUmT (ORCPT ); Thu, 6 Apr 2023 16:42:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB96BBA4; Thu, 6 Apr 2023 13:39:45 -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 67EFC60F91; Thu, 6 Apr 2023 20:39:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECE2DC433D2; Thu, 6 Apr 2023 20:39:33 +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 56/68] hwmon: sht4x: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:18 +0200 Message-Id: <20230406203821.3012402-7-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sht4x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sht4x.c b/drivers/hwmon/sht4x.c index 13e042927bf8..5bbe09135ab9 100644 --- a/drivers/hwmon/sht4x.c +++ b/drivers/hwmon/sht4x.c @@ -214,7 +214,7 @@ static int sht4x_hwmon_write(struct device *dev, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *sht4x_info[] = { +static const struct hwmon_channel_info * const sht4x_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), HWMON_CHANNEL_INFO(humidity, HWMON_H_INPUT), From patchwork Thu Apr 6 20:38:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DAF5C77B6C for ; Thu, 6 Apr 2023 20:42:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240372AbjDFUmz (ORCPT ); Thu, 6 Apr 2023 16:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239966AbjDFUmU (ORCPT ); Thu, 6 Apr 2023 16:42:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69CF659EA; Thu, 6 Apr 2023 13:39: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 0121E62C36; Thu, 6 Apr 2023 20:39:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53B61C4339E; Thu, 6 Apr 2023 20:39:45 +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 57/68] hwmon: sl28cpld: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:19 +0200 Message-Id: <20230406203821.3012402-8-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sl28cpld-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sl28cpld-hwmon.c b/drivers/hwmon/sl28cpld-hwmon.c index 9ce4899a81a5..e020f25c9300 100644 --- a/drivers/hwmon/sl28cpld-hwmon.c +++ b/drivers/hwmon/sl28cpld-hwmon.c @@ -67,7 +67,7 @@ static int sl28cpld_hwmon_read(struct device *dev, return 0; } -static const struct hwmon_channel_info *sl28cpld_hwmon_info[] = { +static const struct hwmon_channel_info * const sl28cpld_hwmon_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT), NULL }; From patchwork Thu Apr 6 20:38:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A32EEC77B70 for ; Thu, 6 Apr 2023 20:42:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240195AbjDFUm4 (ORCPT ); Thu, 6 Apr 2023 16:42:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240366AbjDFUmV (ORCPT ); Thu, 6 Apr 2023 16:42:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C555C19D; Thu, 6 Apr 2023 13:40:08 -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 55E0164C39; Thu, 6 Apr 2023 20:40:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02BC3C4339C; Thu, 6 Apr 2023 20:39:56 +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 58/68] hwmon: smpro: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:20 +0200 Message-Id: <20230406203821.3012402-9-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/smpro-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/smpro-hwmon.c b/drivers/hwmon/smpro-hwmon.c index a76c49dd8438..d320adbd47f4 100644 --- a/drivers/hwmon/smpro-hwmon.c +++ b/drivers/hwmon/smpro-hwmon.c @@ -385,7 +385,7 @@ static umode_t smpro_is_visible(const void *data, enum hwmon_sensor_types type, return 0444; } -static const struct hwmon_channel_info *smpro_info[] = { +static const struct hwmon_channel_info * const smpro_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL, HWMON_T_INPUT | HWMON_T_LABEL | HWMON_T_CRIT, From patchwork Thu Apr 6 20:38:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204212 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B01EC7618D for ; Thu, 6 Apr 2023 20:43:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240529AbjDFUnB (ORCPT ); Thu, 6 Apr 2023 16:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240174AbjDFUmV (ORCPT ); Thu, 6 Apr 2023 16:42:21 -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 4AA8559D5; Thu, 6 Apr 2023 13:40: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 B19E764C39; Thu, 6 Apr 2023 20:40:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42E77C433EF; Thu, 6 Apr 2023 20:40:08 +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 59/68] hwmon: sparx5-temp: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:38:21 +0200 Message-Id: <20230406203821.3012402-10-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sparx5-temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sparx5-temp.c b/drivers/hwmon/sparx5-temp.c index 04fd8505e5d6..d640904939cd 100644 --- a/drivers/hwmon/sparx5-temp.c +++ b/drivers/hwmon/sparx5-temp.c @@ -86,7 +86,7 @@ static umode_t s5_is_visible(const void *_data, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *s5_info[] = { +static const struct hwmon_channel_info * const s5_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), NULL From patchwork Thu Apr 6 20:40:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2733DC76196 for ; Thu, 6 Apr 2023 20:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240547AbjDFUnT (ORCPT ); Thu, 6 Apr 2023 16:43:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240330AbjDFUmf (ORCPT ); Thu, 6 Apr 2023 16:42:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0021BA260; Thu, 6 Apr 2023 13:40:43 -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 54E7F64C39; Thu, 6 Apr 2023 20:40:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B771BC433EF; Thu, 6 Apr 2023 20:40:31 +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 60/68] hwmon: sy7636a: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:19 +0200 Message-Id: <20230406204027.3012532-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/sy7636a-hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/sy7636a-hwmon.c b/drivers/hwmon/sy7636a-hwmon.c index 6dd9c2a0f0e0..ed110884786b 100644 --- a/drivers/hwmon/sy7636a-hwmon.c +++ b/drivers/hwmon/sy7636a-hwmon.c @@ -52,7 +52,7 @@ static const struct hwmon_ops sy7636a_hwmon_ops = { .read = sy7636a_read, }; -static const struct hwmon_channel_info *sy7636a_info[] = { +static const struct hwmon_channel_info * const sy7636a_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT), NULL From patchwork Thu Apr 6 20:40:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E8CAC77B6E for ; Thu, 6 Apr 2023 20:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240559AbjDFUne (ORCPT ); Thu, 6 Apr 2023 16:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240193AbjDFUmz (ORCPT ); Thu, 6 Apr 2023 16:42:55 -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 D775BAF1E; Thu, 6 Apr 2023 13:40:54 -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 3383364C45; Thu, 6 Apr 2023 20:40:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E0A3C4339B; Thu, 6 Apr 2023 20:40:43 +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 61/68] hwmon: tmp102: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:20 +0200 Message-Id: <20230406204027.3012532-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/tmp102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c index 2bf496a62206..e271556efe0b 100644 --- a/drivers/hwmon/tmp102.c +++ b/drivers/hwmon/tmp102.c @@ -141,7 +141,7 @@ static umode_t tmp102_is_visible(const void *data, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *tmp102_info[] = { +static const struct hwmon_channel_info * const tmp102_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:40:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47FE1C7618D for ; Thu, 6 Apr 2023 20:43:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240471AbjDFUnr (ORCPT ); Thu, 6 Apr 2023 16:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240464AbjDFUna (ORCPT ); Thu, 6 Apr 2023 16:43:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26AE1BDCF; Thu, 6 Apr 2023 13:41:06 -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 97C5564C3A; Thu, 6 Apr 2023 20:41:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24D5FC4339E; Thu, 6 Apr 2023 20:40:53 +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 62/68] hwmon: tmp103: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:21 +0200 Message-Id: <20230406204027.3012532-3-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/tmp103.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp103.c b/drivers/hwmon/tmp103.c index 56d5cbf36a45..d257bb91fc69 100644 --- a/drivers/hwmon/tmp103.c +++ b/drivers/hwmon/tmp103.c @@ -119,7 +119,7 @@ static umode_t tmp103_is_visible(const void *data, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *tmp103_info[] = { +static const struct hwmon_channel_info * const tmp103_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:40:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 334F4C7618D for ; Thu, 6 Apr 2023 20:44:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240446AbjDFUoJ (ORCPT ); Thu, 6 Apr 2023 16:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240447AbjDFUnn (ORCPT ); Thu, 6 Apr 2023 16:43:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288D5CC1F; Thu, 6 Apr 2023 13:41:17 -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 AFB376487A; Thu, 6 Apr 2023 20:41:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AE7BC433D2; Thu, 6 Apr 2023 20:41:05 +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 63/68] hwmon: tmp108: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:22 +0200 Message-Id: <20230406204027.3012532-4-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/tmp108.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp108.c b/drivers/hwmon/tmp108.c index acb4ba750b09..43784c289a9e 100644 --- a/drivers/hwmon/tmp108.c +++ b/drivers/hwmon/tmp108.c @@ -272,7 +272,7 @@ static umode_t tmp108_is_visible(const void *data, enum hwmon_sensor_types type, } } -static const struct hwmon_channel_info *tmp108_info[] = { +static const struct hwmon_channel_info * const tmp108_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:40:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E79ADC7618D for ; Thu, 6 Apr 2023 20:44:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240563AbjDFUoW (ORCPT ); Thu, 6 Apr 2023 16:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240502AbjDFUnx (ORCPT ); Thu, 6 Apr 2023 16:43:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15070BDC8; Thu, 6 Apr 2023 13:41:28 -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 78C6164C52; Thu, 6 Apr 2023 20:41:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92F0EC4339C; Thu, 6 Apr 2023 20:41:16 +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 64/68] hwmon: tmp464: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:23 +0200 Message-Id: <20230406204027.3012532-5-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/tmp464.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp464.c b/drivers/hwmon/tmp464.c index 7814f39bd1a3..9213a493a590 100644 --- a/drivers/hwmon/tmp464.c +++ b/drivers/hwmon/tmp464.c @@ -589,7 +589,7 @@ static const struct hwmon_ops tmp464_ops = { .write = tmp464_write, }; -static const struct hwmon_channel_info *tmp464_info[] = { +static const struct hwmon_channel_info * const tmp464_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:40:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E4E3C7618D for ; Thu, 6 Apr 2023 20:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240574AbjDFUof (ORCPT ); Thu, 6 Apr 2023 16:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240473AbjDFUoQ (ORCPT ); Thu, 6 Apr 2023 16:44:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E16B8D31A; Thu, 6 Apr 2023 13:41:38 -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 7364864C45; Thu, 6 Apr 2023 20:41:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C86CC4339E; Thu, 6 Apr 2023 20:41:27 +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 65/68] hwmon: tmp513: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:24 +0200 Message-Id: <20230406204027.3012532-6-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/tmp513.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp513.c b/drivers/hwmon/tmp513.c index 7d5f7441aceb..0693eaee054f 100644 --- a/drivers/hwmon/tmp513.c +++ b/drivers/hwmon/tmp513.c @@ -491,7 +491,7 @@ static umode_t tmp51x_is_visible(const void *_data, return 0; } -static const struct hwmon_channel_info *tmp51x_info[] = { +static const struct hwmon_channel_info * const tmp51x_info[] = { HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_CRIT | HWMON_T_CRIT_ALARM | HWMON_T_CRIT_HYST, From patchwork Thu Apr 6 20:40:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 027D9C76196 for ; Thu, 6 Apr 2023 20:44:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240305AbjDFUoo (ORCPT ); Thu, 6 Apr 2023 16:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239651AbjDFUo3 (ORCPT ); Thu, 6 Apr 2023 16:44:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1ADBD527; Thu, 6 Apr 2023 13:41:49 -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 6839264C58; Thu, 6 Apr 2023 20:41:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59D3CC4339C; Thu, 6 Apr 2023 20:41:38 +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 66/68] hwmon: tps23861: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:25 +0200 Message-Id: <20230406204027.3012532-7-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/tps23861.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tps23861.c b/drivers/hwmon/tps23861.c index 68c77c493270..85a75f551148 100644 --- a/drivers/hwmon/tps23861.c +++ b/drivers/hwmon/tps23861.c @@ -341,7 +341,7 @@ static int tps23861_read_string(struct device *dev, return 0; } -static const struct hwmon_channel_info *tps23861_info[] = { +static const struct hwmon_channel_info * const tps23861_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), HWMON_CHANNEL_INFO(temp, From patchwork Thu Apr 6 20:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204220 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3538C76196 for ; Thu, 6 Apr 2023 20:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240326AbjDFUpD (ORCPT ); Thu, 6 Apr 2023 16:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240595AbjDFUop (ORCPT ); Thu, 6 Apr 2023 16:44:45 -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 D2693E1A2; Thu, 6 Apr 2023 13:42:00 -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 5DB8D64C7C; Thu, 6 Apr 2023 20:42:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51134C433EF; Thu, 6 Apr 2023 20:41:49 +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 67/68] hwmon: w83627ehf: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:26 +0200 Message-Id: <20230406204027.3012532-8-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/w83627ehf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 939d4c35e713..fe960c0a624f 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1640,7 +1640,7 @@ static const struct hwmon_ops w83627ehf_ops = { .write = w83627ehf_write, }; -static const struct hwmon_channel_info *w83627ehf_info[] = { +static const struct hwmon_channel_info * const w83627ehf_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_ALARM | HWMON_F_DIV | HWMON_F_INPUT | HWMON_F_MIN, HWMON_F_ALARM | HWMON_F_DIV | HWMON_F_INPUT | HWMON_F_MIN, From patchwork Thu Apr 6 20:40:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13204221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D7C4C7618D for ; Thu, 6 Apr 2023 20:45:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240484AbjDFUpU (ORCPT ); Thu, 6 Apr 2023 16:45:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240496AbjDFUpD (ORCPT ); Thu, 6 Apr 2023 16:45:03 -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 AB6F3E381; Thu, 6 Apr 2023 13:42:12 -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 B45986476F; Thu, 6 Apr 2023 20:42:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63752C4339B; Thu, 6 Apr 2023 20:42:00 +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 68/68] hwmon: w83773g: constify pointers to hwmon_channel_info Date: Thu, 6 Apr 2023 22:40:27 +0200 Message-Id: <20230406204027.3012532-9-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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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/w83773g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/w83773g.c b/drivers/hwmon/w83773g.c index 88d11dc5feb9..8dbcd05abd9a 100644 --- a/drivers/hwmon/w83773g.c +++ b/drivers/hwmon/w83773g.c @@ -233,7 +233,7 @@ static umode_t w83773_is_visible(const void *data, enum hwmon_sensor_types type, return 0; } -static const struct hwmon_channel_info *w83773_info[] = { +static const struct hwmon_channel_info * const w83773_info[] = { HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL), HWMON_CHANNEL_INFO(temp,