* [PATCH] Fixing Coding Style Errors & Warning [not found] <[PATCH 1/1] Correcting coding style errors & warnings> @ 2017-03-27 10:32 ` vaibhavddit 2017-03-27 11:37 ` [PATCH] Fixing up check-patch error & Warnings vaibhavddit 2017-03-27 11:42 ` [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() vaibhavddit 0 siblings, 2 replies; 9+ messages in thread From: vaibhavddit @ 2017-03-27 10:32 UTC (permalink / raw) To: mchehab; +Cc: linux-media, devel, rvarsha016, Vaibhav Kothari From: Vaibhav Kothari <vaibhavddit@gmail.com> - Removed white-space before comma in memset() - Added blanck line between declaration and defination at various places Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index 9b41023..0df20ba 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -55,7 +55,7 @@ static int gc2235_read_reg(struct i2c_client *client, return -EINVAL; } - memset(msg, 0 , sizeof(msg)); + memset(msg, 0, sizeof(msg)); msg[0].addr = client->addr; msg[0].flags = 0; @@ -354,6 +354,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; @@ -405,6 +406,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; } @@ -746,12 +748,13 @@ 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 - * necessary for first time run up after power on, for the sack - * of performance - */ + * can not output normal after switching res. and it is not + * necessary for first time run up after power on, for the sack + * of performance + */ power_down(sd); power_up(sd); gc2235_write_reg_array(client, gc2235_init_settings); @@ -880,6 +883,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) @@ -994,6 +998,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); @@ -1099,6 +1104,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) -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] Fixing up check-patch error & Warnings 2017-03-27 10:32 ` [PATCH] Fixing Coding Style Errors & Warning vaibhavddit @ 2017-03-27 11:37 ` vaibhavddit 2017-03-27 11:42 ` [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() vaibhavddit 1 sibling, 0 replies; 9+ messages in thread From: vaibhavddit @ 2017-03-27 11:37 UTC (permalink / raw) To: mchehab; +Cc: linux-media, devel, rvarsha016, Vaibhav Kothari From: Vaibhav Kothari <vaibhavddit@gmail.com> - Removed white-space before comma in memset() - Added blank line between declaration and defination at various places Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index 9b41023..0df20ba 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -55,7 +55,7 @@ static int gc2235_read_reg(struct i2c_client *client, return -EINVAL; } - memset(msg, 0 , sizeof(msg)); + memset(msg, 0, sizeof(msg)); msg[0].addr = client->addr; msg[0].flags = 0; @@ -354,6 +354,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; @@ -405,6 +406,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; } @@ -746,12 +748,13 @@ 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 - * necessary for first time run up after power on, for the sack - * of performance - */ + * can not output normal after switching res. and it is not + * necessary for first time run up after power on, for the sack + * of performance + */ power_down(sd); power_up(sd); gc2235_write_reg_array(client, gc2235_init_settings); @@ -880,6 +883,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) @@ -994,6 +998,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); @@ -1099,6 +1104,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) -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() 2017-03-27 10:32 ` [PATCH] Fixing Coding Style Errors & Warning vaibhavddit 2017-03-27 11:37 ` [PATCH] Fixing up check-patch error & Warnings vaibhavddit @ 2017-03-27 11:42 ` vaibhavddit 2017-03-27 13:01 ` Varsha Rao ` (2 more replies) 1 sibling, 3 replies; 9+ messages in thread From: vaibhavddit @ 2017-03-27 11:42 UTC (permalink / raw) To: mchehab; +Cc: linux-media, devel, rvarsha016, Vaibhav Kothari From: Vaibhav Kothari <vaibhavddit@gmail.com> - Fixing up check-patch error & Warnings - Added blank line between declaration and defination at various places Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index 9b41023..0df20ba 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -55,7 +55,7 @@ static int gc2235_read_reg(struct i2c_client *client, return -EINVAL; } - memset(msg, 0 , sizeof(msg)); + memset(msg, 0, sizeof(msg)); msg[0].addr = client->addr; msg[0].flags = 0; @@ -354,6 +354,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; @@ -405,6 +406,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; } @@ -746,12 +748,13 @@ 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 - * necessary for first time run up after power on, for the sack - * of performance - */ + * can not output normal after switching res. and it is not + * necessary for first time run up after power on, for the sack + * of performance + */ power_down(sd); power_up(sd); gc2235_write_reg_array(client, gc2235_init_settings); @@ -880,6 +883,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) @@ -994,6 +998,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); @@ -1099,6 +1104,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) -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() 2017-03-27 11:42 ` [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() vaibhavddit @ 2017-03-27 13:01 ` Varsha Rao 2017-03-28 5:14 ` [PATCH] staging: media: atomisp: i2c: " vaibhavddit 2017-03-28 5:32 ` vaibhavddit 2 siblings, 0 replies; 9+ messages in thread From: Varsha Rao @ 2017-03-27 13:01 UTC (permalink / raw) To: vaibhavddit; +Cc: Mauro Carvalho Chehab, linux-media, devel On Mon, Mar 27, 2017 at 5:12 PM, <vaibhavddit@gmail.com> wrote: > From: Vaibhav Kothari <vaibhavddit@gmail.com> "From: .." should not be included in the patch. The subject is still incorrect, there should be a space after each colon. The subject should give overview of changes made in the patch. It is preferred to fix single checkpatch issue in a patch. > - Fixing up check-patch error & Warnings > - Added blank line between declaration and defination > at various places The commit message is not proper. There are no full stops at the end of any sentence. Also change defination to definition. Check git log for example. static int gc2235_read_reg(struct i2c_client *client, > return -EINVAL; > } > > - memset(msg, 0 , sizeof(msg)); > + memset(msg, 0, sizeof(msg)); This change is not reflected in commit message. > 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 > - * necessary for first time run up after power on, for the sack > - * of performance > - */ > + * can not output normal after switching res. and it is not > + * necessary for first time run up after power on, for the sack > + * of performance > + */ Even this change fixes a different issue. Send patch for a single checkpatch issue. https://kernelnewbies.org/FirstKernelPatch#submit%2Ba%2Bpatch Check the First Kernel Patch page. Thanks, Varsha Rao ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() 2017-03-27 11:42 ` [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() vaibhavddit 2017-03-27 13:01 ` Varsha Rao @ 2017-03-28 5:14 ` vaibhavddit 2017-03-28 5:23 ` Greg KH 2017-03-28 5:32 ` vaibhavddit 2 siblings, 1 reply; 9+ messages in thread From: vaibhavddit @ 2017-03-28 5:14 UTC (permalink / raw) To: mchehab; +Cc: linux-media, devel, rvarsha016, Vaibhav Kothari gc2235.c Removed extra space before comma in memset() as a part of checkpatch.pl fix-up. Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index 9b41023..50f4317 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -55,7 +55,7 @@ static int gc2235_read_reg(struct i2c_client *client, return -EINVAL; } - memset(msg, 0 , sizeof(msg)); + memset(msg, 0, sizeof(msg)); msg[0].addr = client->addr; msg[0].flags = 0; -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() 2017-03-28 5:14 ` [PATCH] staging: media: atomisp: i2c: " vaibhavddit @ 2017-03-28 5:23 ` Greg KH 2017-03-29 4:41 ` vk 0 siblings, 1 reply; 9+ messages in thread From: Greg KH @ 2017-03-28 5:23 UTC (permalink / raw) To: vaibhavddit; +Cc: mchehab, devel, rvarsha016, linux-media On Tue, Mar 28, 2017 at 10:44:44AM +0530, vaibhavddit@gmail.com wrote: > gc2235.c Why is this file name here? > > Removed extra space before comma in memset() as a part of > checkpatch.pl fix-up. Why the extra space at the beginning of the line? > Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> This doesn't match your "From:" line above :( Please fix up. thanks, greg k-h ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() 2017-03-28 5:23 ` Greg KH @ 2017-03-29 4:41 ` vk 0 siblings, 0 replies; 9+ messages in thread From: vk @ 2017-03-29 4:41 UTC (permalink / raw) To: Greg KH; +Cc: mchehab, devel, rvarsha016, linux-media Corrected all comments. Thanks, Vaibhav On Tuesday 28 March 2017 10:53 AM, Greg KH wrote: > On Tue, Mar 28, 2017 at 10:44:44AM +0530, vaibhavddit@gmail.com wrote: >> gc2235.c > Why is this file name here? > >> Removed extra space before comma in memset() as a part of >> checkpatch.pl fix-up. > Why the extra space at the beginning of the line? > >> Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> > This doesn't match your "From:" line above :( > > Please fix up. > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() 2017-03-27 11:42 ` [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() vaibhavddit 2017-03-27 13:01 ` Varsha Rao 2017-03-28 5:14 ` [PATCH] staging: media: atomisp: i2c: " vaibhavddit @ 2017-03-28 5:32 ` vaibhavddit 2017-03-29 7:03 ` Greg KH 2 siblings, 1 reply; 9+ messages in thread From: vaibhavddit @ 2017-03-28 5:32 UTC (permalink / raw) To: mchehab; +Cc: linux-media, devel, rvarsha016, Vaibhav Kothari From: Vaibhav Kothari <vaibhavddit@gmail.com> Removed extra space before comma in memset() as a part of checkpatch.pl fix-up. Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index 9b41023..50f4317 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -55,7 +55,7 @@ static int gc2235_read_reg(struct i2c_client *client, return -EINVAL; } - memset(msg, 0 , sizeof(msg)); + memset(msg, 0, sizeof(msg)); msg[0].addr = client->addr; msg[0].flags = 0; -- 1.9.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] staging: media: atomisp: i2c: removed unnecessary white space before comma in memset() 2017-03-28 5:32 ` vaibhavddit @ 2017-03-29 7:03 ` Greg KH 0 siblings, 0 replies; 9+ messages in thread From: Greg KH @ 2017-03-29 7:03 UTC (permalink / raw) To: vaibhavddit; +Cc: mchehab, devel, rvarsha016, linux-media On Tue, Mar 28, 2017 at 11:02:45AM +0530, vaibhavddit@gmail.com wrote: > From: Vaibhav Kothari <vaibhavddit@gmail.com> > > Removed extra space before comma in memset() as a part of > checkpatch.pl fix-up. > > Signed-off-by: Vaibhav Kothari <vaibhavddit@gmail.com> > --- > drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) What changed from your prior emails with the same subject? Always version your patches, as SubmittingPatches describes how to do. Please fix up and resend. thanks, greg k-h ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-03-29 7:03 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <[PATCH 1/1] Correcting coding style errors & warnings> 2017-03-27 10:32 ` [PATCH] Fixing Coding Style Errors & Warning vaibhavddit 2017-03-27 11:37 ` [PATCH] Fixing up check-patch error & Warnings vaibhavddit 2017-03-27 11:42 ` [PATCH] staging:media:atomisp:i2c removed unnecessary white space before comma in memset() vaibhavddit 2017-03-27 13:01 ` Varsha Rao 2017-03-28 5:14 ` [PATCH] staging: media: atomisp: i2c: " vaibhavddit 2017-03-28 5:23 ` Greg KH 2017-03-29 4:41 ` vk 2017-03-28 5:32 ` vaibhavddit 2017-03-29 7:03 ` Greg KH
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.