Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1596458 > unrolled thread
| Started by | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| First post | 2017-03-10 00:00 +0100 |
| Last post | 2017-03-10 00:00 +0100 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v1 0/7] staging: gc2235: Multiple checkpatch issues simran singhal <singhalsimran0@gmail.com> - 2017-03-10 00:00 +0100
[PATCH v1 4/7] staging: gc2235: Remove blank line before '}' and after '{' braces simran singhal <singhalsimran0@gmail.com> - 2017-03-10 00:00 +0100
[PATCH v1 2/7] staging: gc2235: Add blank line after a declaration simran singhal <singhalsimran0@gmail.com> - 2017-03-10 00:00 +0100
| From | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| Date | 2017-03-10 00:00 +0100 |
| Subject | [PATCH v1 0/7] staging: gc2235: Multiple checkpatch issues |
| Message-ID | <tjfcl-3bj-3@gated-at.bofh.it> |
v1:
-change the subject of all the patches of the patch-series
simran singhal (7):
staging: gc2235: Remove unnecessary typecast of c90 int constant
staging: gc2235: Add blank line after a declaration
staging: gc2235: Replace NULL with "!"
staging: gc2235: Remove blank line before '}' and after '{' braces
staging: gc2235: Remove multiple assignments
staging: gc2235: Use x instead of x != NULL
staging: gc2235: Do not use multiple blank lines
drivers/staging/media/atomisp/i2c/gc2235.c | 32 ++++++++++++++++--------------
1 file changed, 17 insertions(+), 15 deletions(-)
--
2.7.4
[toc] | [next] | [standalone]
| From | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| Date | 2017-03-10 00:00 +0100 |
| Subject | [PATCH v1 4/7] staging: gc2235: Remove blank line before '}' and after '{' braces |
| Message-ID | <tjfcm-3bj-23@gated-at.bofh.it> |
| In reply to | #1596458 |
Remove unneeded blank lines preceding/following '}' and '{' braces, as
pointed out by checkpatch.
This patch addresses the following checkpatch checks:
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/media/atomisp/i2c/gc2235.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c
index 2ef876a..198df22 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -788,7 +788,6 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_subdev_format *format)
{
-
struct v4l2_mbus_framefmt *fmt = &format->format;
struct gc2235_device *dev = to_gc2235_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -1070,7 +1069,6 @@ static int gc2235_enum_frame_size(struct v4l2_subdev *sd,
fse->max_height = gc2235_res[index].height;
return 0;
-
}
static int gc2235_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
@@ -1228,7 +1226,6 @@ static int init_gc2235(void)
static void exit_gc2235(void)
{
-
i2c_del_driver(&gc2235_driver);
}
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| Date | 2017-03-10 00:00 +0100 |
| Subject | [PATCH v1 2/7] staging: gc2235: Add blank line after a declaration |
| Message-ID | <tjfcm-3bj-29@gated-at.bofh.it> |
| In reply to | #1596458 |
Add blank line after a declaration. Problem found
using checkpatch.
This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/media/atomisp/i2c/gc2235.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c
index 3f2b11ec..7de7e24 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -359,6 +359,7 @@ static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
u16 coarse_integration = (u16)coarse_itg;
int ret = 0;
u16 expo_coarse_h, expo_coarse_l, gain_val = 0xF0, gain_val2 = 0xF0;
+
expo_coarse_h = coarse_integration>>8;
expo_coarse_l = coarse_integration & 0xff;
@@ -410,6 +411,7 @@ static long gc2235_s_exposure(struct v4l2_subdev *sd,
/* we should not accept the invalid value below. */
if (gain == 0) {
struct i2c_client *client = v4l2_get_subdevdata(sd);
+
v4l2_err(client, "%s: invalid value\n", __func__);
return -EINVAL;
}
@@ -546,6 +548,7 @@ static int is_init;
static int gc2235_init(struct v4l2_subdev *sd)
{
int ret = 0;
+
ret = __gc2235_init(sd);
return ret;
@@ -759,6 +762,7 @@ static int startup(struct v4l2_subdev *sd)
struct gc2235_device *dev = to_gc2235_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret = 0;
+
if (is_init == 0) {
/* force gc2235 to do a reset in res change, otherwise it
* can not output normal after switching res. and it is not
@@ -893,6 +897,7 @@ static int gc2235_s_stream(struct v4l2_subdev *sd, int enable)
struct gc2235_device *dev = to_gc2235_sensor(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
int ret;
+
mutex_lock(&dev->input_lock);
if (enable)
@@ -1007,6 +1012,7 @@ static int gc2235_s_parm(struct v4l2_subdev *sd,
struct v4l2_streamparm *param)
{
struct gc2235_device *dev = to_gc2235_sensor(sd);
+
dev->run_mode = param->parm.capture.capturemode;
mutex_lock(&dev->input_lock);
@@ -1112,6 +1118,7 @@ static int gc2235_remove(struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc2235_device *dev = to_gc2235_sensor(sd);
+
dev_dbg(&client->dev, "gc2235_remove...\n");
if (dev->platform_data->platform_deinit)
--
2.7.4
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web