diff mbox series

[4/8] hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff

Message ID 20210928092242.30036-5-zev@bewilderbeest.net (mailing list archive)
State Accepted
Headers show
Series hwmon: (pmbus/lm25066) Configurable sense resistor, other cleanups | expand

Commit Message

Zev Weiss Sept. 28, 2021, 9:22 a.m. UTC
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 <zev@bewilderbeest.net>
Fixes: 666c14906b49 ("hwmon: (pmbus/lm25066) Drop support for LM25063")
---
 drivers/hwmon/pmbus/lm25066.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck Oct. 8, 2021, 1:47 p.m. UTC | #1
On Tue, Sep 28, 2021 at 02:22:38AM -0700, Zev Weiss wrote:
> 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 <zev@bewilderbeest.net>
> Fixes: 666c14906b49 ("hwmon: (pmbus/lm25066) Drop support for LM25063")

Applied.

Thanks,
Guenter

> ---
>  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,
diff mbox series

Patch

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,