All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: max9271: Add header include guards to max9271.h
@ 2022-01-02 22:48 Laurent Pinchart
  2022-01-02 23:21 ` Kieran Bingham
  2022-01-09 15:35 ` Jacopo Mondi
  0 siblings, 2 replies; 4+ messages in thread
From: Laurent Pinchart @ 2022-01-02 22:48 UTC (permalink / raw)
  To: linux-media
  Cc: linux-renesas-soc, Jacopo Mondi, Kieran Bingham, Niklas Söderlund

Protect against multiple inclusions of the max9271.h header with include
guards.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/media/i2c/max9271.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/media/i2c/max9271.h b/drivers/media/i2c/max9271.h
index dc5e4e70ba6f..0bf1d40811eb 100644
--- a/drivers/media/i2c/max9271.h
+++ b/drivers/media/i2c/max9271.h
@@ -8,6 +8,9 @@
  * Copyright (C) 2015 Cogent Embedded, Inc.
  */
 
+#ifndef __MEDIA_I2C_MAX9271_H__
+#define __MEDIA_I2C_MAX9271_H__
+
 #include <linux/i2c.h>
 
 #define MAX9271_DEFAULT_ADDR	0x40
@@ -231,3 +234,5 @@ int max9271_set_deserializer_address(struct max9271_device *dev, u8 addr);
  * Return 0 on success or a negative error code on failure
  */
 int max9271_set_translation(struct max9271_device *dev, u8 source, u8 dest);
+
+#endif /* __MEDIA_I2C_MAX9271_H__ */
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] media: i2c: max9271: Add header include guards to max9271.h
  2022-01-02 22:48 [PATCH] media: i2c: max9271: Add header include guards to max9271.h Laurent Pinchart
@ 2022-01-02 23:21 ` Kieran Bingham
  2022-01-10 10:50   ` Geert Uytterhoeven
  2022-01-09 15:35 ` Jacopo Mondi
  1 sibling, 1 reply; 4+ messages in thread
From: Kieran Bingham @ 2022-01-02 23:21 UTC (permalink / raw)
  To: Laurent Pinchart, linux-media
  Cc: linux-renesas-soc, Jacopo Mondi, Niklas Söderlund

Hi Laurent,

Quoting Laurent Pinchart (2022-01-02 22:48:03)
> Protect against multiple inclusions of the max9271.h header with include
> guards.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/media/i2c/max9271.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/media/i2c/max9271.h b/drivers/media/i2c/max9271.h
> index dc5e4e70ba6f..0bf1d40811eb 100644
> --- a/drivers/media/i2c/max9271.h
> +++ b/drivers/media/i2c/max9271.h
> @@ -8,6 +8,9 @@
>   * Copyright (C) 2015 Cogent Embedded, Inc.
>   */
>  
> +#ifndef __MEDIA_I2C_MAX9271_H__
> +#define __MEDIA_I2C_MAX9271_H__
> +

I wonder if we'll ever #pragma once outside of /tools/testing/selftests.

Still, these are indeed missing and should be added.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>



>  #include <linux/i2c.h>
>  
>  #define MAX9271_DEFAULT_ADDR   0x40
> @@ -231,3 +234,5 @@ int max9271_set_deserializer_address(struct max9271_device *dev, u8 addr);
>   * Return 0 on success or a negative error code on failure
>   */
>  int max9271_set_translation(struct max9271_device *dev, u8 source, u8 dest);
> +
> +#endif /* __MEDIA_I2C_MAX9271_H__ */
> -- 
> Regards,
> 
> Laurent Pinchart
>

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

* Re: [PATCH] media: i2c: max9271: Add header include guards to max9271.h
  2022-01-02 22:48 [PATCH] media: i2c: max9271: Add header include guards to max9271.h Laurent Pinchart
  2022-01-02 23:21 ` Kieran Bingham
@ 2022-01-09 15:35 ` Jacopo Mondi
  1 sibling, 0 replies; 4+ messages in thread
From: Jacopo Mondi @ 2022-01-09 15:35 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-media, linux-renesas-soc, Jacopo Mondi, Kieran Bingham,
	Niklas Söderlund

Hi Laurent,

On Mon, Jan 03, 2022 at 12:48:03AM +0200, Laurent Pinchart wrote:
> Protect against multiple inclusions of the max9271.h header with include
> guards.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Indeed
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks
  j

> ---
>  drivers/media/i2c/max9271.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/media/i2c/max9271.h b/drivers/media/i2c/max9271.h
> index dc5e4e70ba6f..0bf1d40811eb 100644
> --- a/drivers/media/i2c/max9271.h
> +++ b/drivers/media/i2c/max9271.h
> @@ -8,6 +8,9 @@
>   * Copyright (C) 2015 Cogent Embedded, Inc.
>   */
>
> +#ifndef __MEDIA_I2C_MAX9271_H__
> +#define __MEDIA_I2C_MAX9271_H__
> +
>  #include <linux/i2c.h>
>
>  #define MAX9271_DEFAULT_ADDR	0x40
> @@ -231,3 +234,5 @@ int max9271_set_deserializer_address(struct max9271_device *dev, u8 addr);
>   * Return 0 on success or a negative error code on failure
>   */
>  int max9271_set_translation(struct max9271_device *dev, u8 source, u8 dest);
> +
> +#endif /* __MEDIA_I2C_MAX9271_H__ */
> --
> Regards,
>
> Laurent Pinchart
>

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

* Re: [PATCH] media: i2c: max9271: Add header include guards to max9271.h
  2022-01-02 23:21 ` Kieran Bingham
@ 2022-01-10 10:50   ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2022-01-10 10:50 UTC (permalink / raw)
  To: Kieran Bingham
  Cc: Laurent Pinchart, Linux Media Mailing List, Linux-Renesas,
	Jacopo Mondi, Niklas Söderlund

Hi Kieran,

On Mon, Jan 3, 2022 at 8:48 AM Kieran Bingham
<kieran.bingham+renesas@ideasonboard.com> wrote:
> I wonder if we'll ever #pragma once outside of /tools/testing/selftests.

Probably not anytime soon
https://lore.kernel.org/all/CAHk-=wi13+FLcRo4zmnRUmmY=AAns-Yd5NR_mVdcAd6ZrPq2fA@mail.gmail.com/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2022-01-10 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02 22:48 [PATCH] media: i2c: max9271: Add header include guards to max9271.h Laurent Pinchart
2022-01-02 23:21 ` Kieran Bingham
2022-01-10 10:50   ` Geert Uytterhoeven
2022-01-09 15:35 ` Jacopo Mondi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.