From patchwork Tue Sep 28 09:22:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zev Weiss X-Patchwork-Id: 12522247 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37556C4167E for ; Tue, 28 Sep 2021 09:30:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E0DC61157 for ; Tue, 28 Sep 2021 09:30:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239975AbhI1Jc0 (ORCPT ); Tue, 28 Sep 2021 05:32:26 -0400 Received: from thorn.bewilderbeest.net ([71.19.156.171]:38705 "EHLO thorn.bewilderbeest.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239840AbhI1JcV (ORCPT ); Tue, 28 Sep 2021 05:32:21 -0400 X-Greylist: delayed 412 seconds by postgrey-1.27 at vger.kernel.org; Tue, 28 Sep 2021 05:32:21 EDT Received: from hatter.bewilderbeest.net (71-212-29-146.tukw.qwest.net [71.212.29.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id 38C3AB9A; Tue, 28 Sep 2021 02:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1632821031; bh=MaatuTopxFRwd+v9AqgpfMo/zpN+SQAapzidyO5ZjZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVO3HJL8ABpv2F2GdvQT5gVPwA4SjdeylWnhmWUkwMQ2EQboVAYrPPKSzCw2nn489 7nCP6YMy39mBJe4EWwNb4Pg61AgrVFfFDJynss+KQWg/rgSKjhulxs0MeISZXd7waU A1Yn3tkCIFqcwGQAgrS2oUnmNJbeuuiNVWe8hAH0= From: Zev Weiss To: Guenter Roeck Cc: Zev Weiss , Jean Delvare , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff Date: Tue, 28 Sep 2021 02:22:38 -0700 Message-Id: <20210928092242.30036-5-zev@bewilderbeest.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210928092242.30036-1-zev@bewilderbeest.net> References: <20210928092242.30036-1-zev@bewilderbeest.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Maintaining this manually is error prone (there are currently only five chips supported, not six); gcc can do it for us automatically. Signed-off-by: Zev Weiss Fixes: 666c14906b49 ("hwmon: (pmbus/lm25066) Drop support for LM25063") --- drivers/hwmon/pmbus/lm25066.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c index 4dc003ff859e..1ff5407b6977 100644 --- a/drivers/hwmon/pmbus/lm25066.c +++ b/drivers/hwmon/pmbus/lm25066.c @@ -51,7 +51,7 @@ struct __coeff { #define PSC_CURRENT_IN_L (PSC_NUM_CLASSES) #define PSC_POWER_L (PSC_NUM_CLASSES + 1) -static struct __coeff lm25066_coeff[6][PSC_NUM_CLASSES + 2] = { +static struct __coeff lm25066_coeff[][PSC_NUM_CLASSES + 2] = { [lm25056] = { [PSC_VOLTAGE_IN] = { .m = 16296,