lkml.org 
[lkml]   [2021]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] regulators: irq_helper: Provide helper for trivial IRQ notifications
On Mon, Nov 22, 2021 at 01:04:12PM +0200, Matti Vaittinen wrote:
> Provide a generic map_event helper for regulators which have a notification
> IRQ with single, well defined purpose. Eg, IRQ always indicates exactly one
> event for exactly one regulator device. For such IRQs the mapping is
> trivial.

...

> + int err = rid->states[0].possible_errs;

I would rather make it unsigned, but anyway...

> + !single_bit_set(err, sizeof(err) * 8)))

hweight32() seems suitable here.


--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2021-11-22 12:50    [W:0.092 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site