On Thu, Apr 10, 2025 at 11:21 AM Ivan Vecera <ivec...@redhat.com> wrote:
> On 10. 04. 25 9:17 dop., Krzysztof Kozlowski wrote:
> > On 09/04/2025 16:42, Ivan Vecera wrote:

...

> >> +    WARN_ON(idx >= (_num));                                         \
> >
> > No need to cause panic reboots. Either review your code so this does not
> > happen or properly handle.
>
> Ack, will replace by
>
> if (idx >= (_num))
>         return -EINVAL

If these functions are called under regmap_read() / regmap_write() the
above is a dead code. Otherwise you need to configure regmap correctly
(in accordance with the HW registers layout and their abilities to be
written or read or reserved or special combinations).

-- 
With Best Regards,
Andy Shevchenko

Reply via email to