Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [bug report] hwmon: (pmbus/tps25990) Add initial support
@ 2024-12-06  9:37 Dan Carpenter
  2024-12-06  9:45 ` Jerome Brunet
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2024-12-06  9:37 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: linux-hwmon

Hello Jerome Brunet,

Commit 6fbd1e5d9876 ("hwmon: (pmbus/tps25990) Add initial support")
from Dec 2, 2024 (linux-next), leads to the following Smatch static
checker warning:

	drivers/hwmon/pmbus/tps25990.c:134 tps25990_read_word_data()
	warn: ignoring unreachable code.

drivers/hwmon/pmbus/tps25990.c
    127         case PMBUS_VIRT_READ_IIN_AVG:
    128                 ret = pmbus_read_word_data(client, page, phase,
    129                                            TPS25990_READ_IIN_AVG);
    130                 break;
    131 
    132         case PMBUS_VIRT_READ_IIN_MAX:
    133                 return TPS25990_READ_IIN_PEAK;
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

--> 134                 ret = pmbus_read_word_data(client, page, phase,
    135                                            TPS25990_READ_IIN_PEAK);

Is this supposed to be stubbed out?

    136                 break;
    137 
    138         case PMBUS_VIRT_READ_TEMP_AVG:
    139                 ret = pmbus_read_word_data(client, page, phase,
    140                                            TPS25990_READ_TEMP_AVG);

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] hwmon: (pmbus/tps25990) Add initial support
  2024-12-06  9:37 [bug report] hwmon: (pmbus/tps25990) Add initial support Dan Carpenter
@ 2024-12-06  9:45 ` Jerome Brunet
  0 siblings, 0 replies; 2+ messages in thread
From: Jerome Brunet @ 2024-12-06  9:45 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-hwmon

On Fri 06 Dec 2024 at 12:37, Dan Carpenter <dan.carpenter@linaro.org> wrote:

> Hello Jerome Brunet,
>
> Commit 6fbd1e5d9876 ("hwmon: (pmbus/tps25990) Add initial support")
> from Dec 2, 2024 (linux-next), leads to the following Smatch static
> checker warning:
>
> 	drivers/hwmon/pmbus/tps25990.c:134 tps25990_read_word_data()
> 	warn: ignoring unreachable code.
>
> drivers/hwmon/pmbus/tps25990.c
>     127         case PMBUS_VIRT_READ_IIN_AVG:
>     128                 ret = pmbus_read_word_data(client, page, phase,
>     129                                            TPS25990_READ_IIN_AVG);
>     130                 break;
>     131 
>     132         case PMBUS_VIRT_READ_IIN_MAX:
>     133                 return TPS25990_READ_IIN_PEAK;
>                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> --> 134                 ret = pmbus_read_word_data(client, page, phase,
>     135                                            TPS25990_READ_IIN_PEAK);
>
> Is this supposed to be stubbed out?

Thanks for the report Dan, silly mistake indeed.
This has already been taken care of by Guenter.

>
>     136                 break;
>     137 
>     138         case PMBUS_VIRT_READ_TEMP_AVG:
>     139                 ret = pmbus_read_word_data(client, page, phase,
>     140                                            TPS25990_READ_TEMP_AVG);
>
> regards,
> dan carpenter

-- 
Jerome

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-06  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06  9:37 [bug report] hwmon: (pmbus/tps25990) Add initial support Dan Carpenter
2024-12-06  9:45 ` Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox