Re: [PATCH RFC net-next v2 08/18] net: pse-pd: Add support for reporting events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 31 Oct 2024 23:00:48 +0100
Andrew Lunn <andrew@xxxxxxx> wrote:

> > +static unsigned long pse_to_regulator_notifs(unsigned long notifs)
> > +{
> > +	switch (notifs) {
> > +	case ETHTOOL_C33_PSE_EVENT_OVER_CURRENT:
> > +		return REGULATOR_EVENT_OVER_CURRENT;
> > +	case ETHTOOL_C33_PSE_EVENT_OVER_TEMP:
> > +		return REGULATOR_EVENT_OVER_TEMP;
> > +	}
> > +	return 0;
> > +}  
> 
> 
> https://elixir.bootlin.com/linux/v6.11.5/source/include/uapi/regulator/regulator.h#L36
> 
>  * NOTE: These events can be OR'ed together when passed into handler.
> 
> ETHTOOL_C33_PSE_EVENT_OVER_* are also bits which could be OR'ed
> together, so is this function correct?

You are right, thanks for seeing it.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux