public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Mehdi Djait <mehdi.djait@linux.intel.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	laurent.pinchart@ideasonboard.com
Subject: [raw2rgbpnm PATCH v4 01/11] Add explicit switch fallthrough notation
Date: Tue, 10 Mar 2026 10:46:07 +0200	[thread overview]
Message-ID: <20260310084615.1183141-2-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20260310084615.1183141-1-sakari.ailus@linux.intel.com>

Use __attribute__((fallthrough)) instead of a comment this is taking
place, to make modern GCC happy.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 raw2rgbpnm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/raw2rgbpnm.c b/raw2rgbpnm.c
index baeb8efc863a..5df3ff7ab31d 100644
--- a/raw2rgbpnm.c
+++ b/raw2rgbpnm.c
@@ -362,7 +362,7 @@ static void raw_to_rgb(const struct format_info *info,
 
 	case V4L2_PIX_FMT_NV21:
 		color_pos = 0;
-		/* fallthrough */
+		__attribute__((fallthrough));
 	case V4L2_PIX_FMT_NV12:
 		src_luma = src;
 		src_chroma = &src[src_width * src_height];
@@ -576,7 +576,7 @@ static void raw_to_rgb(const struct format_info *info,
 	case V4L2_PIX_FMT_SRGGB10:
 		if (raw_layout_to_grbg(info, src, src_width, src_height, src_stride))
 			error("Can't convert RAW layout to GRBG");
-		/* fallthrough */
+		__attribute__((fallthrough));
 	case V4L2_PIX_FMT_SGRBG16:
 	case V4L2_PIX_FMT_SGRBG14:
 	case V4L2_PIX_FMT_SGRBG12:
@@ -620,7 +620,7 @@ static void raw_to_rgb(const struct format_info *info,
 	case V4L2_PIX_FMT_SRGGB8:
 		if (raw_layout_to_grbg(info, src, src_width, src_height, src_stride))
 			error("Can't convert RAW layout to GRBG");
-		/* fallthrough */
+		__attribute__((fallthrough));
 	case V4L2_PIX_FMT_SGRBG8:
 		buf = malloc(src_width * src_height * 3);
 		if (buf==NULL) error("out of memory");
@@ -688,7 +688,7 @@ static void raw_to_rgb(const struct format_info *info,
 
 	case V4L2_PIX_FMT_BGR24:
 		swaprb = !swaprb;
-		/* fallthrough */
+		__attribute__((fallthrough));
 	case V4L2_PIX_FMT_RGB24:
 		for (src_y = 0, dst_y = 0; dst_y < src_height; src_y++, dst_y++) {
 			for (src_x = 0, dst_x = 0; dst_x < src_width; ) {
-- 
2.47.3


  reply	other threads:[~2026-03-10  8:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10  8:46 [raw2rgbpnm PATCH v4 00/11] 10-bit packed raw support, other fixes and improvements Sakari Ailus
2026-03-10  8:46 ` Sakari Ailus [this message]
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 02/11] Add compiler options to avoid warnings Sakari Ailus
2026-03-16 14:28   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 03/11] Add 10-bit CSI-2 packed format support Sakari Ailus
2026-03-16 14:38   ` Laurent Pinchart
2026-03-16 19:00     ` Sakari Ailus
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 04/11] Support long options and improve help text Sakari Ailus
2026-03-16 14:41   ` Laurent Pinchart
2026-03-17  9:49     ` Sakari Ailus
2026-03-17 10:49       ` Laurent Pinchart
2026-03-17 13:17         ` Sakari Ailus
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 05/11] Add "help" for listing formats and de-Bayering algos, document it Sakari Ailus
2026-03-16 14:44   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 06/11] The program has been called raw2rgbpnm, not yuv_to_rgbpnm awhile now Sakari Ailus
2026-03-16 14:46   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 07/11] Arrange headers alphabetically Sakari Ailus
2026-03-16 14:47   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 08/11] Add --stride (-S) option for setting stride Sakari Ailus
2026-03-16 14:50   ` Laurent Pinchart
2026-03-10  8:46 ` [raw2rgbpnm PATCH v4 09/11] Improve input validation Sakari Ailus
2026-03-16 14:54   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260310084615.1183141-2-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mehdi.djait@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox