All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm: constify drm_encoder_helper_funcs structures
@ 2017-06-20 13:07 ` Bhumika Goyal
  0 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-20 13:07 UTC (permalink / raw)
  To: julia.lawall, maxime.ripard, airlied, wens, dri-devel,
	linux-arm-kernel, linux-kernel, mark.yao, heiko, linux-rockchip
  Cc: Bhumika Goyal

Add const to drm_encoder_helper_funcs structures.

Bhumika Goyal (2):
  drm/rockchip: add const to drm_encoder_helper_funcs structures
  drm/sun4i: add const to drm_encoder_helper_funcs structures

 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
 drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
 drivers/gpu/drm/sun4i/sun4i_rgb.c               | 2 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c                | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.7.4

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

* [PATCH 0/2] drm: constify drm_encoder_helper_funcs structures
@ 2017-06-20 13:07 ` Bhumika Goyal
  0 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-20 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

Add const to drm_encoder_helper_funcs structures.

Bhumika Goyal (2):
  drm/rockchip: add const to drm_encoder_helper_funcs structures
  drm/sun4i: add const to drm_encoder_helper_funcs structures

 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
 drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
 drivers/gpu/drm/sun4i/sun4i_rgb.c               | 2 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c                | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

-- 
2.7.4

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

* [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
  2017-06-20 13:07 ` Bhumika Goyal
@ 2017-06-20 13:07   ` Bhumika Goyal
  -1 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-20 13:07 UTC (permalink / raw)
  To: julia.lawall, maxime.ripard, airlied, wens, dri-devel,
	linux-arm-kernel, linux-kernel, mark.yao, heiko, linux-rockchip
  Cc: Bhumika Goyal

Add const to drm_encoder_helper_funcs structures as they are only passed
as an argument to the function drm_encoder_helper_add and this argument
is of type const. So, add const to these structures. Also, fix line over
80 characters warning while adding const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
 drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index 9606121..96c6c10 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct drm_encoder *encoder,
 	return 0;
 }
 
-static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
+static
+const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
 	.mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
 	.mode_set = rockchip_dp_drm_encoder_mode_set,
 	.enable = rockchip_dp_drm_encoder_enable,
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
index 7d9b75e..4ab9fad 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
 	return 0;
 }
 
-static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
 	.enable     = inno_hdmi_encoder_enable,
 	.disable    = inno_hdmi_encoder_disable,
 	.mode_fixup = inno_hdmi_encoder_mode_fixup,
-- 
2.7.4

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

* [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
@ 2017-06-20 13:07   ` Bhumika Goyal
  0 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-20 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

Add const to drm_encoder_helper_funcs structures as they are only passed
as an argument to the function drm_encoder_helper_add and this argument
is of type const. So, add const to these structures. Also, fix line over
80 characters warning while adding const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
 drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index 9606121..96c6c10 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct drm_encoder *encoder,
 	return 0;
 }
 
-static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
+static
+const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
 	.mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
 	.mode_set = rockchip_dp_drm_encoder_mode_set,
 	.enable = rockchip_dp_drm_encoder_enable,
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
index 7d9b75e..4ab9fad 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
 	return 0;
 }
 
-static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
 	.enable     = inno_hdmi_encoder_enable,
 	.disable    = inno_hdmi_encoder_disable,
 	.mode_fixup = inno_hdmi_encoder_mode_fixup,
-- 
2.7.4

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

* [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures
  2017-06-20 13:07 ` Bhumika Goyal
@ 2017-06-20 13:08   ` Bhumika Goyal
  -1 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-20 13:08 UTC (permalink / raw)
  To: julia.lawall, maxime.ripard, airlied, wens, dri-devel,
	linux-arm-kernel, linux-kernel, mark.yao, heiko, linux-rockchip
  Cc: Bhumika Goyal

Add const to drm_encoder_helper_funcs structures as they are only passed
as an argument to the function drm_encoder_helper_add and this argument
is of type const. So, add const to these structures.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index 422b191..67847d2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -181,7 +181,7 @@ static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,
 	clk_set_phase(tcon->dclk, 120);
 }
 
-static struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
+static const struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
 	.atomic_check	= sun4i_rgb_atomic_check,
 	.mode_set	= sun4i_rgb_encoder_mode_set,
 	.disable	= sun4i_rgb_encoder_disable,
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 338b9e5..b20f97a 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -488,7 +488,7 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
 	regmap_write(tv->regs, SUN4I_TVE_SLAVE_REG, 0);
 }
 
-static struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
+static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
 	.atomic_check	= sun4i_tv_atomic_check,
 	.disable	= sun4i_tv_disable,
 	.enable		= sun4i_tv_enable,
-- 
2.7.4

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

* [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures
@ 2017-06-20 13:08   ` Bhumika Goyal
  0 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-20 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Add const to drm_encoder_helper_funcs structures as they are only passed
as an argument to the function drm_encoder_helper_add and this argument
is of type const. So, add const to these structures.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index 422b191..67847d2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -181,7 +181,7 @@ static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,
 	clk_set_phase(tcon->dclk, 120);
 }
 
-static struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
+static const struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
 	.atomic_check	= sun4i_rgb_atomic_check,
 	.mode_set	= sun4i_rgb_encoder_mode_set,
 	.disable	= sun4i_rgb_encoder_disable,
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 338b9e5..b20f97a 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -488,7 +488,7 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
 	regmap_write(tv->regs, SUN4I_TVE_SLAVE_REG, 0);
 }
 
-static struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
+static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
 	.atomic_check	= sun4i_tv_atomic_check,
 	.disable	= sun4i_tv_disable,
 	.enable		= sun4i_tv_enable,
-- 
2.7.4

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

* Re: [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures
  2017-06-20 13:08   ` Bhumika Goyal
@ 2017-06-20 13:35     ` Maxime Ripard
  -1 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2017-06-20 13:35 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: julia.lawall, airlied, wens, dri-devel, linux-arm-kernel,
	linux-kernel, mark.yao, heiko, linux-rockchip

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

On Tue, Jun 20, 2017 at 06:38:00PM +0530, Bhumika Goyal wrote:
> Add const to drm_encoder_helper_funcs structures as they are only passed
> as an argument to the function drm_encoder_helper_add and this argument
> is of type const. So, add const to these structures.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures
@ 2017-06-20 13:35     ` Maxime Ripard
  0 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2017-06-20 13:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 20, 2017 at 06:38:00PM +0530, Bhumika Goyal wrote:
> Add const to drm_encoder_helper_funcs structures as they are only passed
> as an argument to the function drm_encoder_helper_add and this argument
> is of type const. So, add const to these structures.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170620/6b4310e9/attachment.sig>

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

* Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
  2017-06-20 13:07   ` Bhumika Goyal
  (?)
@ 2017-06-21  0:48     ` Mark yao
  -1 siblings, 0 replies; 13+ messages in thread
From: Mark yao @ 2017-06-21  0:48 UTC (permalink / raw)
  To: Bhumika Goyal, julia.lawall, maxime.ripard, airlied, wens,
	dri-devel, linux-arm-kernel, linux-kernel, heiko, linux-rockchip

On 2017年06月20日 21:07, Bhumika Goyal wrote:
> Add const to drm_encoder_helper_funcs structures as they are only passed
> as an argument to the function drm_encoder_helper_add and this argument
> is of type const. So, add const to these structures. Also, fix line over
> 80 characters warning while adding const.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
>   drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index 9606121..96c6c10 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct drm_encoder *encoder,
>   	return 0;
>   }
>   
> -static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
> +static
> +const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {

I don't think split static and const into two line is a good idea, it's 
ugly. I'm ok over 80 characters with good-looking.
Or split like following:
static const struct drm_encoder_helper_funcs
rockchip_dp_encoder_helper_funcs = {

>   	.mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
>   	.mode_set = rockchip_dp_drm_encoder_mode_set,
>   	.enable = rockchip_dp_drm_encoder_enable,
> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
> index 7d9b75e..4ab9fad 100644
> --- a/drivers/gpu/drm/rockchip/inno_hdmi.c
> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
> @@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
>   	return 0;
>   }
>   
> -static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
> +static const struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
>   	.enable     = inno_hdmi_encoder_enable,
>   	.disable    = inno_hdmi_encoder_disable,
>   	.mode_fixup = inno_hdmi_encoder_mode_fixup,

Thanks

-- 
Mark Yao

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

* Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
@ 2017-06-21  0:48     ` Mark yao
  0 siblings, 0 replies; 13+ messages in thread
From: Mark yao @ 2017-06-21  0:48 UTC (permalink / raw)
  To: Bhumika Goyal, julia.lawall, maxime.ripard, airlied, wens,
	dri-devel, linux-arm-kernel, linux-kernel, heiko, linux-rockchip

On 2017年06月20日 21:07, Bhumika Goyal wrote:
> Add const to drm_encoder_helper_funcs structures as they are only passed
> as an argument to the function drm_encoder_helper_add and this argument
> is of type const. So, add const to these structures. Also, fix line over
> 80 characters warning while adding const.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
>   drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index 9606121..96c6c10 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct drm_encoder *encoder,
>   	return 0;
>   }
>   
> -static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
> +static
> +const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {

I don't think split static and const into two line is a good idea, it's 
ugly. I'm ok over 80 characters with good-looking.
Or split like following:
static const struct drm_encoder_helper_funcs
rockchip_dp_encoder_helper_funcs = {

>   	.mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
>   	.mode_set = rockchip_dp_drm_encoder_mode_set,
>   	.enable = rockchip_dp_drm_encoder_enable,
> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
> index 7d9b75e..4ab9fad 100644
> --- a/drivers/gpu/drm/rockchip/inno_hdmi.c
> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
> @@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
>   	return 0;
>   }
>   
> -static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
> +static const struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
>   	.enable     = inno_hdmi_encoder_enable,
>   	.disable    = inno_hdmi_encoder_disable,
>   	.mode_fixup = inno_hdmi_encoder_mode_fixup,

Thanks

-- 
Mark Yao


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
@ 2017-06-21  0:48     ` Mark yao
  0 siblings, 0 replies; 13+ messages in thread
From: Mark yao @ 2017-06-21  0:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 2017?06?20? 21:07, Bhumika Goyal wrote:
> Add const to drm_encoder_helper_funcs structures as they are only passed
> as an argument to the function drm_encoder_helper_add and this argument
> is of type const. So, add const to these structures. Also, fix line over
> 80 characters warning while adding const.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
>   drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> index 9606121..96c6c10 100644
> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> @@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct drm_encoder *encoder,
>   	return 0;
>   }
>   
> -static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
> +static
> +const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {

I don't think split static and const into two line is a good idea, it's 
ugly. I'm ok over 80 characters with good-looking.
Or split like following:
static const struct drm_encoder_helper_funcs
rockchip_dp_encoder_helper_funcs = {

>   	.mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
>   	.mode_set = rockchip_dp_drm_encoder_mode_set,
>   	.enable = rockchip_dp_drm_encoder_enable,
> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
> index 7d9b75e..4ab9fad 100644
> --- a/drivers/gpu/drm/rockchip/inno_hdmi.c
> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
> @@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
>   	return 0;
>   }
>   
> -static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
> +static const struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = {
>   	.enable     = inno_hdmi_encoder_enable,
>   	.disable    = inno_hdmi_encoder_disable,
>   	.mode_fixup = inno_hdmi_encoder_mode_fixup,

Thanks

-- 
?ark Yao

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

* Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
  2017-06-21  0:48     ` Mark yao
@ 2017-06-21  6:08       ` Bhumika Goyal
  -1 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-21  6:08 UTC (permalink / raw)
  To: Mark yao
  Cc: Julia Lawall, maxime.ripard, airlied, Chen-Yu Tsai, dri-devel,
	linux-arm-kernel, linux-kernel, Heiko Stübner,
	linux-rockchip

On Wed, Jun 21, 2017 at 6:18 AM, Mark yao <mark.yao@rock-chips.com> wrote:
> On 2017年06月20日 21:07, Bhumika Goyal wrote:
>>
>> Add const to drm_encoder_helper_funcs structures as they are only passed
>> as an argument to the function drm_encoder_helper_add and this argument
>> is of type const. So, add const to these structures. Also, fix line over
>> 80 characters warning while adding const.
>>
>> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
>> ---
>>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
>>   drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> index 9606121..96c6c10 100644
>> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> @@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct
>> drm_encoder *encoder,
>>         return 0;
>>   }
>>   -static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs
>> = {
>> +static
>> +const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs =
>> {
>
>
> I don't think split static and const into two line is a good idea, it's
> ugly. I'm ok over 80 characters with good-looking.
> Or split like following:
> static const struct drm_encoder_helper_funcs
> rockchip_dp_encoder_helper_funcs = {
>

Okay, so I will let the line exceed over 80 characters and send a v2.

Thanks,
Bhumika

>>         .mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
>>         .mode_set = rockchip_dp_drm_encoder_mode_set,
>>         .enable = rockchip_dp_drm_encoder_enable,
>> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c
>> b/drivers/gpu/drm/rockchip/inno_hdmi.c
>> index 7d9b75e..4ab9fad 100644
>> --- a/drivers/gpu/drm/rockchip/inno_hdmi.c
>> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
>> @@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder
>> *encoder,
>>         return 0;
>>   }
>>   -static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs =
>> {
>> +static const struct drm_encoder_helper_funcs
>> inno_hdmi_encoder_helper_funcs = {
>>         .enable     = inno_hdmi_encoder_enable,
>>         .disable    = inno_hdmi_encoder_disable,
>>         .mode_fixup = inno_hdmi_encoder_mode_fixup,
>
>
> Thanks
>
> --
> Mark Yao
>
>

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

* [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures
@ 2017-06-21  6:08       ` Bhumika Goyal
  0 siblings, 0 replies; 13+ messages in thread
From: Bhumika Goyal @ 2017-06-21  6:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 21, 2017 at 6:18 AM, Mark yao <mark.yao@rock-chips.com> wrote:
> On 2017?06?20? 21:07, Bhumika Goyal wrote:
>>
>> Add const to drm_encoder_helper_funcs structures as they are only passed
>> as an argument to the function drm_encoder_helper_add and this argument
>> is of type const. So, add const to these structures. Also, fix line over
>> 80 characters warning while adding const.
>>
>> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
>> ---
>>   drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++-
>>   drivers/gpu/drm/rockchip/inno_hdmi.c            | 2 +-
>>   2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> index 9606121..96c6c10 100644
>> --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
>> @@ -252,7 +252,8 @@ rockchip_dp_drm_encoder_atomic_check(struct
>> drm_encoder *encoder,
>>         return 0;
>>   }
>>   -static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs
>> = {
>> +static
>> +const struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs =
>> {
>
>
> I don't think split static and const into two line is a good idea, it's
> ugly. I'm ok over 80 characters with good-looking.
> Or split like following:
> static const struct drm_encoder_helper_funcs
> rockchip_dp_encoder_helper_funcs = {
>

Okay, so I will let the line exceed over 80 characters and send a v2.

Thanks,
Bhumika

>>         .mode_fixup = rockchip_dp_drm_encoder_mode_fixup,
>>         .mode_set = rockchip_dp_drm_encoder_mode_set,
>>         .enable = rockchip_dp_drm_encoder_enable,
>> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c
>> b/drivers/gpu/drm/rockchip/inno_hdmi.c
>> index 7d9b75e..4ab9fad 100644
>> --- a/drivers/gpu/drm/rockchip/inno_hdmi.c
>> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
>> @@ -530,7 +530,7 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder
>> *encoder,
>>         return 0;
>>   }
>>   -static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs =
>> {
>> +static const struct drm_encoder_helper_funcs
>> inno_hdmi_encoder_helper_funcs = {
>>         .enable     = inno_hdmi_encoder_enable,
>>         .disable    = inno_hdmi_encoder_disable,
>>         .mode_fixup = inno_hdmi_encoder_mode_fixup,
>
>
> Thanks
>
> --
> ?ark Yao
>
>

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

end of thread, other threads:[~2017-06-21  6:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-20 13:07 [PATCH 0/2] drm: constify drm_encoder_helper_funcs structures Bhumika Goyal
2017-06-20 13:07 ` Bhumika Goyal
2017-06-20 13:07 ` [PATCH 1/2] drm/rockchip: add const to " Bhumika Goyal
2017-06-20 13:07   ` Bhumika Goyal
2017-06-21  0:48   ` Mark yao
2017-06-21  0:48     ` Mark yao
2017-06-21  0:48     ` Mark yao
2017-06-21  6:08     ` Bhumika Goyal
2017-06-21  6:08       ` Bhumika Goyal
2017-06-20 13:08 ` [PATCH 2/2] drm/sun4i: " Bhumika Goyal
2017-06-20 13:08   ` Bhumika Goyal
2017-06-20 13:35   ` Maxime Ripard
2017-06-20 13:35     ` Maxime Ripard

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.