From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl
Subject: [PATCH 6/6] smiapp: Avoid fall-through in switch
Date: Mon, 19 Aug 2019 15:47:28 +0300 [thread overview]
Message-ID: <20190819124728.10511-7-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20190819124728.10511-1-sakari.ailus@linux.intel.com>
Remove switch fall-through cases in the driver.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 76d7d204ec17..61de8cdccc4b 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -1674,13 +1674,12 @@ static void smiapp_propagate(struct v4l2_subdev *subdev,
sensor->binning_vertical = 1;
}
}
- /* Fall through */
- case V4L2_SEL_TGT_COMPOSE:
- *crops[SMIAPP_PAD_SRC] = *comp;
break;
default:
- BUG();
+ WARN_ON(1);
+ return;
}
+ *crops[SMIAPP_PAD_SRC] = *comp;
}
static const struct smiapp_csi_data_format
@@ -2062,7 +2061,7 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
&& sensor->limits[SMIAPP_LIMIT_SCALING_CAPABILITY]
!= SMIAPP_SCALING_CAPABILITY_NONE)
return 0;
- /* Fall through */
+ return -EINVAL;
default:
return -EINVAL;
}
@@ -2716,7 +2715,7 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev)
case 180:
hwcfg->module_board_orient =
SMIAPP_MODULE_BOARD_ORIENT_180;
- /* Fall through */
+ break;
case 0:
break;
default:
--
2.20.1
next prev parent reply other threads:[~2019-08-19 12:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 12:47 [PATCH 0/6] Provide a serialisation mechanism for subdev ops Sakari Ailus
2019-08-19 12:47 ` [PATCH 1/6] v4l: subdev: Set sd->devnode before registering the subdev Sakari Ailus
2019-09-12 12:40 ` Hans Verkuil
2019-08-19 12:47 ` [PATCH 2/6] v4l: subdev: Provide a locking scheme for subdev operations Sakari Ailus
2019-09-12 13:11 ` Hans Verkuil
2019-09-12 13:24 ` Sakari Ailus
2019-08-19 12:47 ` [PATCH 3/6] smiapp: Error handling cleanups and fixes Sakari Ailus
2019-08-19 12:47 ` [PATCH 4/6] smiapp: Rely on V4L2 sub-device framework to do the locking Sakari Ailus
2019-08-19 12:47 ` [PATCH 5/6] smiapp: Remove the active field from sensor's struct Sakari Ailus
2019-08-19 12:47 ` Sakari Ailus [this message]
2019-09-12 13:17 ` [PATCH 6/6] smiapp: Avoid fall-through in switch Hans Verkuil
2019-09-13 6:50 ` Sakari Ailus
2019-09-13 6:47 ` [PATCH v2 " Sakari Ailus
2019-09-13 6:52 ` Hans Verkuil
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=20190819124728.10511-7-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).