From patchwork Tue Nov 23 22:40:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 14736 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6A4C5C324F for ; Tue, 23 Nov 2021 22:40:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB37860228; Tue, 23 Nov 2021 23:40:28 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IfDO2htM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B72DA6038A for ; Tue, 23 Nov 2021 23:40:21 +0100 (CET) Received: from Monstersaurus.ksquared.org.uk.beta.tailscale.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6FD13A1B; Tue, 23 Nov 2021 23:40:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1637707221; bh=pgZdaC2G2P1FufhZ9UkcnPJoaNTQ+viy0oVrkhq5eHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IfDO2htMTh6WKlExjB/0Zo2vZaDxBI5bcdq5JM4EcyDYK2zjyYMQf0vvVBuKiBdYb 6TDbtuysgKtpAoAUzHdBlpphriz25G7un1XjM1Te8aUrHRxtiRHYKwuNZnq/QzvDLI IpwhlcFbHv6aNgcQ+lM8zxx9B8d2YNnIOd5I/eMQ= From: Kieran Bingham To: libcamera devel 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 Subject: [libcamera-devel] [PATCH 05/15] libcamera: pipeline: Convert to pragma once X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Remove the verbose #ifndef/#define/#endif pattern for maintaining header idempotency, and replace it with a simple #pragma once. This simplifies the headers, and prevents redundant changes when header files get moved. Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/ipu3/cio2.h | 6 ++---- src/libcamera/pipeline/ipu3/frames.h | 6 ++---- src/libcamera/pipeline/ipu3/imgu.h | 6 ++---- src/libcamera/pipeline/raspberrypi/dma_heaps.h | 6 ++---- src/libcamera/pipeline/raspberrypi/rpi_stream.h | 6 ++---- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 6 ++---- src/libcamera/pipeline/simple/converter.h | 5 +---- 7 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h index ba8f0052c5b3..68504a2da89d 100644 --- a/src/libcamera/pipeline/ipu3/cio2.h +++ b/src/libcamera/pipeline/ipu3/cio2.h @@ -4,8 +4,8 @@ * * cio2.h - Intel IPU3 CIO2 */ -#ifndef __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ -#define __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ + +#pragma once #include #include @@ -75,5 +75,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ */ diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h index 614701e2da2d..6e3cb915c7b8 100644 --- a/src/libcamera/pipeline/ipu3/frames.h +++ b/src/libcamera/pipeline/ipu3/frames.h @@ -4,8 +4,8 @@ * * frames.h - Intel IPU3 Frames helper */ -#ifndef __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ -#define __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ + +#pragma once #include #include @@ -65,5 +65,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ */ diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h index 2b28d912676a..0af4dd8ae86e 100644 --- a/src/libcamera/pipeline/ipu3/imgu.h +++ b/src/libcamera/pipeline/ipu3/imgu.h @@ -4,8 +4,8 @@ * * imgu.h - Intel IPU3 ImgU */ -#ifndef __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ -#define __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ + +#pragma once #include #include @@ -122,5 +122,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ */ diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h index 79f39c5153d3..38dfc242c0b9 100644 --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h @@ -4,8 +4,8 @@ * * dma_heaps.h - Helper class for dma-heap allocations. */ -#ifndef __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ -#define __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ + +#pragma once #include @@ -28,5 +28,3 @@ private: } /* namespace RPi */ } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ */ diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h index f1ac715f4221..d6f49d34f8c8 100644 --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h @@ -4,8 +4,8 @@ * * rpi_stream.h - Raspberry Pi device stream abstraction class. */ -#ifndef __LIBCAMERA_PIPELINE_RPI_STREAM_H__ -#define __LIBCAMERA_PIPELINE_RPI_STREAM_H__ + +#pragma once #include #include @@ -177,5 +177,3 @@ public: } /* namespace RPi */ } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_RPI_STREAM_H__ */ diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h index 91757600ccdc..f3f1ae391d65 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h @@ -4,8 +4,8 @@ * * rkisp1path.h - Rockchip ISP1 path helper */ -#ifndef __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ -#define __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ + +#pragma once #include #include @@ -84,5 +84,3 @@ public: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ */ diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h index 276a2a291c21..f0ebe2e0123d 100644 --- a/src/libcamera/pipeline/simple/converter.h +++ b/src/libcamera/pipeline/simple/converter.h @@ -5,8 +5,7 @@ * converter.h - Format converter for simple pipeline handler */ -#ifndef __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ -#define __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ +#pragma once #include #include @@ -97,5 +96,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ */