{"id":14736,"url":"https://patchwork.libcamera.org/api/1.1/patches/14736/?format=json","web_url":"https://patchwork.libcamera.org/patch/14736/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211123224015.3619282-6-kieran.bingham@ideasonboard.com>","date":"2021-11-23T22:40:05","name":"[libcamera-devel,05/15] libcamera: pipeline: Convert to pragma once","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"94b58e5660691558c5ed1cf5da0ca0567431421b","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":{"id":11,"url":"https://patchwork.libcamera.org/api/1.1/users/11/?format=json","username":"kbingham","first_name":"Kieran","last_name":"Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/14736/mbox/","series":[{"id":2749,"url":"https://patchwork.libcamera.org/api/1.1/series/2749/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2749","date":"2021-11-23T22:40:00","name":"Use pragma once","version":1,"mbox":"https://patchwork.libcamera.org/series/2749/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14736/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14736/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6A4C5C324F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Nov 2021 22:40:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DB37860228;\n\tTue, 23 Nov 2021 23:40:28 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B72DA6038A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Nov 2021 23:40:21 +0100 (CET)","from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6FD13A1B;\n\tTue, 23 Nov 2021 23:40:21 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IfDO2htM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637707221;\n\tbh=pgZdaC2G2P1FufhZ9UkcnPJoaNTQ+viy0oVrkhq5eHE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=IfDO2htMTh6WKlExjB/0Zo2vZaDxBI5bcdq5JM4EcyDYK2zjyYMQf0vvVBuKiBdYb\n\t6TDbtuysgKtpAoAUzHdBlpphriz25G7un1XjM1Te8aUrHRxtiRHYKwuNZnq/QzvDLI\n\tIpwhlcFbHv6aNgcQ+lM8zxx9B8d2YNnIOd5I/eMQ=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 23 Nov 2021 22:40:05 +0000","Message-Id":"<20211123224015.3619282-6-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20211123224015.3619282-1-kieran.bingham@ideasonboard.com>","References":"<20211123224015.3619282-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 05/15] libcamera: pipeline: Convert to\n\tpragma once","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Remove the verbose #ifndef/#define/#endif pattern for maintaining\nheader idempotency, and replace it with a simple #pragma once.\n\nThis simplifies the headers, and prevents redundant changes when\nheader files get moved.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/pipeline/ipu3/cio2.h              | 6 ++----\n src/libcamera/pipeline/ipu3/frames.h            | 6 ++----\n src/libcamera/pipeline/ipu3/imgu.h              | 6 ++----\n src/libcamera/pipeline/raspberrypi/dma_heaps.h  | 6 ++----\n src/libcamera/pipeline/raspberrypi/rpi_stream.h | 6 ++----\n src/libcamera/pipeline/rkisp1/rkisp1_path.h     | 6 ++----\n src/libcamera/pipeline/simple/converter.h       | 5 +----\n 7 files changed, 13 insertions(+), 28 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h\nindex ba8f0052c5b3..68504a2da89d 100644\n--- a/src/libcamera/pipeline/ipu3/cio2.h\n+++ b/src/libcamera/pipeline/ipu3/cio2.h\n@@ -4,8 +4,8 @@\n  *\n  * cio2.h - Intel IPU3 CIO2\n  */\n-#ifndef __LIBCAMERA_PIPELINE_IPU3_CIO2_H__\n-#define __LIBCAMERA_PIPELINE_IPU3_CIO2_H__\n+\n+#pragma once\n \n #include <memory>\n #include <queue>\n@@ -75,5 +75,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ */\ndiff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\nindex 614701e2da2d..6e3cb915c7b8 100644\n--- a/src/libcamera/pipeline/ipu3/frames.h\n+++ b/src/libcamera/pipeline/ipu3/frames.h\n@@ -4,8 +4,8 @@\n  *\n  * frames.h - Intel IPU3 Frames helper\n  */\n-#ifndef __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__\n-#define __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__\n+\n+#pragma once\n \n #include <map>\n #include <memory>\n@@ -65,5 +65,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ */\ndiff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h\nindex 2b28d912676a..0af4dd8ae86e 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.h\n+++ b/src/libcamera/pipeline/ipu3/imgu.h\n@@ -4,8 +4,8 @@\n  *\n  * imgu.h - Intel IPU3 ImgU\n  */\n-#ifndef __LIBCAMERA_PIPELINE_IPU3_IMGU_H__\n-#define __LIBCAMERA_PIPELINE_IPU3_IMGU_H__\n+\n+#pragma once\n \n #include <memory>\n #include <string>\n@@ -122,5 +122,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ */\ndiff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h\nindex 79f39c5153d3..38dfc242c0b9 100644\n--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h\n+++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h\n@@ -4,8 +4,8 @@\n  *\n  * dma_heaps.h - Helper class for dma-heap allocations.\n  */\n-#ifndef __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__\n-#define __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__\n+\n+#pragma once\n \n #include <libcamera/file_descriptor.h>\n \n@@ -28,5 +28,3 @@ private:\n } /* namespace RPi */\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ */\ndiff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\nindex f1ac715f4221..d6f49d34f8c8 100644\n--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n@@ -4,8 +4,8 @@\n  *\n  * rpi_stream.h - Raspberry Pi device stream abstraction class.\n  */\n-#ifndef __LIBCAMERA_PIPELINE_RPI_STREAM_H__\n-#define __LIBCAMERA_PIPELINE_RPI_STREAM_H__\n+\n+#pragma once\n \n #include <queue>\n #include <string>\n@@ -177,5 +177,3 @@ public:\n } /* namespace RPi */\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_RPI_STREAM_H__ */\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex 91757600ccdc..f3f1ae391d65 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -4,8 +4,8 @@\n  *\n  * rkisp1path.h - Rockchip ISP1 path helper\n  */\n-#ifndef __LIBCAMERA_PIPELINE_RKISP1_PATH_H__\n-#define __LIBCAMERA_PIPELINE_RKISP1_PATH_H__\n+\n+#pragma once\n \n #include <memory>\n #include <vector>\n@@ -84,5 +84,3 @@ public:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ */\ndiff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h\nindex 276a2a291c21..f0ebe2e0123d 100644\n--- a/src/libcamera/pipeline/simple/converter.h\n+++ b/src/libcamera/pipeline/simple/converter.h\n@@ -5,8 +5,7 @@\n  * converter.h - Format converter for simple pipeline handler\n  */\n \n-#ifndef __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__\n-#define __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__\n+#pragma once\n \n #include <functional>\n #include <map>\n@@ -97,5 +96,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ */\n","prefixes":["libcamera-devel","05/15"]}