media: sum6i: Fix a few coding style issues

Make checkpatch.pl happier by running it on strict mode and
using the --fix-inline to solve some issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab 2018-11-23 05:00:41 -05:00
parent 5cc7522d89
commit 34d833a91a
4 changed files with 11 additions and 12 deletions

View File

@ -279,7 +279,6 @@ static enum csi_output_fmt get_csi_output_format(struct sun6i_csi_dev *sdev,
static enum csi_input_seq get_csi_input_seq(struct sun6i_csi_dev *sdev, static enum csi_input_seq get_csi_input_seq(struct sun6i_csi_dev *sdev,
u32 mbus_code, u32 pixformat) u32 mbus_code, u32 pixformat)
{ {
switch (pixformat) { switch (pixformat) {
case V4L2_PIX_FMT_HM12: case V4L2_PIX_FMT_HM12:
case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV12:
@ -543,7 +542,7 @@ int sun6i_csi_update_config(struct sun6i_csi *csi,
{ {
struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi);
if (config == NULL) if (!config)
return -EINVAL; return -EINVAL;
memcpy(&csi->config, config, sizeof(csi->config)); memcpy(&csi->config, config, sizeof(csi->config));
@ -644,7 +643,7 @@ static int sun6i_subdev_notify_complete(struct v4l2_async_notifier *notifier)
dev_dbg(csi->dev, "notify complete, all subdevs registered\n"); dev_dbg(csi->dev, "notify complete, all subdevs registered\n");
sd = list_first_entry(&v4l2_dev->subdevs, struct v4l2_subdev, list); sd = list_first_entry(&v4l2_dev->subdevs, struct v4l2_subdev, list);
if (sd == NULL) if (!sd)
return -EINVAL; return -EINVAL;
ret = sun6i_csi_link_entity(csi, &sd->entity, sd->fwnode); ret = sun6i_csi_link_entity(csi, &sd->entity, sd->fwnode);
@ -853,7 +852,7 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
/* /*
* PHYS_OFFSET isn't available on all architectures. In order to * PHYS_OFFSET isn't available on all architectures. In order to
* accomodate for COMPILE_TEST, let's define it to something dumb. * accommodate for COMPILE_TEST, let's define it to something dumb.
*/ */
#if defined(CONFIG_COMPILE_TEST) && !defined(PHYS_OFFSET) #if defined(CONFIG_COMPILE_TEST) && !defined(PHYS_OFFSET)
#define PHYS_OFFSET 0 #define PHYS_OFFSET 0

View File

@ -37,7 +37,7 @@
#define CSI_IF_CFG_IF_DATA_WIDTH_12BIT ((2 << 8) & CSI_IF_CFG_IF_DATA_WIDTH_MASK) #define CSI_IF_CFG_IF_DATA_WIDTH_12BIT ((2 << 8) & CSI_IF_CFG_IF_DATA_WIDTH_MASK)
#define CSI_IF_CFG_MIPI_IF_MASK BIT(7) #define CSI_IF_CFG_MIPI_IF_MASK BIT(7)
#define CSI_IF_CFG_MIPI_IF_CSI (0 << 7) #define CSI_IF_CFG_MIPI_IF_CSI (0 << 7)
#define CSI_IF_CFG_MIPI_IF_MIPI (1 << 7) #define CSI_IF_CFG_MIPI_IF_MIPI BIT(7)
#define CSI_IF_CFG_CSI_IF_MASK GENMASK(4, 0) #define CSI_IF_CFG_CSI_IF_MASK GENMASK(4, 0)
#define CSI_IF_CFG_CSI_IF_YUV422_INTLV ((0 << 0) & CSI_IF_CFG_CSI_IF_MASK) #define CSI_IF_CFG_CSI_IF_YUV422_INTLV ((0 << 0) & CSI_IF_CFG_CSI_IF_MASK)
#define CSI_IF_CFG_CSI_IF_YUV422_16BIT ((1 << 0) & CSI_IF_CFG_CSI_IF_MASK) #define CSI_IF_CFG_CSI_IF_YUV422_16BIT ((1 << 0) & CSI_IF_CFG_CSI_IF_MASK)