* [PATCH] staging: media: atomisp: Coding style fixes
@ 2021-04-12 2:35 Martiros Shakhzadyan
2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a superfluous else clause Martiros Shakhzadyan
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Martiros Shakhzadyan @ 2021-04-12 2:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Martiros Shakhzadyan, Sakari Ailus, linux-media
The following set of patches fixes coding style issues in
atomisp-ov2722.
Martiros Shakhzadyan (3):
staging: media: atomisp: Removed a superfluous else clause
staging: media: atomisp: Removed a function entry log
staging: media: atomisp: Minor code style changes
.../media/atomisp/i2c/atomisp-ov2722.c | 20 +++++++++----------
1 file changed, 9 insertions(+), 11 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH] staging: media: atomisp: Removed a superfluous else clause 2021-04-12 2:35 [PATCH] staging: media: atomisp: Coding style fixes Martiros Shakhzadyan @ 2021-04-12 2:35 ` Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a function entry log Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Minor code style changes Martiros Shakhzadyan 2 siblings, 0 replies; 8+ messages in thread From: Martiros Shakhzadyan @ 2021-04-12 2:35 UTC (permalink / raw) To: Mauro Carvalho Chehab; +Cc: Martiros Shakhzadyan, Sakari Ailus, linux-media Fixed a coding style issue. Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> --- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index eecefcd734d0..c017e9066b7a 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -774,11 +774,11 @@ static int ov2722_s_power(struct v4l2_subdev *sd, int on) if (on == 0) return power_down(sd); - else { - ret = power_up(sd); - if (!ret) - return ov2722_init(sd); - } + + ret = power_up(sd); + if (!ret) + return ov2722_init(sd); + return ret; } -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] staging: media: atomisp: Removed a function entry log 2021-04-12 2:35 [PATCH] staging: media: atomisp: Coding style fixes Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a superfluous else clause Martiros Shakhzadyan @ 2021-04-12 2:35 ` Martiros Shakhzadyan 2021-04-12 9:28 ` Hans Verkuil 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Minor code style changes Martiros Shakhzadyan 2 siblings, 1 reply; 8+ messages in thread From: Martiros Shakhzadyan @ 2021-04-12 2:35 UTC (permalink / raw) To: Mauro Carvalho Chehab; +Cc: Martiros Shakhzadyan, Sakari Ailus, linux-media Coding style fix. Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> --- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index c017e9066b7a..912eadaffc44 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -1175,8 +1175,6 @@ static int ov2722_remove(struct i2c_client *client) struct v4l2_subdev *sd = i2c_get_clientdata(client); struct ov2722_device *dev = to_ov2722_sensor(sd); - dev_dbg(&client->dev, "ov2722_remove...\n"); - dev->platform_data->csi_cfg(sd, 0); v4l2_ctrl_handler_free(&dev->ctrl_handler); v4l2_device_unregister_subdev(sd); -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: media: atomisp: Removed a function entry log 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a function entry log Martiros Shakhzadyan @ 2021-04-12 9:28 ` Hans Verkuil 2021-04-12 15:43 ` Martiros Shakhzadyan 0 siblings, 1 reply; 8+ messages in thread From: Hans Verkuil @ 2021-04-12 9:28 UTC (permalink / raw) To: Martiros Shakhzadyan, Mauro Carvalho Chehab; +Cc: Sakari Ailus, linux-media On 12/04/2021 04:35, Martiros Shakhzadyan wrote: > Coding style fix. What exactly is the coding style issue? Please mention that. Also, by removing the line you change the behavior (i.e. if debugging is enabled, you no longer see this message). That's more than a coding style fix... Regards, Hans > > Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> > --- > drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > index c017e9066b7a..912eadaffc44 100644 > --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > @@ -1175,8 +1175,6 @@ static int ov2722_remove(struct i2c_client *client) > struct v4l2_subdev *sd = i2c_get_clientdata(client); > struct ov2722_device *dev = to_ov2722_sensor(sd); > > - dev_dbg(&client->dev, "ov2722_remove...\n"); > - > dev->platform_data->csi_cfg(sd, 0); > v4l2_ctrl_handler_free(&dev->ctrl_handler); > v4l2_device_unregister_subdev(sd); > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: [PATCH] staging: media: atomisp: Removed a function entry log 2021-04-12 9:28 ` Hans Verkuil @ 2021-04-12 15:43 ` Martiros Shakhzadyan 0 siblings, 0 replies; 8+ messages in thread From: Martiros Shakhzadyan @ 2021-04-12 15:43 UTC (permalink / raw) To: Hans Verkuil; +Cc: linux-media On Mon, Apr 12, 2021 at 11:28:09AM +0200, Hans Verkuil wrote: > On 12/04/2021 04:35, Martiros Shakhzadyan wrote: > > Coding style fix. > > What exactly is the coding style issue? Please mention that. > > Also, by removing the line you change the behavior (i.e. if debugging is > enabled, you no longer see this message). That's more than a coding style > fix... > > Regards, > > Hans > Thank you, Hans - I will resubmit the patch with a better commit message. > > > > Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> > > --- > > drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > > index c017e9066b7a..912eadaffc44 100644 > > --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > > +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > > @@ -1175,8 +1175,6 @@ static int ov2722_remove(struct i2c_client *client) > > struct v4l2_subdev *sd = i2c_get_clientdata(client); > > struct ov2722_device *dev = to_ov2722_sensor(sd); > > > > - dev_dbg(&client->dev, "ov2722_remove...\n"); > > - > > dev->platform_data->csi_cfg(sd, 0); > > v4l2_ctrl_handler_free(&dev->ctrl_handler); > > v4l2_device_unregister_subdev(sd); > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] staging: media: atomisp: Minor code style changes 2021-04-12 2:35 [PATCH] staging: media: atomisp: Coding style fixes Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a superfluous else clause Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a function entry log Martiros Shakhzadyan @ 2021-04-12 2:35 ` Martiros Shakhzadyan 2021-04-12 9:40 ` Jacopo Mondi 2 siblings, 1 reply; 8+ messages in thread From: Martiros Shakhzadyan @ 2021-04-12 2:35 UTC (permalink / raw) To: Mauro Carvalho Chehab; +Cc: Martiros Shakhzadyan, Sakari Ailus, linux-media Fixed line continuation and parenthesis alignment issues. Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> squashme --- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index 912eadaffc44..90a985ee25fa 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -49,8 +49,8 @@ static int ov2722_read_reg(struct i2c_client *client, return -ENODEV; } - if (data_length != OV2722_8BIT && data_length != OV2722_16BIT - && data_length != OV2722_32BIT) { + if (data_length != OV2722_8BIT && data_length != OV2722_16BIT && + data_length != OV2722_32BIT) { dev_err(&client->dev, "%s error, invalid data length\n", __func__); return -EINVAL; @@ -212,8 +212,8 @@ static int __ov2722_buf_reg_array(struct i2c_client *client, } static int __ov2722_write_reg_is_consecutive(struct i2c_client *client, - struct ov2722_write_ctrl *ctrl, - const struct ov2722_reg *next) + struct ov2722_write_ctrl *ctrl, + const struct ov2722_reg *next) { if (ctrl->index == 0) return 1; -- 2.31.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: media: atomisp: Minor code style changes 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Minor code style changes Martiros Shakhzadyan @ 2021-04-12 9:40 ` Jacopo Mondi 2021-04-12 15:41 ` Martiros Shakhzadyan 0 siblings, 1 reply; 8+ messages in thread From: Jacopo Mondi @ 2021-04-12 9:40 UTC (permalink / raw) To: Martiros Shakhzadyan; +Cc: Mauro Carvalho Chehab, Sakari Ailus, linux-media Hi Martiros, On Sun, Apr 11, 2021 at 10:35:58PM -0400, Martiros Shakhzadyan wrote: > Fixed line continuation and parenthesis alignment issues. > > Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> > > squashme This line should probably be dropped :) > --- > drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > index 912eadaffc44..90a985ee25fa 100644 > --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > @@ -49,8 +49,8 @@ static int ov2722_read_reg(struct i2c_client *client, > return -ENODEV; > } > > - if (data_length != OV2722_8BIT && data_length != OV2722_16BIT > - && data_length != OV2722_32BIT) { > + if (data_length != OV2722_8BIT && data_length != OV2722_16BIT && > + data_length != OV2722_32BIT) { Does checkpatch report this one ? > dev_err(&client->dev, "%s error, invalid data length\n", > __func__); > return -EINVAL; > @@ -212,8 +212,8 @@ static int __ov2722_buf_reg_array(struct i2c_client *client, > } > > static int __ov2722_write_reg_is_consecutive(struct i2c_client *client, > - struct ov2722_write_ctrl *ctrl, > - const struct ov2722_reg *next) > + struct ov2722_write_ctrl *ctrl, > + const struct ov2722_reg *next) These are probably 2 separate changes, but give this is just a style fix I think it's ok... Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> > { > if (ctrl->index == 0) > return 1; > -- > 2.31.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: [PATCH] staging: media: atomisp: Minor code style changes 2021-04-12 9:40 ` Jacopo Mondi @ 2021-04-12 15:41 ` Martiros Shakhzadyan 0 siblings, 0 replies; 8+ messages in thread From: Martiros Shakhzadyan @ 2021-04-12 15:41 UTC (permalink / raw) To: Jacopo Mondi; +Cc: vrzh On Mon, Apr 12, 2021 at 11:40:48AM +0200, Jacopo Mondi wrote: > Hi Martiros, > > On Sun, Apr 11, 2021 at 10:35:58PM -0400, Martiros Shakhzadyan wrote: > > Fixed line continuation and parenthesis alignment issues. > > > > Signed-off-by: Martiros Shakhzadyan <vrzh@vrzh.net> > > > > squashme > > This line should probably be dropped :) > Oops! :) > > --- > > drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > > index 912eadaffc44..90a985ee25fa 100644 > > --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > > +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c > > @@ -49,8 +49,8 @@ static int ov2722_read_reg(struct i2c_client *client, > > return -ENODEV; > > } > > > > - if (data_length != OV2722_8BIT && data_length != OV2722_16BIT > > - && data_length != OV2722_32BIT) { > > + if (data_length != OV2722_8BIT && data_length != OV2722_16BIT && > > + data_length != OV2722_32BIT) { > > Does checkpatch report this one ? > It did. Once I moved `&&` on the previous line it stopped complaining. > > dev_err(&client->dev, "%s error, invalid data length\n", > > __func__); > > return -EINVAL; > > @@ -212,8 +212,8 @@ static int __ov2722_buf_reg_array(struct i2c_client *client, > > } > > > > static int __ov2722_write_reg_is_consecutive(struct i2c_client *client, > > - struct ov2722_write_ctrl *ctrl, > > - const struct ov2722_reg *next) > > + struct ov2722_write_ctrl *ctrl, > > + const struct ov2722_reg *next) > > These are probably 2 separate changes, but give this is just a style > fix I think it's ok... > > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> > > > Thanks for the review - will resubmit with a fixed commit message. > > { > > if (ctrl->index == 0) > > return 1; > > -- > > 2.31.1 > > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-04-12 15:40 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-04-12 2:35 [PATCH] staging: media: atomisp: Coding style fixes Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a superfluous else clause Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Removed a function entry log Martiros Shakhzadyan 2021-04-12 9:28 ` Hans Verkuil 2021-04-12 15:43 ` Martiros Shakhzadyan 2021-04-12 2:35 ` [PATCH] staging: media: atomisp: Minor code style changes Martiros Shakhzadyan 2021-04-12 9:40 ` Jacopo Mondi 2021-04-12 15:41 ` Martiros Shakhzadyan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox