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,