Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440951 > unrolled thread
| Started by | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| First post | 2016-07-12 00:40 +0200 |
| Last post | 2016-07-12 17:10 +0200 |
| Articles | 9 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Shuah Khan <shuahkh@osg.samsung.com> - 2016-07-12 00:40 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Joe Perches <joe@perches.com> - 2016-07-12 16:10 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Shuah Khan <shuahkh@osg.samsung.com> - 2016-07-12 16:50 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Joe Perches <joe@perches.com> - 2016-07-12 18:00 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Shuah Khan <shuahkh@osg.samsung.com> - 2016-07-12 18:10 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Joe Perches <joe@perches.com> - 2016-07-12 18:20 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-12 17:10 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Shuah Khan <shuahkh@osg.samsung.com> - 2016-07-12 17:10 +0200
Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-12 17:10 +0200
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-07-12 00:40 +0200 |
| Subject | [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rTS1Q-4LO-33@gated-at.bofh.it> |
Fix misspelled error message and existing checkpatch errors in the
error message conditional.
WARNING: suspect code indent for conditional statements (8, 24)
if (ctx->state != MFCINST_HEAD_PARSED &&
[...]
+ mfc_err("Can not get crop information\n");
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index a01a373..06061c4 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -775,11 +775,11 @@ static int vidioc_g_crop(struct file *file, void *priv,
u32 left, right, top, bottom;
if (ctx->state != MFCINST_HEAD_PARSED &&
- ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
- && ctx->state != MFCINST_FINISHED) {
- mfc_err("Cannont set crop\n");
- return -EINVAL;
- }
+ ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
+ && ctx->state != MFCINST_FINISHED) {
+ mfc_err("Can not get crop information\n");
+ return -EINVAL;
+ }
if (ctx->src_fmt->fourcc == V4L2_PIX_FMT_H264) {
left = s5p_mfc_hw_call(dev->mfc_ops, get_crop_info_h, ctx);
right = left >> S5P_FIMV_SHARED_CROP_RIGHT_SHIFT;
--
2.7.4
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-07-12 16:10 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU6xS-5Z5-65@gated-at.bofh.it> |
| In reply to | #1440951 |
On Mon, 2016-07-11 at 16:39 -0600, Shuah Khan wrote:
> Fix misspelled error message and existing checkpatch errors in the
> error message conditional.
[]
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
[]
> @@ -775,11 +775,11 @@ static int vidioc_g_crop(struct file *file, void *priv,
> u32 left, right, top, bottom;
>
> if (ctx->state != MFCINST_HEAD_PARSED &&
> - ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
> - && ctx->state != MFCINST_FINISHED) {
> - mfc_err("Cannont set crop\n");
> - return -EINVAL;
> - }
> + ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
> + && ctx->state != MFCINST_FINISHED) {
> + mfc_err("Can not get crop information\n");
> + return -EINVAL;
> + }
is it a set or a get?
It'd be nicer for humans to read if the alignment was consistent
if (ctx->state != MFCINST_HEAD_PARSED &&
ctx->state != MFCINST_RUNNING &&
ctx->state != MFCINST_FINISHING &&
ctx->state != MFCINST_FINISHED) {
mfc_err("Can not get crop information\n");
return -EINVAL;
}
[toc] | [prev] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-07-12 16:50 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU7ax-6ed-1@gated-at.bofh.it> |
| In reply to | #1441387 |
On 07/12/2016 08:06 AM, Joe Perches wrote:
> On Mon, 2016-07-11 at 16:39 -0600, Shuah Khan wrote:
>> Fix misspelled error message and existing checkpatch errors in the
>> error message conditional.
> []
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> []
>> @@ -775,11 +775,11 @@ static int vidioc_g_crop(struct file *file, void *priv,
>> u32 left, right, top, bottom;
>>
>> if (ctx->state != MFCINST_HEAD_PARSED &&
>> - ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
>> - && ctx->state != MFCINST_FINISHED) {
>> - mfc_err("Cannont set crop\n");
>> - return -EINVAL;
>> - }
>> + ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
>> + && ctx->state != MFCINST_FINISHED) {
>> + mfc_err("Can not get crop information\n");
>> + return -EINVAL;
>> + }
>
> is it a set or a get?
vidioc_g_crop is a get routine.
>
> It'd be nicer for humans to read if the alignment was consistent
Are you okay with this alignment change or would you like it
changed? checkpatch stopped complaining with the code as follows:
>
> if (ctx->state != MFCINST_HEAD_PARSED &&
> ctx->state != MFCINST_RUNNING &&
> ctx->state != MFCINST_FINISHING &&
> ctx->state != MFCINST_FINISHED) {
> mfc_err("Can not get crop information\n");
> return -EINVAL;
> }
>
>
thanks,
-- Shuah
[toc] | [prev] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-07-12 18:00 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU8gh-6Wm-11@gated-at.bofh.it> |
| In reply to | #1441460 |
On Tue, 2016-07-12 at 08:42 -0600, Shuah Khan wrote:
> On 07/12/2016 08:06 AM, Joe Perches wrote:
> > On Mon, 2016-07-11 at 16:39 -0600, Shuah Khan wrote:
> > > Fix misspelled error message and existing checkpatch errors in the
> > > error message conditional.
> > []
> > > diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> > []
> > > @@ -775,11 +775,11 @@ static int vidioc_g_crop(struct file *file, void *priv,
> > > u32 left, right, top, bottom;
> > >
> > > if (ctx->state != MFCINST_HEAD_PARSED &&
> > > - ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
> > > - && ctx->state != MFCINST_FINISHED) {
> > > - mfc_err("Cannont set crop\n");
> > > - return -EINVAL;
> > > - }
> > > + ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
> > > + && ctx->state != MFCINST_FINISHED) {
> > > + mfc_err("Can not get crop information\n");
> > > + return -EINVAL;
> > > + }
> > is it a set or a get?
> vidioc_g_crop is a get routine.
> >
> > It'd be nicer for humans to read if the alignment was consistent
> Are you okay with this alignment change or would you like it
> changed?
Well, if you're resubmitting, I'd prefer it changed.
Thanks.
[toc] | [prev] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-07-12 18:10 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU8pX-7fu-15@gated-at.bofh.it> |
| In reply to | #1441524 |
On 07/12/2016 09:51 AM, Joe Perches wrote:
> On Tue, 2016-07-12 at 08:42 -0600, Shuah Khan wrote:
>> On 07/12/2016 08:06 AM, Joe Perches wrote:
>>> On Mon, 2016-07-11 at 16:39 -0600, Shuah Khan wrote:
>>>> Fix misspelled error message and existing checkpatch errors in the
>>>> error message conditional.
>>> []
>>>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
>>> []
>>>> @@ -775,11 +775,11 @@ static int vidioc_g_crop(struct file *file, void *priv,
>>>> u32 left, right, top, bottom;
>>>>
>>>> if (ctx->state != MFCINST_HEAD_PARSED &&
>>>> - ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
>>>> - && ctx->state != MFCINST_FINISHED) {
>>>> - mfc_err("Cannont set crop\n");
>>>> - return -EINVAL;
>>>> - }
>>>> + ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
>>>> + && ctx->state != MFCINST_FINISHED) {
>>>> + mfc_err("Can not get crop information\n");
>>>> + return -EINVAL;
>>>> + }
>>> is it a set or a get?
>> vidioc_g_crop is a get routine.
>>>
>>> It'd be nicer for humans to read if the alignment was consistent
>> Are you okay with this alignment change or would you like it
>> changed?
>
> Well, if you're resubmitting, I'd prefer it changed.
> Thanks.
>
chekcpatch stopped complaining. Are you looking for the entire file
alignments changed? I am not clear on what needs to be changed?
thanks,
-- Shuah
[toc] | [prev] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-07-12 18:20 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU8zE-7jv-9@gated-at.bofh.it> |
| In reply to | #1441529 |
On Tue, 2016-07-12 at 10:08 -0600, Shuah Khan wrote:
> On 07/12/2016 09:51 AM, Joe Perches wrote:
> > On Tue, 2016-07-12 at 08:42 -0600, Shuah Khan wrote:
> > > On 07/12/2016 08:06 AM, Joe Perches wrote:
> > > > On Mon, 2016-07-11 at 16:39 -0600, Shuah Khan wrote:
> > > > >
> > > > > Fix misspelled error message and existing checkpatch errors in the
> > > > > error message conditional.
> > > > []
> > > > >
> > > > > diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> > > > []
> > > > >
> > > > > @@ -775,11 +775,11 @@ static int vidioc_g_crop(struct file *file, void *priv,
> > > > > u32 left, right, top, bottom;
> > > > >
> > > > > if (ctx->state != MFCINST_HEAD_PARSED &&
> > > > > - ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
> > > > > - && ctx->state != MFCINST_FINISHED) {
> > > > > - mfc_err("Cannont set crop\n");
> > > > > - return -EINVAL;
> > > > > - }
> > > > > + ctx->state != MFCINST_RUNNING && ctx->state != MFCINST_FINISHING
> > > > > + && ctx->state != MFCINST_FINISHED) {
> > > > > + mfc_err("Can not get crop information\n");
> > > > > + return -EINVAL;
> > > > > + }
> > > > is it a set or a get?
> > > vidioc_g_crop is a get routine.
> > > >
> > > >
> > > > It'd be nicer for humans to read if the alignment was consistent
> > > Are you okay with this alignment change or would you like it
> > > changed?
> > Well, if you're resubmitting, I'd prefer it changed.
> > Thanks.
> >
> chekcpatch stopped complaining. Are you looking for the entire file
> alignments changed? I am not clear on what needs to be changed?
I think doing just this spelling and get/set correction and
fixing the alignment in this single case in a single patch
would be fine here.
Foxing the alignment for the entire file would be a more
significant change and isn't necessary in this patch.
Another thing possible for the file would be to change the
mfc_debug and mfc_err/mfc_info macros to use pr_<level>
without the generally unnecessary __func__ and __LINE__
uses.
This could both enable dynamic_debug uses for the KERN_DEBUG
cases and reduce overall object size.
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-07-12 17:10 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU7tU-6CN-7@gated-at.bofh.it> |
| In reply to | #1440951 |
Hello Shuah,
On 07/12/2016 11:07 AM, Shuah Khan wrote:
> On 07/12/2016 09:03 AM, Javier Martinez Canillas wrote:
>> Hello Shuah,
>>
>> On 07/11/2016 06:39 PM, Shuah Khan wrote:
>>> Fix misspelled error message and existing checkpatch errors in the
>>> error message conditional.
>>>
>>> WARNING: suspect code indent for conditional statements (8, 24)
>>> if (ctx->state != MFCINST_HEAD_PARSED &&
>>> [...]
>>> + mfc_err("Can not get crop information\n");
>>>
>>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>>> ---
>>
>> Patch looks good to me. Maybe is better to split the message and checkpatch
>> changes in two different patches. But I don't have a strong opinion on this:
>>
>> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>
> Thanks for the review. I considered splitting them, however the patch
> that fixes the message will be flagged by checkpatch. It does make
> sense to split the changes into two patches. What I could do is, make
> the checkpatch fixes the first patch and fix the error message in the
> second one.
>
> How does that sound?
>
Sounds good to me.
> -- Shuah
>
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
[toc] | [prev] | [next] | [standalone]
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Date | 2016-07-12 17:10 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU7tU-6CN-11@gated-at.bofh.it> |
| In reply to | #1440951 |
On 07/12/2016 09:03 AM, Javier Martinez Canillas wrote:
> Hello Shuah,
>
> On 07/11/2016 06:39 PM, Shuah Khan wrote:
>> Fix misspelled error message and existing checkpatch errors in the
>> error message conditional.
>>
>> WARNING: suspect code indent for conditional statements (8, 24)
>> if (ctx->state != MFCINST_HEAD_PARSED &&
>> [...]
>> + mfc_err("Can not get crop information\n");
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>
> Patch looks good to me. Maybe is better to split the message and checkpatch
> changes in two different patches. But I don't have a strong opinion on this:
>
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
Thanks for the review. I considered splitting them, however the patch
that fixes the message will be flagged by checkpatch. It does make
sense to split the changes into two patches. What I could do is, make
the checkpatch fixes the first patch and fix the error message in the
second one.
How does that sound?
-- Shuah
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-07-12 17:10 +0200 |
| Subject | Re: [PATCH] media: s5p-mfc Fix misspelled error message and checkpatch errors |
| Message-ID | <rU7tU-6CN-9@gated-at.bofh.it> |
| In reply to | #1440951 |
Hello Shuah,
On 07/11/2016 06:39 PM, Shuah Khan wrote:
> Fix misspelled error message and existing checkpatch errors in the
> error message conditional.
>
> WARNING: suspect code indent for conditional statements (8, 24)
> if (ctx->state != MFCINST_HEAD_PARSED &&
> [...]
> + mfc_err("Can not get crop information\n");
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
Patch looks good to me. Maybe is better to split the message and checkpatch
changes in two different patches. But I don't have a strong opinion on this:
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web