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 A27BEC433FE for ; Mon, 15 Nov 2021 18:04:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81A1863253 for ; Mon, 15 Nov 2021 18:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239605AbhKOSDk (ORCPT ); Mon, 15 Nov 2021 13:03:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:50902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236755AbhKORYb (ORCPT ); Mon, 15 Nov 2021 12:24:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 51DCA6327F; Mon, 15 Nov 2021 17:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636996664; bh=3sgeG0kGAgrQ70OzAaenhsDA5fEgOJlGc4rY0p1yVFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OtpHyJbPt4lKqAktZjFrCm+MpcN1gXwUMKMSunheKxmpGJsVnfxUhwzIxNejpIEcF UK/GfXhl9HmHCi3mtPKGdxcb2XDBQfJ9UIlbmZ7aKeRXnPZEO+wzvoMDcA7ef02xUr UCTFz2mf8Kvn4Z6GzpAr/kP1V6u5Yvdb1up7cV1c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zev Weiss , Guenter Roeck , Sasha Levin Subject: [PATCH 5.4 223/355] hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff Date: Mon, 15 Nov 2021 18:02:27 +0100 Message-Id: <20211115165320.972996479@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165313.549179499@linuxfoundation.org> References: <20211115165313.549179499@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zev Weiss [ Upstream commit b7931a7b0e0df4d2a25fedd895ad32c746b77bc1 ] 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") Link: https://lore.kernel.org/r/20210928092242.30036-5-zev@bewilderbeest.net Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- 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 eba043c59fc73..41c4bbb9c0572 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, -- 2.33.0