All of lore.kernel.org
 help / color / mirror / Atom feed
* [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 13:54 Aline Santana Cordeiro
  2021-04-09 16:44   ` Ezequiel Garcia
  0 siblings, 1 reply; 17+ messages in thread
From: Aline Santana Cordeiro @ 2021-04-09 13:54 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel,
	alinesantanacordeiro

Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
and #define HANTRO_PP_RED_WRITE_S in lower case, according with
code style.

Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
---
 drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c
index 6d2a8f2a..06279c0 100644
--- a/drivers/staging/media/hantro/hantro_postproc.c
+++ b/drivers/staging/media/hantro/hantro_postproc.c
@@ -12,14 +12,14 @@
 #include "hantro_hw.h"
 #include "hantro_g1_regs.h"
 
-#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
+#define hantro_pp_reg_write(vpu, reg_name, val) \
 { \
 	hantro_reg_write(vpu, \
 			 &(vpu)->variant->postproc_regs->reg_name, \
 			 val); \
 }
 
-#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
+#define hantro_pp_reg_write_s(vpu, reg_name, val) \
 { \
 	hantro_reg_write_s(vpu, \
 			   &(vpu)->variant->postproc_regs->reg_name, \
@@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx *ctx)
 		return;
 
 	/* Turn on pipeline mode. Must be done first. */
-	HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
+	hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
 
 	src_pp_fmt = VPU_PP_IN_NV12;
 
@@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx *ctx)
 	dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
 	dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
 
-	HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
-	HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
-	HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
-	HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
-	HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
-	HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx->dst_fmt.width));
-	HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx->dst_fmt.height));
-	HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
-	HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
-	HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
-	HANTRO_PP_REG_WRITE(vpu, output_height, ctx->dst_fmt.height);
-	HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
-	HANTRO_PP_REG_WRITE(vpu, display_width, ctx->dst_fmt.width);
+	hantro_pp_reg_write(vpu, clk_gate, 0x1);
+	hantro_pp_reg_write(vpu, out_endian, 0x1);
+	hantro_pp_reg_write(vpu, out_swap32, 0x1);
+	hantro_pp_reg_write(vpu, max_burst, 16);
+	hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
+	hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx->dst_fmt.width));
+	hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx->dst_fmt.height));
+	hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
+	hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
+	hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
+	hantro_pp_reg_write(vpu, output_height, ctx->dst_fmt.height);
+	hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
+	hantro_pp_reg_write(vpu, display_width, ctx->dst_fmt.width);
 }
 
 void hantro_postproc_free(struct hantro_ctx *ctx)
@@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx *ctx)
 	if (!vpu->variant->postproc_regs)
 		return;
 
-	HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
+	hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
 }
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 13:54 [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case Aline Santana Cordeiro
@ 2021-04-09 16:44   ` Ezequiel Garcia
  0 siblings, 0 replies; 17+ messages in thread
From: Ezequiel Garcia @ 2021-04-09 16:44 UTC (permalink / raw)
  To: Aline Santana Cordeiro, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Hi Aline,

On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> code style.
> 

Where is this written in the Coding Style?

Thanks!
Ezequiel

> Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
> ---
>  drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c
> index 6d2a8f2a..06279c0 100644
> --- a/drivers/staging/media/hantro/hantro_postproc.c
> +++ b/drivers/staging/media/hantro/hantro_postproc.c
> @@ -12,14 +12,14 @@
>  #include "hantro_hw.h"
>  #include "hantro_g1_regs.h"
>  
> -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> +#define hantro_pp_reg_write(vpu, reg_name, val) \
>  { \
>         hantro_reg_write(vpu, \
>                          &(vpu)->variant->postproc_regs->reg_name, \
>                          val); \
>  }
>  
> -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
>  { \
>         hantro_reg_write_s(vpu, \
>                            &(vpu)->variant->postproc_regs->reg_name, \
> @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx *ctx)
>                 return;
>  
>         /* Turn on pipeline mode. Must be done first. */
> -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
>  
>         src_pp_fmt = VPU_PP_IN_NV12;
>  
> @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx *ctx)
>         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
>         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
>  
> -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx->dst_fmt.width));
> -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx->dst_fmt.height));
> -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
> -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx->dst_fmt.height);
> -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
> -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx->dst_fmt.width);
> +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> +       hantro_pp_reg_write(vpu, max_burst, 16);
> +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx->dst_fmt.width));
> +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx->dst_fmt.height));
> +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> +       hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
> +       hantro_pp_reg_write(vpu, output_height, ctx->dst_fmt.height);
> +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
> +       hantro_pp_reg_write(vpu, display_width, ctx->dst_fmt.width);
>  }
>  
>  void hantro_postproc_free(struct hantro_ctx *ctx)
> @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx *ctx)
>         if (!vpu->variant->postproc_regs)
>                 return;
>  
> -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
>  }



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 16:44   ` Ezequiel Garcia
  0 siblings, 0 replies; 17+ messages in thread
From: Ezequiel Garcia @ 2021-04-09 16:44 UTC (permalink / raw)
  To: Aline Santana Cordeiro, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Hi Aline,

On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> code style.
> 

Where is this written in the Coding Style?

Thanks!
Ezequiel

> Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
> ---
>  drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c
> index 6d2a8f2a..06279c0 100644
> --- a/drivers/staging/media/hantro/hantro_postproc.c
> +++ b/drivers/staging/media/hantro/hantro_postproc.c
> @@ -12,14 +12,14 @@
>  #include "hantro_hw.h"
>  #include "hantro_g1_regs.h"
>  
> -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> +#define hantro_pp_reg_write(vpu, reg_name, val) \
>  { \
>         hantro_reg_write(vpu, \
>                          &(vpu)->variant->postproc_regs->reg_name, \
>                          val); \
>  }
>  
> -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
>  { \
>         hantro_reg_write_s(vpu, \
>                            &(vpu)->variant->postproc_regs->reg_name, \
> @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx *ctx)
>                 return;
>  
>         /* Turn on pipeline mode. Must be done first. */
> -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
>  
>         src_pp_fmt = VPU_PP_IN_NV12;
>  
> @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx *ctx)
>         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
>         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
>  
> -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx->dst_fmt.width));
> -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx->dst_fmt.height));
> -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
> -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx->dst_fmt.height);
> -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
> -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx->dst_fmt.width);
> +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> +       hantro_pp_reg_write(vpu, max_burst, 16);
> +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx->dst_fmt.width));
> +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx->dst_fmt.height));
> +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> +       hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
> +       hantro_pp_reg_write(vpu, output_height, ctx->dst_fmt.height);
> +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
> +       hantro_pp_reg_write(vpu, display_width, ctx->dst_fmt.width);
>  }
>  
>  void hantro_postproc_free(struct hantro_ctx *ctx)
> @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx *ctx)
>         if (!vpu->variant->postproc_regs)
>                 return;
>  
> -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
>  }




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 16:44   ` Ezequiel Garcia
@ 2021-04-09 17:00     ` ascordeiro
  -1 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 17:00 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> Hi Aline,

Hi Ezequiel,
> 
> On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > code style.
> > 
> 
> Where is this written in the Coding Style?

I found this in section 12, about Macros, Enums and RTL in both
references:
https://www.kernel.org/doc/html/latest/process/coding-style.html
https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> 
> Thanks!
> Ezequiel

Thank you!
Aline
> 
> > Signed-off-by: Aline Santana Cordeiro <  
> > alinesantanacordeiro@gmail.com>
> > ---
> >  drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-
> > ------------
> >  1 file changed, 17 insertions(+), 17 deletions(-)
> > 
> > diff --git a/drivers/staging/media/hantro/hantro_postproc.c
> > b/drivers/staging/media/hantro/hantro_postproc.c
> > index 6d2a8f2a..06279c0 100644
> > --- a/drivers/staging/media/hantro/hantro_postproc.c
> > +++ b/drivers/staging/media/hantro/hantro_postproc.c
> > @@ -12,14 +12,14 @@
> >  #include "hantro_hw.h"
> >  #include "hantro_g1_regs.h"
> >  
> > -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> > +#define hantro_pp_reg_write(vpu, reg_name, val) \
> >  { \
> >         hantro_reg_write(vpu, \
> >                          &(vpu)->variant->postproc_regs->reg_name,
> > \
> >                          val); \
> >  }
> >  
> > -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> > +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
> >  { \
> >         hantro_reg_write_s(vpu, \
> >                            &(vpu)->variant->postproc_regs-
> > >reg_name, \
> > @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx
> > *ctx)
> >                 return;
> >  
> >         /* Turn on pipeline mode. Must be done first. */
> > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
> >  
> >         src_pp_fmt = VPU_PP_IN_NV12;
> >  
> > @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx
> > *ctx)
> >         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> >         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf,
> > 0);
> >  
> > -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> > -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> > -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> > -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> > -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> > -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx-
> > >dst_fmt.height));
> > -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> > -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> > -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
> > -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx-
> > >dst_fmt.height);
> > -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx-
> > >dst_fmt.width);
> > +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> > +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> > +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> > +       hantro_pp_reg_write(vpu, max_burst, 16);
> > +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> > +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx-
> > >dst_fmt.height));
> > +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> > +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> > +       hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
> > +       hantro_pp_reg_write(vpu, output_height, ctx-
> > >dst_fmt.height);
> > +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > +       hantro_pp_reg_write(vpu, display_width, ctx-
> > >dst_fmt.width);
> >  }
> >  
> >  void hantro_postproc_free(struct hantro_ctx *ctx)
> > @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx
> > *ctx)
> >         if (!vpu->variant->postproc_regs)
> >                 return;
> >  
> > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
> >  }
> 
> 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 17:00     ` ascordeiro
  0 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 17:00 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> Hi Aline,

Hi Ezequiel,
> 
> On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > code style.
> > 
> 
> Where is this written in the Coding Style?

I found this in section 12, about Macros, Enums and RTL in both
references:
https://www.kernel.org/doc/html/latest/process/coding-style.html
https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> 
> Thanks!
> Ezequiel

Thank you!
Aline
> 
> > Signed-off-by: Aline Santana Cordeiro <  
> > alinesantanacordeiro@gmail.com>
> > ---
> >  drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-
> > ------------
> >  1 file changed, 17 insertions(+), 17 deletions(-)
> > 
> > diff --git a/drivers/staging/media/hantro/hantro_postproc.c
> > b/drivers/staging/media/hantro/hantro_postproc.c
> > index 6d2a8f2a..06279c0 100644
> > --- a/drivers/staging/media/hantro/hantro_postproc.c
> > +++ b/drivers/staging/media/hantro/hantro_postproc.c
> > @@ -12,14 +12,14 @@
> >  #include "hantro_hw.h"
> >  #include "hantro_g1_regs.h"
> >  
> > -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> > +#define hantro_pp_reg_write(vpu, reg_name, val) \
> >  { \
> >         hantro_reg_write(vpu, \
> >                          &(vpu)->variant->postproc_regs->reg_name,
> > \
> >                          val); \
> >  }
> >  
> > -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> > +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
> >  { \
> >         hantro_reg_write_s(vpu, \
> >                            &(vpu)->variant->postproc_regs-
> > >reg_name, \
> > @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx
> > *ctx)
> >                 return;
> >  
> >         /* Turn on pipeline mode. Must be done first. */
> > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
> >  
> >         src_pp_fmt = VPU_PP_IN_NV12;
> >  
> > @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx
> > *ctx)
> >         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> >         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf,
> > 0);
> >  
> > -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> > -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> > -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> > -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> > -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> > -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx-
> > >dst_fmt.height));
> > -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> > -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> > -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
> > -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx-
> > >dst_fmt.height);
> > -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx-
> > >dst_fmt.width);
> > +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> > +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> > +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> > +       hantro_pp_reg_write(vpu, max_burst, 16);
> > +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> > +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx-
> > >dst_fmt.height));
> > +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> > +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> > +       hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
> > +       hantro_pp_reg_write(vpu, output_height, ctx-
> > >dst_fmt.height);
> > +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx-
> > >dst_fmt.width));
> > +       hantro_pp_reg_write(vpu, display_width, ctx-
> > >dst_fmt.width);
> >  }
> >  
> >  void hantro_postproc_free(struct hantro_ctx *ctx)
> > @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx
> > *ctx)
> >         if (!vpu->variant->postproc_regs)
> >                 return;
> >  
> > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
> >  }
> 
> 




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 17:00     ` ascordeiro
@ 2021-04-09 17:15       ` Ezequiel Garcia
  -1 siblings, 0 replies; 17+ messages in thread
From: Ezequiel Garcia @ 2021-04-09 17:15 UTC (permalink / raw)
  To: ascordeiro, Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

On Fri, 2021-04-09 at 14:00 -0300, ascordeiro wrote:
> Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > Hi Aline,
> 
> Hi Ezequiel,
> > 
> > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > code style.
> > > 
> > 
> > Where is this written in the Coding Style?
> 
> I found this in section 12, about Macros, Enums and RTL in both
> references:
> https://www.kernel.org/doc/html/latest/process/coding-style.html
> https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst

It seems this

"""
CAPITALIZED macro names are appreciated but macros resembling functions may be named in lower case.
"""

It's just a suggestion, not a big deal. In general, if checkpatch.pl
is not complaining, it's not worth the trouble.

So let's skip this fix.

Thanks a lot!
Ezequiel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 17:15       ` Ezequiel Garcia
  0 siblings, 0 replies; 17+ messages in thread
From: Ezequiel Garcia @ 2021-04-09 17:15 UTC (permalink / raw)
  To: ascordeiro, Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

On Fri, 2021-04-09 at 14:00 -0300, ascordeiro wrote:
> Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > Hi Aline,
> 
> Hi Ezequiel,
> > 
> > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > code style.
> > > 
> > 
> > Where is this written in the Coding Style?
> 
> I found this in section 12, about Macros, Enums and RTL in both
> references:
> https://www.kernel.org/doc/html/latest/process/coding-style.html
> https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst

It seems this

"""
CAPITALIZED macro names are appreciated but macros resembling functions may be named in lower case.
"""

It's just a suggestion, not a big deal. In general, if checkpatch.pl
is not complaining, it's not worth the trouble.

So let's skip this fix.

Thanks a lot!
Ezequiel



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 17:00     ` ascordeiro
@ 2021-04-09 17:25       ` Julia Lawall
  -1 siblings, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2021-04-09 17:25 UTC (permalink / raw)
  To: ascordeiro
  Cc: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
	outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 5647 bytes --]



On Fri, 9 Apr 2021, ascordeiro wrote:

> Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > Hi Aline,
>
> Hi Ezequiel,
> >
> > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > code style.

Maybe you can see if these macros can be converted to static inline
functions.  Macros don't provide any type checking.

julia

> > >
> >
> > Where is this written in the Coding Style?
>
> I found this in section 12, about Macros, Enums and RTL in both
> references:
> https://www.kernel.org/doc/html/latest/process/coding-style.html
> https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> >
> > Thanks!
> > Ezequiel
>
> Thank you!
> Aline
> >
> > > Signed-off-by: Aline Santana Cordeiro <
> > > alinesantanacordeiro@gmail.com>
> > > ---
> > >  drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-
> > > ------------
> > >  1 file changed, 17 insertions(+), 17 deletions(-)
> > >
> > > diff --git a/drivers/staging/media/hantro/hantro_postproc.c
> > > b/drivers/staging/media/hantro/hantro_postproc.c
> > > index 6d2a8f2a..06279c0 100644
> > > --- a/drivers/staging/media/hantro/hantro_postproc.c
> > > +++ b/drivers/staging/media/hantro/hantro_postproc.c
> > > @@ -12,14 +12,14 @@
> > >  #include "hantro_hw.h"
> > >  #include "hantro_g1_regs.h"
> > >  
> > > -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> > > +#define hantro_pp_reg_write(vpu, reg_name, val) \
> > >  { \
> > >         hantro_reg_write(vpu, \
> > >                          &(vpu)->variant->postproc_regs->reg_name,
> > > \
> > >                          val); \
> > >  }
> > >  
> > > -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> > > +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
> > >  { \
> > >         hantro_reg_write_s(vpu, \
> > >                            &(vpu)->variant->postproc_regs-
> > > >reg_name, \
> > > @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx
> > > *ctx)
> > >                 return;
> > >  
> > >         /* Turn on pipeline mode. Must be done first. */
> > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
> > >  
> > >         src_pp_fmt = VPU_PP_IN_NV12;
> > >  
> > > @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx
> > > *ctx)
> > >         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> > >         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf,
> > > 0);
> > >  
> > > -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> > > -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> > > -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> > > -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> > > -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> > > -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx-
> > > >dst_fmt.height));
> > > -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> > > -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> > > -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
> > > -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx-
> > > >dst_fmt.height);
> > > -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx-
> > > >dst_fmt.width);
> > > +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> > > +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> > > +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> > > +       hantro_pp_reg_write(vpu, max_burst, 16);
> > > +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> > > +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx-
> > > >dst_fmt.height));
> > > +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> > > +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> > > +       hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
> > > +       hantro_pp_reg_write(vpu, output_height, ctx-
> > > >dst_fmt.height);
> > > +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > +       hantro_pp_reg_write(vpu, display_width, ctx-
> > > >dst_fmt.width);
> > >  }
> > >  
> > >  void hantro_postproc_free(struct hantro_ctx *ctx)
> > > @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx
> > > *ctx)
> > >         if (!vpu->variant->postproc_regs)
> > >                 return;
> > >  
> > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
> > >  }
> >
> >
>
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/138794d79c42510d9b6ae744df20216904773032.camel%40gmail.com.
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 17:25       ` Julia Lawall
  0 siblings, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2021-04-09 17:25 UTC (permalink / raw)
  To: ascordeiro
  Cc: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
	outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 5647 bytes --]



On Fri, 9 Apr 2021, ascordeiro wrote:

> Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > Hi Aline,
>
> Hi Ezequiel,
> >
> > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > code style.

Maybe you can see if these macros can be converted to static inline
functions.  Macros don't provide any type checking.

julia

> > >
> >
> > Where is this written in the Coding Style?
>
> I found this in section 12, about Macros, Enums and RTL in both
> references:
> https://www.kernel.org/doc/html/latest/process/coding-style.html
> https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> >
> > Thanks!
> > Ezequiel
>
> Thank you!
> Aline
> >
> > > Signed-off-by: Aline Santana Cordeiro <
> > > alinesantanacordeiro@gmail.com>
> > > ---
> > >  drivers/staging/media/hantro/hantro_postproc.c | 34 +++++++++++++-
> > > ------------
> > >  1 file changed, 17 insertions(+), 17 deletions(-)
> > >
> > > diff --git a/drivers/staging/media/hantro/hantro_postproc.c
> > > b/drivers/staging/media/hantro/hantro_postproc.c
> > > index 6d2a8f2a..06279c0 100644
> > > --- a/drivers/staging/media/hantro/hantro_postproc.c
> > > +++ b/drivers/staging/media/hantro/hantro_postproc.c
> > > @@ -12,14 +12,14 @@
> > >  #include "hantro_hw.h"
> > >  #include "hantro_g1_regs.h"
> > >  
> > > -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> > > +#define hantro_pp_reg_write(vpu, reg_name, val) \
> > >  { \
> > >         hantro_reg_write(vpu, \
> > >                          &(vpu)->variant->postproc_regs->reg_name,
> > > \
> > >                          val); \
> > >  }
> > >  
> > > -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> > > +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
> > >  { \
> > >         hantro_reg_write_s(vpu, \
> > >                            &(vpu)->variant->postproc_regs-
> > > >reg_name, \
> > > @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx
> > > *ctx)
> > >                 return;
> > >  
> > >         /* Turn on pipeline mode. Must be done first. */
> > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
> > >  
> > >         src_pp_fmt = VPU_PP_IN_NV12;
> > >  
> > > @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct hantro_ctx
> > > *ctx)
> > >         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> > >         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf,
> > > 0);
> > >  
> > > -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> > > -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> > > -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> > > -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> > > -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> > > -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx-
> > > >dst_fmt.height));
> > > -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> > > -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> > > -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx->dst_fmt.width);
> > > -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx-
> > > >dst_fmt.height);
> > > -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx-
> > > >dst_fmt.width);
> > > +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> > > +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> > > +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> > > +       hantro_pp_reg_write(vpu, max_burst, 16);
> > > +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> > > +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx-
> > > >dst_fmt.height));
> > > +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> > > +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> > > +       hantro_pp_reg_write(vpu, output_width, ctx->dst_fmt.width);
> > > +       hantro_pp_reg_write(vpu, output_height, ctx-
> > > >dst_fmt.height);
> > > +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx-
> > > >dst_fmt.width));
> > > +       hantro_pp_reg_write(vpu, display_width, ctx-
> > > >dst_fmt.width);
> > >  }
> > >  
> > >  void hantro_postproc_free(struct hantro_ctx *ctx)
> > > @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct hantro_ctx
> > > *ctx)
> > >         if (!vpu->variant->postproc_regs)
> > >                 return;
> > >  
> > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
> > >  }
> >
> >
>
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/138794d79c42510d9b6ae744df20216904773032.camel%40gmail.com.
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 17:15       ` Ezequiel Garcia
@ 2021-04-09 17:36         ` ascordeiro
  -1 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 17:36 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Em sex, 2021-04-09 às 14:15 -0300, Ezequiel Garcia escreveu:
> On Fri, 2021-04-09 at 14:00 -0300, ascordeiro wrote:
> > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > Hi Aline,
> > 
> > Hi Ezequiel,
> > > 
> > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > > code style.
> > > > 
> > > 
> > > Where is this written in the Coding Style?
> > 
> > I found this in section 12, about Macros, Enums and RTL in both
> > references:
> > https://www.kernel.org/doc/html/latest/process/coding-style.html
> > https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> 
> It seems this
> 
> """
> CAPITALIZED macro names are appreciated but macros resembling
> functions may be named in lower case.
> """
> 
> It's just a suggestion, not a big deal. In general, if checkpatch.pl
> is not complaining, it's not worth the trouble.
> 
> So let's skip this fix.
Okay! I'm going to check different problems with the checkpatch.pl
> 
> Thanks a lot!
> Ezequiel
> 
Thank you!
Aline


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 17:36         ` ascordeiro
  0 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 17:36 UTC (permalink / raw)
  To: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Em sex, 2021-04-09 às 14:15 -0300, Ezequiel Garcia escreveu:
> On Fri, 2021-04-09 at 14:00 -0300, ascordeiro wrote:
> > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > Hi Aline,
> > 
> > Hi Ezequiel,
> > > 
> > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > > code style.
> > > > 
> > > 
> > > Where is this written in the Coding Style?
> > 
> > I found this in section 12, about Macros, Enums and RTL in both
> > references:
> > https://www.kernel.org/doc/html/latest/process/coding-style.html
> > https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> 
> It seems this
> 
> """
> CAPITALIZED macro names are appreciated but macros resembling
> functions may be named in lower case.
> """
> 
> It's just a suggestion, not a big deal. In general, if checkpatch.pl
> is not complaining, it's not worth the trouble.
> 
> So let's skip this fix.
Okay! I'm going to check different problems with the checkpatch.pl
> 
> Thanks a lot!
> Ezequiel
> 
Thank you!
Aline



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 17:25       ` Julia Lawall
@ 2021-04-09 17:39         ` ascordeiro
  -1 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 17:39 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
	outreachy-kernel

Em sex, 2021-04-09 às 19:25 +0200, Julia Lawall escreveu:
> 
> 
> On Fri, 9 Apr 2021, ascordeiro wrote:
> 
> > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > Hi Aline,
> > 
> > Hi Ezequiel,
> > > 
> > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > > code style.
> 
> Maybe you can see if these macros can be converted to static inline
> functions.  Macros don't provide any type checking.

Okay! I'm going to check this option.

Thank you for the advice!
Aline
> 

> julia
> 
> > > > 
> > > 
> > > Where is this written in the Coding Style?
> > 
> > I found this in section 12, about Macros, Enums and RTL in both
> > references:
> > https://www.kernel.org/doc/html/latest/process/coding-style.html
> > https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> > > 
> > > Thanks!
> > > Ezequiel
> > 
> > Thank you!
> > Aline
> > > 
> > > > Signed-off-by: Aline Santana Cordeiro <
> > > > alinesantanacordeiro@gmail.com>
> > > > ---
> > > >  drivers/staging/media/hantro/hantro_postproc.c | 34
> > > > +++++++++++++-
> > > > ------------
> > > >  1 file changed, 17 insertions(+), 17 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/media/hantro/hantro_postproc.c
> > > > b/drivers/staging/media/hantro/hantro_postproc.c
> > > > index 6d2a8f2a..06279c0 100644
> > > > --- a/drivers/staging/media/hantro/hantro_postproc.c
> > > > +++ b/drivers/staging/media/hantro/hantro_postproc.c
> > > > @@ -12,14 +12,14 @@
> > > >  #include "hantro_hw.h"
> > > >  #include "hantro_g1_regs.h"
> > > >  
> > > > -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> > > > +#define hantro_pp_reg_write(vpu, reg_name, val) \
> > > >  { \
> > > >         hantro_reg_write(vpu, \
> > > >                          &(vpu)->variant->postproc_regs-
> > > > >reg_name,
> > > > \
> > > >                          val); \
> > > >  }
> > > >  
> > > > -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> > > > +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
> > > >  { \
> > > >         hantro_reg_write_s(vpu, \
> > > >                            &(vpu)->variant->postproc_regs-
> > > > > reg_name, \
> > > > @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx
> > > > *ctx)
> > > >                 return;
> > > >  
> > > >         /* Turn on pipeline mode. Must be done first. */
> > > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> > > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
> > > >  
> > > >         src_pp_fmt = VPU_PP_IN_NV12;
> > > >  
> > > > @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct
> > > > hantro_ctx
> > > > *ctx)
> > > >         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> > > >         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf-
> > > > >vb2_buf,
> > > > 0);
> > > >  
> > > > -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> > > > -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> > > > -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> > > > -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> > > > -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> > > > -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx-
> > > > > dst_fmt.height));
> > > > -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> > > > -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> > > > -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx-
> > > > >dst_fmt.width);
> > > > -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx-
> > > > > dst_fmt.height);
> > > > -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx-
> > > > > dst_fmt.width);
> > > > +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> > > > +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> > > > +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> > > > +       hantro_pp_reg_write(vpu, max_burst, 16);
> > > > +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> > > > +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx-
> > > > > dst_fmt.height));
> > > > +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> > > > +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> > > > +       hantro_pp_reg_write(vpu, output_width, ctx-
> > > > >dst_fmt.width);
> > > > +       hantro_pp_reg_write(vpu, output_height, ctx-
> > > > > dst_fmt.height);
> > > > +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > +       hantro_pp_reg_write(vpu, display_width, ctx-
> > > > > dst_fmt.width);
> > > >  }
> > > >  
> > > >  void hantro_postproc_free(struct hantro_ctx *ctx)
> > > > @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct
> > > > hantro_ctx
> > > > *ctx)
> > > >         if (!vpu->variant->postproc_regs)
> > > >                 return;
> > > >  
> > > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> > > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
> > > >  }
> > > 
> > > 
> > 
> > 
> > --
> > You received this message because you are subscribed to the Google
> > Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit  
> > https://groups.google.com/d/msgid/outreachy-kernel/138794d79c42510d9b6ae744df20216904773032.camel%40gmail.com
> > .



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 17:39         ` ascordeiro
  0 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 17:39 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Ezequiel Garcia, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
	outreachy-kernel

Em sex, 2021-04-09 às 19:25 +0200, Julia Lawall escreveu:
> 
> 
> On Fri, 9 Apr 2021, ascordeiro wrote:
> 
> > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > Hi Aline,
> > 
> > Hi Ezequiel,
> > > 
> > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > > code style.
> 
> Maybe you can see if these macros can be converted to static inline
> functions.  Macros don't provide any type checking.

Okay! I'm going to check this option.

Thank you for the advice!
Aline
> 

> julia
> 
> > > > 
> > > 
> > > Where is this written in the Coding Style?
> > 
> > I found this in section 12, about Macros, Enums and RTL in both
> > references:
> > https://www.kernel.org/doc/html/latest/process/coding-style.html
> > https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst
> > > 
> > > Thanks!
> > > Ezequiel
> > 
> > Thank you!
> > Aline
> > > 
> > > > Signed-off-by: Aline Santana Cordeiro <
> > > > alinesantanacordeiro@gmail.com>
> > > > ---
> > > >  drivers/staging/media/hantro/hantro_postproc.c | 34
> > > > +++++++++++++-
> > > > ------------
> > > >  1 file changed, 17 insertions(+), 17 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/media/hantro/hantro_postproc.c
> > > > b/drivers/staging/media/hantro/hantro_postproc.c
> > > > index 6d2a8f2a..06279c0 100644
> > > > --- a/drivers/staging/media/hantro/hantro_postproc.c
> > > > +++ b/drivers/staging/media/hantro/hantro_postproc.c
> > > > @@ -12,14 +12,14 @@
> > > >  #include "hantro_hw.h"
> > > >  #include "hantro_g1_regs.h"
> > > >  
> > > > -#define HANTRO_PP_REG_WRITE(vpu, reg_name, val) \
> > > > +#define hantro_pp_reg_write(vpu, reg_name, val) \
> > > >  { \
> > > >         hantro_reg_write(vpu, \
> > > >                          &(vpu)->variant->postproc_regs-
> > > > >reg_name,
> > > > \
> > > >                          val); \
> > > >  }
> > > >  
> > > > -#define HANTRO_PP_REG_WRITE_S(vpu, reg_name, val) \
> > > > +#define hantro_pp_reg_write_s(vpu, reg_name, val) \
> > > >  { \
> > > >         hantro_reg_write_s(vpu, \
> > > >                            &(vpu)->variant->postproc_regs-
> > > > > reg_name, \
> > > > @@ -61,7 +61,7 @@ void hantro_postproc_enable(struct hantro_ctx
> > > > *ctx)
> > > >                 return;
> > > >  
> > > >         /* Turn on pipeline mode. Must be done first. */
> > > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1);
> > > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x1);
> > > >  
> > > >         src_pp_fmt = VPU_PP_IN_NV12;
> > > >  
> > > > @@ -79,19 +79,19 @@ void hantro_postproc_enable(struct
> > > > hantro_ctx
> > > > *ctx)
> > > >         dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> > > >         dst_dma = vb2_dma_contig_plane_dma_addr(&dst_buf-
> > > > >vb2_buf,
> > > > 0);
> > > >  
> > > > -       HANTRO_PP_REG_WRITE(vpu, clk_gate, 0x1);
> > > > -       HANTRO_PP_REG_WRITE(vpu, out_endian, 0x1);
> > > > -       HANTRO_PP_REG_WRITE(vpu, out_swap32, 0x1);
> > > > -       HANTRO_PP_REG_WRITE(vpu, max_burst, 16);
> > > > -       HANTRO_PP_REG_WRITE(vpu, out_luma_base, dst_dma);
> > > > -       HANTRO_PP_REG_WRITE(vpu, input_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > -       HANTRO_PP_REG_WRITE(vpu, input_height, MB_HEIGHT(ctx-
> > > > > dst_fmt.height));
> > > > -       HANTRO_PP_REG_WRITE(vpu, input_fmt, src_pp_fmt);
> > > > -       HANTRO_PP_REG_WRITE(vpu, output_fmt, dst_pp_fmt);
> > > > -       HANTRO_PP_REG_WRITE(vpu, output_width, ctx-
> > > > >dst_fmt.width);
> > > > -       HANTRO_PP_REG_WRITE(vpu, output_height, ctx-
> > > > > dst_fmt.height);
> > > > -       HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > -       HANTRO_PP_REG_WRITE(vpu, display_width, ctx-
> > > > > dst_fmt.width);
> > > > +       hantro_pp_reg_write(vpu, clk_gate, 0x1);
> > > > +       hantro_pp_reg_write(vpu, out_endian, 0x1);
> > > > +       hantro_pp_reg_write(vpu, out_swap32, 0x1);
> > > > +       hantro_pp_reg_write(vpu, max_burst, 16);
> > > > +       hantro_pp_reg_write(vpu, out_luma_base, dst_dma);
> > > > +       hantro_pp_reg_write(vpu, input_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > +       hantro_pp_reg_write(vpu, input_height, MB_HEIGHT(ctx-
> > > > > dst_fmt.height));
> > > > +       hantro_pp_reg_write(vpu, input_fmt, src_pp_fmt);
> > > > +       hantro_pp_reg_write(vpu, output_fmt, dst_pp_fmt);
> > > > +       hantro_pp_reg_write(vpu, output_width, ctx-
> > > > >dst_fmt.width);
> > > > +       hantro_pp_reg_write(vpu, output_height, ctx-
> > > > > dst_fmt.height);
> > > > +       hantro_pp_reg_write(vpu, orig_width, MB_WIDTH(ctx-
> > > > > dst_fmt.width));
> > > > +       hantro_pp_reg_write(vpu, display_width, ctx-
> > > > > dst_fmt.width);
> > > >  }
> > > >  
> > > >  void hantro_postproc_free(struct hantro_ctx *ctx)
> > > > @@ -146,5 +146,5 @@ void hantro_postproc_disable(struct
> > > > hantro_ctx
> > > > *ctx)
> > > >         if (!vpu->variant->postproc_regs)
> > > >                 return;
> > > >  
> > > > -       HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0);
> > > > +       hantro_pp_reg_write_s(vpu, pipeline_en, 0x0);
> > > >  }
> > > 
> > > 
> > 
> > 
> > --
> > You received this message because you are subscribed to the Google
> > Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit  
> > https://groups.google.com/d/msgid/outreachy-kernel/138794d79c42510d9b6ae744df20216904773032.camel%40gmail.com
> > .




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 17:25       ` Julia Lawall
@ 2021-04-09 17:42         ` Ezequiel Garcia
  -1 siblings, 0 replies; 17+ messages in thread
From: Ezequiel Garcia @ 2021-04-09 17:42 UTC (permalink / raw)
  To: Julia Lawall, ascordeiro
  Cc: Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	linux-media, linux-staging, linux-kernel, outreachy-kernel

On Fri, 2021-04-09 at 19:25 +0200, Julia Lawall wrote:
> 
> 
> On Fri, 9 Apr 2021, ascordeiro wrote:
> 
> > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > Hi Aline,
> > 
> > Hi Ezequiel,
> > > 
> > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > > code style.
> 
> Maybe you can see if these macros can be converted to static inline
> functions.  Macros don't provide any type checking.
> 

I'd like to leave these as they are for now, tbh ^_^

A more massive refactoring is needed in this driver,
but it needs proper testing and it's a more complex plan.

Thanks!
Ezequiel


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 17:42         ` Ezequiel Garcia
  0 siblings, 0 replies; 17+ messages in thread
From: Ezequiel Garcia @ 2021-04-09 17:42 UTC (permalink / raw)
  To: Julia Lawall, ascordeiro
  Cc: Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	linux-media, linux-staging, linux-kernel, outreachy-kernel

On Fri, 2021-04-09 at 19:25 +0200, Julia Lawall wrote:
> 
> 
> On Fri, 9 Apr 2021, ascordeiro wrote:
> 
> > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > Hi Aline,
> > 
> > Hi Ezequiel,
> > > 
> > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro wrote:
> > > > Rewrite macros resembling functions #define HANTRO_PP_REG_WRITE
> > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according with
> > > > code style.
> 
> Maybe you can see if these macros can be converted to static inline
> functions.  Macros don't provide any type checking.
> 

I'd like to leave these as they are for now, tbh ^_^

A more massive refactoring is needed in this driver,
but it needs proper testing and it's a more complex plan.

Thanks!
Ezequiel



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
  2021-04-09 17:42         ` Ezequiel Garcia
@ 2021-04-09 18:26           ` ascordeiro
  -1 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 18:26 UTC (permalink / raw)
  To: Ezequiel Garcia, Julia Lawall
  Cc: Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	linux-media, linux-staging, linux-kernel, outreachy-kernel

Em sex, 2021-04-09 às 14:42 -0300, Ezequiel Garcia escreveu:
> On Fri, 2021-04-09 at 19:25 +0200, Julia Lawall wrote:
> > 
> > 
> > On Fri, 9 Apr 2021, ascordeiro wrote:
> > 
> > > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > > Hi Aline,
> > > 
> > > Hi Ezequiel,
> > > > 
> > > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro
> > > > wrote:
> > > > > Rewrite macros resembling functions #define
> > > > > HANTRO_PP_REG_WRITE
> > > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according
> > > > > with
> > > > > code style.
> > 
> > Maybe you can see if these macros can be converted to static inline
> > functions.  Macros don't provide any type checking.
> > 
> 
> I'd like to leave these as they are for now, tbh ^_^
> 
> A more massive refactoring is needed in this driver,
> but it needs proper testing and it's a more complex plan.

Okay, thank you for your attention :)

Aline

> 
> Thanks!
> Ezequiel
> 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case
@ 2021-04-09 18:26           ` ascordeiro
  0 siblings, 0 replies; 17+ messages in thread
From: ascordeiro @ 2021-04-09 18:26 UTC (permalink / raw)
  To: Ezequiel Garcia, Julia Lawall
  Cc: Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	linux-media, linux-staging, linux-kernel, outreachy-kernel

Em sex, 2021-04-09 às 14:42 -0300, Ezequiel Garcia escreveu:
> On Fri, 2021-04-09 at 19:25 +0200, Julia Lawall wrote:
> > 
> > 
> > On Fri, 9 Apr 2021, ascordeiro wrote:
> > 
> > > Em sex, 2021-04-09 às 13:44 -0300, Ezequiel Garcia escreveu:
> > > > Hi Aline,
> > > 
> > > Hi Ezequiel,
> > > > 
> > > > On Fri, 2021-04-09 at 10:54 -0300, Aline Santana Cordeiro
> > > > wrote:
> > > > > Rewrite macros resembling functions #define
> > > > > HANTRO_PP_REG_WRITE
> > > > > and #define HANTRO_PP_RED_WRITE_S in lower case, according
> > > > > with
> > > > > code style.
> > 
> > Maybe you can see if these macros can be converted to static inline
> > functions.  Macros don't provide any type checking.
> > 
> 
> I'd like to leave these as they are for now, tbh ^_^
> 
> A more massive refactoring is needed in this driver,
> but it needs proper testing and it's a more complex plan.

Okay, thank you for your attention :)

Aline

> 
> Thanks!
> Ezequiel
> 




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-04-09 18:26 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 13:54 [Outreachy kernel][PATCH] staging: media: hantro: Rewrite macro function in lower case Aline Santana Cordeiro
2021-04-09 16:44 ` Ezequiel Garcia
2021-04-09 16:44   ` Ezequiel Garcia
2021-04-09 17:00   ` ascordeiro
2021-04-09 17:00     ` ascordeiro
2021-04-09 17:15     ` Ezequiel Garcia
2021-04-09 17:15       ` Ezequiel Garcia
2021-04-09 17:36       ` ascordeiro
2021-04-09 17:36         ` ascordeiro
2021-04-09 17:25     ` Julia Lawall
2021-04-09 17:25       ` Julia Lawall
2021-04-09 17:39       ` ascordeiro
2021-04-09 17:39         ` ascordeiro
2021-04-09 17:42       ` Ezequiel Garcia
2021-04-09 17:42         ` Ezequiel Garcia
2021-04-09 18:26         ` ascordeiro
2021-04-09 18:26           ` ascordeiro

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.