From patchwork Thu May 11 17:56: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: 92772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp4567042vqo; Thu, 11 May 2023 11:03:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Flu7TEYwi3czBuzh86jRh2ti/Oe20nAWcOXuSZGaRXlFU1L7TnHyoyhKFTF7ZV0FOa4j/ X-Received: by 2002:a17:903:1110:b0:1aa:ff41:31a7 with SMTP id n16-20020a170903111000b001aaff4131a7mr29247916plh.13.1683828181258; Thu, 11 May 2023 11:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683828181; cv=none; d=google.com; s=arc-20160816; b=EaTPl/EE97QFAiFrw6ceM3VHZiouvW+Nh47q1vh4cC7xjjf/YedKK8+uUTXdKIU9yQ XmySMWhSqZYgYfYlR3iX6P6jtFB3asgA0pnGCV1sIsmFyMDonhk3YhvykNMAWT/aJNe0 5Ox/dfg8bff8wmcJINSQVhGP/r0OpYhLTGWW1tViYGMIHP9D4J9eC2QeWwzb4gC/q7DV Hps9anacznd2sy3A0bxRJ+OIRmQqR6Erg2Jv30yhzh93+9noSXhah3osDPUyYydzzzhD 4im4Rg2/r8zDEKh7Wm1MKYmiABWvR+OIyI0IY69YOxh9Em2Ng1fW3J8vxCcaTu+JIuF+ jKNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q4a17TISsnqon0g+WQRIQyVdDs2e1Fg+Zm3O/wPYErY=; b=aQ+cxTnhZD+hYksJNkwJHOkPBSTBnoWFnwffJh+lQArgsK6YNB/5Ng0OADFrAS+oME CIrhJERt+AjiRSgbUrHnUvr0zp08cxKFKPBK29EJIzhdYjlYxdMH3/IOgJykWXjYoGg4 +reNSQK6ahHaaL99R28XGG0WRUYnJ5h0zcYh9TGkdI/XIGDNIJ+6Hmum5xIoSJAhSfFx +19HITrNeYLuxx9BCJFcQr+mJDvu1o/k6azAb5wf/QeM57TGtFlGFgf402BjpuNk00i+ c+O/v36ns4GkAgQ3v8trphsPJ6g321fYIzQMcKLirfar1MQPXZ+/K3PYRPUkw1emkhbV 9qXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GXsjlxue; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a17090301ca00b001acb38aa5a5si5309233plh.351.2023.05.11.11.02.38; Thu, 11 May 2023 11:03:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GXsjlxue; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239121AbjEKR5P (ORCPT + 99 others); Thu, 11 May 2023 13:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239098AbjEKR5B (ORCPT ); Thu, 11 May 2023 13:57:01 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDBF39EE2 for ; Thu, 11 May 2023 10:56:35 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-50db91640d3so5803322a12.0 for ; Thu, 11 May 2023 10:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683827793; x=1686419793; 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=q4a17TISsnqon0g+WQRIQyVdDs2e1Fg+Zm3O/wPYErY=; b=GXsjlxueZtUNIfkf6oGD/FcTZpnCIjbTcTERLvsQtrBLOTgy+z00Kf8zmc3vdJ5IyF iLI5pnYBycGu2HGO6bzBCvbdeIFnuRzVAQuadRA+rheeMI4XdeSyH+eShOoutBlnDy7x o1MusSHhMG/B+wdui0JSKDCPZ5Xkp7w2CiZy46wwRNn0VWPp0OlUjO7oReLD+p6gniR3 XSeN88X9viE8Tvvzt3r6WwHUls3nlPi0kVmE8CCV+av6Hv8ANf5pKPr78b7dTnEmbaCo MVZN9Jh1Z/pnOpjPjajGaMgy5iytYG4nN0aU91fO7965QW6ApT2FB8b0zHI2B1XM5sIA ABcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683827793; x=1686419793; 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=q4a17TISsnqon0g+WQRIQyVdDs2e1Fg+Zm3O/wPYErY=; b=kHEZQxJ+dv/ycYKRPu6Gl+dq5a/goKGDpBM6Ew2vcPbCTLZGaV6imqXMfHEtyfW5X4 hTD4FAk7t4g3tIe6QXpl2JXPnuTJ5K6V3/Seu/se4K/5jg4D33SgvQM/4iJJm9Zp7Wdf hDm4Pf+rCWvBEMkfUORylzwaDayDlsLZw8PuGK9GbiN1C2nFDqIbbNFK7F31Z3n8eLZ/ mi/3lVBlez37lKZALB3ZBFuO848qAAyYe28Gd+V07XAHRr9HAZGMfZMkdgTnumBexjLy ELQGPb/9wk3fbfTFywRZdfxGraYDLvDIHXrKyIxfbpj3TnDUDZxEbN6s0QqE51CpzTWi kZ7Q== X-Gm-Message-State: AC+VfDwpzRTm3x5x86PPM90bQ71nKiyWcQ+V8fTvXp8EYBAGOvhA5Tck nhBjjQjZyICSywf3FnXFWiCE1w== X-Received: by 2002:aa7:d945:0:b0:50b:e1d1:91cb with SMTP id l5-20020aa7d945000000b0050be1d191cbmr18072796eds.8.1683827793643; Thu, 11 May 2023 10:56:33 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:d7cd:1be6:f89d:7218]) by smtp.gmail.com with ESMTPSA id l14-20020a056402028e00b00506addaaab0sm3099202edv.32.2023.05.11.10.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 10:56:33 -0700 (PDT) From: Krzysztof Kozlowski To: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Hans de Goede , Mark Gross , Jeremy Soller , System76 Product Development , Azael Avalos , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RESEND PATCH 3/4] platform/x86: system76: constify pointers to hwmon_channel_info Date: Thu, 11 May 2023 19:56:26 +0200 Message-Id: <20230511175627.282246-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230511175627.282246-1-krzysztof.kozlowski@linaro.org> References: <20230511175627.282246-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765621818909790000?= X-GMAIL-MSGID: =?utf-8?q?1765621818909790000?= Statically allocated array of pointers to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski --- drivers/platform/x86/system76_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/system76_acpi.c b/drivers/platform/x86/system76_acpi.c index 97f5a8255b91..fc4708fa6ebe 100644 --- a/drivers/platform/x86/system76_acpi.c +++ b/drivers/platform/x86/system76_acpi.c @@ -581,7 +581,7 @@ static const struct hwmon_ops thermal_ops = { }; // Allocate up to 8 fans and temperatures -static const struct hwmon_channel_info *thermal_channel_info[] = { +static const struct hwmon_channel_info * const thermal_channel_info[] = { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT | HWMON_F_LABEL, HWMON_F_INPUT | HWMON_F_LABEL,