* [PATCH 1/2] staging: media: ipu3: code style fix - avoid multiple line dereference
@ 2021-02-21 8:12 Nikolay Kyx
2021-02-21 8:12 ` [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations Nikolay Kyx
0 siblings, 1 reply; 5+ messages in thread
From: Nikolay Kyx @ 2021-02-21 8:12 UTC (permalink / raw)
To: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab,
Greg Kroah-Hartman
Cc: Nikolay Kyx, linux-media, devel, linux-kernel
This patch fixes the following checkpatch.pl warning:
WARNING: Avoid multiple line dereference
in file ipu3-css.c
Signed-off-by: Nikolay Kyx <knv418@gmail.com>
---
Additionally some style warnings remain valid here and could be fixed by
another patch.
drivers/staging/media/ipu3/ipu3-css.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/media/ipu3/ipu3-css.c b/drivers/staging/media/ipu3/ipu3-css.c
index 608dcacf12b2..29894ee566c1 100644
--- a/drivers/staging/media/ipu3/ipu3-css.c
+++ b/drivers/staging/media/ipu3/ipu3-css.c
@@ -1206,14 +1206,14 @@ static int imgu_css_binary_preallocate(struct imgu_css *css, unsigned int pipe)
for (i = 0; i < IPU3_CSS_AUX_FRAMES; i++)
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_REF].
- mem[i], CSS_BDS_SIZE))
+ &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_REF].mem[i],
+ CSS_BDS_SIZE))
goto out_of_memory;
for (i = 0; i < IPU3_CSS_AUX_FRAMES; i++)
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_TNR].
- mem[i], CSS_GDC_SIZE))
+ &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_TNR].mem[i],
+ CSS_GDC_SIZE))
goto out_of_memory;
return 0;
@@ -1441,13 +1441,11 @@ static int imgu_css_map_init(struct imgu_css *css, unsigned int pipe)
for (p = 0; p < IPU3_CSS_PIPE_ID_NUM; p++)
for (i = 0; i < IMGU_ABI_MAX_STAGES; i++) {
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->
- xmem_sp_stage_ptrs[p][i],
+ &css_pipe->xmem_sp_stage_ptrs[p][i],
sizeof(struct imgu_abi_sp_stage)))
return -ENOMEM;
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->
- xmem_isp_stage_ptrs[p][i],
+ &css_pipe->xmem_isp_stage_ptrs[p][i],
sizeof(struct imgu_abi_isp_stage)))
return -ENOMEM;
}
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations
2021-02-21 8:12 [PATCH 1/2] staging: media: ipu3: code style fix - avoid multiple line dereference Nikolay Kyx
@ 2021-02-21 8:12 ` Nikolay Kyx
2021-02-21 8:20 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Nikolay Kyx @ 2021-02-21 8:12 UTC (permalink / raw)
To: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab,
Greg Kroah-Hartman
Cc: Nikolay Kyx, linux-media, devel, linux-kernel
This patch fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations
in file ipu3-css-fw.h
Signed-off-by: Nikolay Kyx <knv418@gmail.com>
---
Additionally some style warnings remain valid here and could be fixed by
another patch.
drivers/staging/media/ipu3/ipu3-css-fw.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/ipu3/ipu3-css-fw.h b/drivers/staging/media/ipu3/ipu3-css-fw.h
index 79ffa7045139..3c078f15a295 100644
--- a/drivers/staging/media/ipu3/ipu3-css-fw.h
+++ b/drivers/staging/media/ipu3/ipu3-css-fw.h
@@ -148,6 +148,7 @@ union imgu_fw_union {
struct imgu_fw_info {
size_t header_size; /* size of fw header */
u32 type __aligned(8); /* enum imgu_fw_type */
+
union imgu_fw_union info; /* Binary info */
struct imgu_abi_blob_info blob; /* Blob info */
/* Dynamic part */
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations
2021-02-21 8:12 ` [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations Nikolay Kyx
@ 2021-02-21 8:20 ` Greg Kroah-Hartman
2021-02-21 12:10 ` [PATCH v2] staging: media: ipu3: code style fix - avoid multiple line dereference Nikolay Kyx
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2021-02-21 8:20 UTC (permalink / raw)
To: Nikolay Kyx
Cc: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab,
linux-media, devel, linux-kernel
On Sun, Feb 21, 2021 at 11:12:36AM +0300, Nikolay Kyx wrote:
> This patch fixes the following checkpatch.pl warning:
>
> WARNING: Missing a blank line after declarations
>
> in file ipu3-css-fw.h
>
> Signed-off-by: Nikolay Kyx <knv418@gmail.com>
> ---
>
> Additionally some style warnings remain valid here and could be fixed by
> another patch.
>
> drivers/staging/media/ipu3/ipu3-css-fw.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/ipu3/ipu3-css-fw.h b/drivers/staging/media/ipu3/ipu3-css-fw.h
> index 79ffa7045139..3c078f15a295 100644
> --- a/drivers/staging/media/ipu3/ipu3-css-fw.h
> +++ b/drivers/staging/media/ipu3/ipu3-css-fw.h
> @@ -148,6 +148,7 @@ union imgu_fw_union {
> struct imgu_fw_info {
> size_t header_size; /* size of fw header */
> u32 type __aligned(8); /* enum imgu_fw_type */
> +
> union imgu_fw_union info; /* Binary info */
> struct imgu_abi_blob_info blob; /* Blob info */
> /* Dynamic part */
With your knowledge of C, does this change look correct?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations
@ 2021-02-21 10:42 Nikolay K.
0 siblings, 0 replies; 5+ messages in thread
From: Nikolay K. @ 2021-02-21 10:42 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sakari Ailus, Bingbu Cao, Tianshu Qiu,
Mauro Carvalho Chehab
Cc: linux-media, devel, linux-kernel
I can't find any change in struct imgu_fw_info layout after this patch.
But warning is strange, because declarations don't actually end here.
So I think this warning should be suppressed to reduce noise
in checkpatch.pl output.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] staging: media: ipu3: code style fix - avoid multiple line dereference
2021-02-21 8:20 ` Greg Kroah-Hartman
@ 2021-02-21 12:10 ` Nikolay Kyx
0 siblings, 0 replies; 5+ messages in thread
From: Nikolay Kyx @ 2021-02-21 12:10 UTC (permalink / raw)
To: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab,
Greg Kroah-Hartman
Cc: Nikolay Kyx, linux-media, devel, linux-kernel
This patch fixes the following checkpatch.pl warning:
WARNING: Avoid multiple line dereference
in file ipu3-css.c
Signed-off-by: Nikolay Kyx <knv418@gmail.com>
---
Additionally some style warnings remain valid here and could be fixed by
another patch.
v2: Removed second part of patch which fixes non-existent problem
drivers/staging/media/ipu3/ipu3-css.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/media/ipu3/ipu3-css.c b/drivers/staging/media/ipu3/ipu3-css.c
index 608dcacf12b2..29894ee566c1 100644
--- a/drivers/staging/media/ipu3/ipu3-css.c
+++ b/drivers/staging/media/ipu3/ipu3-css.c
@@ -1206,14 +1206,14 @@ static int imgu_css_binary_preallocate(struct imgu_css *css, unsigned int pipe)
for (i = 0; i < IPU3_CSS_AUX_FRAMES; i++)
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_REF].
- mem[i], CSS_BDS_SIZE))
+ &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_REF].mem[i],
+ CSS_BDS_SIZE))
goto out_of_memory;
for (i = 0; i < IPU3_CSS_AUX_FRAMES; i++)
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_TNR].
- mem[i], CSS_GDC_SIZE))
+ &css_pipe->aux_frames[IPU3_CSS_AUX_FRAME_TNR].mem[i],
+ CSS_GDC_SIZE))
goto out_of_memory;
return 0;
@@ -1441,13 +1441,11 @@ static int imgu_css_map_init(struct imgu_css *css, unsigned int pipe)
for (p = 0; p < IPU3_CSS_PIPE_ID_NUM; p++)
for (i = 0; i < IMGU_ABI_MAX_STAGES; i++) {
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->
- xmem_sp_stage_ptrs[p][i],
+ &css_pipe->xmem_sp_stage_ptrs[p][i],
sizeof(struct imgu_abi_sp_stage)))
return -ENOMEM;
if (!imgu_dmamap_alloc(imgu,
- &css_pipe->
- xmem_isp_stage_ptrs[p][i],
+ &css_pipe->xmem_isp_stage_ptrs[p][i],
sizeof(struct imgu_abi_isp_stage)))
return -ENOMEM;
}
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-21 12:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-21 8:12 [PATCH 1/2] staging: media: ipu3: code style fix - avoid multiple line dereference Nikolay Kyx
2021-02-21 8:12 ` [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations Nikolay Kyx
2021-02-21 8:20 ` Greg Kroah-Hartman
2021-02-21 12:10 ` [PATCH v2] staging: media: ipu3: code style fix - avoid multiple line dereference Nikolay Kyx
-- strict thread matches above, loose matches on Subject: below --
2021-02-21 10:42 [PATCH 2/2] staging: media: ipu3: code style fix - missing a blank line after declarations Nikolay K.
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.