Re: [PATCH v14 08/10] mfd: Add new driver for MAX77705 PMIC

From: Dzmitry Sankouski
Date: Mon Jan 13 2025 - 12:42:50 EST


чт, 9 янв. 2025 г. в 15:21, Lee Jones <lee@xxxxxxxxxx>:
>
> On Wed, 08 Jan 2025, Dzmitry Sankouski wrote:
>
> > Add the core MFD driver for max77705 PMIC. Drivers for sub-devices
> > will be added in subsequent patches.
> >
> > Signed-off-by: Dzmitry Sankouski <dsankouski@xxxxxxxxx>
> >
(...)
> > +
> > + /* Unmask interrupts from all blocks in interrupt source register */
> > + ret = regmap_update_bits(max77705->regmap,
> > + MAX77705_PMIC_REG_INTSRC_MASK,
> > + MAX77705_SRC_IRQ_ALL, (unsigned int)~MAX77705_SRC_IRQ_ALL);
>
> I don't see this much. Are you sure the cast is required?
>

BIT macro creates a 64 bit constant value. When inverted,
it overruns 32 bit value, causing compiler to warn on conversion like
`warning: conversion from ‘long unsigned int’ to ‘unsigned int’`.


--
Best regards and thanks for review,
Dzmitry