public inbox for openbmc@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer
@ 2026-02-16  8:58 Krzysztof Kozlowski
  2026-02-16  9:09 ` Tali Perry
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-16  8:58 UTC (permalink / raw)
  To: Andrew Jeffery, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Andi Shyti, openbmc,
	linux-i2c, linux-kernel
  Cc: Krzysztof Kozlowski

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@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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer
  2026-02-16  8:58 [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer Krzysztof Kozlowski
@ 2026-02-16  9:09 ` Tali Perry
  2026-02-17  9:27 ` Paul Menzel
  2026-03-19 23:15 ` Andi Shyti
  2 siblings, 0 replies; 4+ messages in thread
From: Tali Perry @ 2026-02-16  9:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrew Jeffery, Avi Fishman, Tomer Maimon, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Andi Shyti, openbmc, linux-i2c,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

Thanks!

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

On Mon, Feb 16, 2026 at 10:58 AM Krzysztof Kozlowski <
krzysztof.kozlowski@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@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
>
>

[-- Attachment #2: Type: text/html, Size: 2072 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer
  2026-02-16  8:58 [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer Krzysztof Kozlowski
  2026-02-16  9:09 ` Tali Perry
@ 2026-02-17  9:27 ` Paul Menzel
  2026-03-19 23:15 ` Andi Shyti
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Menzel @ 2026-02-17  9:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrew Jeffery, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Andi Shyti, openbmc,
	linux-i2c, linux-kernel

Dear Krzysztof,


Thank you for your patch.

Am 16.02.26 um 09:58 schrieb Krzysztof Kozlowski:
> 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@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);

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer
  2026-02-16  8:58 [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer Krzysztof Kozlowski
  2026-02-16  9:09 ` Tali Perry
  2026-02-17  9:27 ` Paul Menzel
@ 2026-03-19 23:15 ` Andi Shyti
  2 siblings, 0 replies; 4+ messages in thread
From: Andi Shyti @ 2026-03-19 23:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andrew Jeffery, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, openbmc, linux-i2c,
	linux-kernel

Hi Krzysztof,

On Mon, Feb 16, 2026 at 09:58:26AM +0100, Krzysztof Kozlowski 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@oss.qualcomm.com>

merged to i2c/i2c-host.

Thanks,
Andi


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-19 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16  8:58 [PATCH] i2c: npcm7xx: Use NULL instead of 0 for pointer Krzysztof Kozlowski
2026-02-16  9:09 ` Tali Perry
2026-02-17  9:27 ` Paul Menzel
2026-03-19 23:15 ` Andi Shyti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox