[PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer

Tali Perry tali.perry1 at gmail.com
Mon Feb 16 20:09:31 AEDT 2026


Thanks!

Reviewed-by: Tali Perry <tali.perry1 at gmail.com>

On Mon, Feb 16, 2026 at 10:58 AM Krzysztof Kozlowski <
krzysztof.kozlowski at oss.qualcomm.com> wrote:

> Pointers should use NULL instead of explicit '0', as pointed out by
> sparse:
>
>   i2c-npcm7xx.c:1387:61: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at oss.qualcomm.com>
> ---
>  drivers/i2c/busses/i2c-npcm7xx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-npcm7xx.c
> b/drivers/i2c/busses/i2c-npcm7xx.c
> index 8b7e15240fb0..f667a873b81e 100644
> --- a/drivers/i2c/busses/i2c-npcm7xx.c
> +++ b/drivers/i2c/busses/i2c-npcm7xx.c
> @@ -1384,7 +1384,7 @@ static irqreturn_t npcm_i2c_int_slave_handler(struct
> npcm_i2c *bus)
>                  */
>                 bus->operation = I2C_NO_OPER;
>                 bus->own_slave_addr = 0xFF;
> -               i2c_slave_event(bus->slave, I2C_SLAVE_STOP, 0);
> +               i2c_slave_event(bus->slave, I2C_SLAVE_STOP, NULL);
>                 iowrite8(NPCM_I2CST_SLVSTP, bus->reg + NPCM_I2CST);
>                 if (bus->fifo_use) {
>                         npcm_i2c_clear_fifo_int(bus);
> --
> 2.51.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20260216/4bca959d/attachment.htm>


More information about the openbmc mailing list