Re: [PATCH v9 6/9] mfd: Add new driver for MAX77705 PMIC

From: Dzmitry Sankouski
Date: Tue Dec 03 2024 - 06:28:46 EST


пн, 2 дек. 2024 г. в 13:23, Krzysztof Kozlowski <krzk@xxxxxxxxxx>:
>
> On 02/12/2024 10:47, Dzmitry Sankouski wrote:
> > Add the core MFD driver for max77705 PMIC. We define five sub-devices
> > for which the drivers 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);
>
>
> The need for cast comes from some compiler warning?
>

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