Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706373 > unrolled thread
| Started by | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| First post | 2017-08-08 13:30 +0200 |
| Last post | 2017-08-10 08:30 +0200 |
| Articles | 8 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] drm: make drm_connector_funcs structures const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-08 13:30 +0200
[PATCH 1/3] drm/bridge: make drm_connector_funcs structures const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-08 13:30 +0200
Re: [PATCH 1/3] drm/bridge: make drm_connector_funcs structures const Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-08-08 14:10 +0200
[PATCH 2/3] drm/sun4i: make drm_connector_funcs structures const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-08 13:30 +0200
[PATCH 3/3] drm/rockchip: make drm_connector_funcs structures const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-08 13:30 +0200
Re: [PATCH 0/3] drm: make drm_connector_funcs structures const Archit Taneja <architt@codeaurora.org> - 2017-08-09 12:40 +0200
Re: [PATCH 0/3] drm: make drm_connector_funcs structures const Daniel Vetter <daniel@ffwll.ch> - 2017-08-09 18:40 +0200
Re: [PATCH 0/3] drm: make drm_connector_funcs structures const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-10 08:30 +0200
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-08-08 13:30 +0200 |
| Subject | [PATCH 0/3] drm: make drm_connector_funcs structures const |
| Message-ID | <ucaRY-7FO-13@gated-at.bofh.it> |
Declare drm_connector_funcs structures as const. Bhumika Goyal (3): drm/bridge: make drm_connector_funcs structures const drm/sun4i: make drm_connector_funcs structures const drm/rockchip: make drm_connector_funcs structures const drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +- 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, 4 insertions(+), 4 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-08-08 13:30 +0200 |
| Subject | [PATCH 1/3] drm/bridge: make drm_connector_funcs structures const |
| Message-ID | <ucaRY-7FO-29@gated-at.bofh.it> |
| In reply to | #1706373 |
Make these const as they are only passed to the function
drm_connector_init and the corresponding argument is of type const.
Done using Coccinelle
@match disable optional_qualifier@
identifier s;
@@
static struct drm_connector_funcs s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier match.s;
expression e1,e2;
position ref.p;
@@
drm_connector_init(e1,e2,&s@p,...)
@bad depends on !good1@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct drm_connector_funcs s;
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index ff9792d..ee16635 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -785,7 +785,7 @@ static int adv7511_connector_get_modes(struct drm_connector *connector)
return adv7511_detect(adv, connector);
}
-static struct drm_connector_funcs adv7511_connector_funcs = {
+static const struct drm_connector_funcs adv7511_connector_funcs = {
.dpms = drm_atomic_helper_connector_dpms,
.fill_modes = drm_helper_probe_single_connector_modes,
.detect = adv7511_connector_detect,
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Date | 2017-08-08 14:10 +0200 |
| Subject | Re: [PATCH 1/3] drm/bridge: make drm_connector_funcs structures const |
| Message-ID | <ucbuH-8cT-51@gated-at.bofh.it> |
| In reply to | #1706378 |
Hi Bhumika,
Thank you for the patch.
On Tuesday 08 Aug 2017 16:58:30 Bhumika Goyal wrote:
> Make these const as they are only passed to the function
> drm_connector_init and the corresponding argument is of type const.
> Done using Coccinelle
>
> @match disable optional_qualifier@
> identifier s;
> @@
> static struct drm_connector_funcs s = {...};
>
> @ref@
> position p;
> identifier match.s;
> @@
> s@p
>
> @good1@
> identifier match.s;
> expression e1,e2;
> position ref.p;
> @@
> drm_connector_init(e1,e2,&s@p,...)
>
> @bad depends on !good1@
> position ref.p;
> identifier match.s;
> @@
> s@p
>
> @depends on forall !bad disable optional_qualifier@
> identifier match.s;
> @@
> static
> + const
> struct drm_connector_funcs s;
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
I can't judge the semantic patch, but the C code change looks good to me.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index ff9792d..ee16635
> 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -785,7 +785,7 @@ static int adv7511_connector_get_modes(struct
> drm_connector *connector) return adv7511_detect(adv, connector);
> }
>
> -static struct drm_connector_funcs adv7511_connector_funcs = {
> +static const struct drm_connector_funcs adv7511_connector_funcs = {
> .dpms = drm_atomic_helper_connector_dpms,
> .fill_modes = drm_helper_probe_single_connector_modes,
> .detect = adv7511_connector_detect,
--
Regards,
Laurent Pinchart
[toc] | [prev] | [next] | [standalone]
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-08-08 13:30 +0200 |
| Subject | [PATCH 2/3] drm/sun4i: make drm_connector_funcs structures const |
| Message-ID | <ucaRZ-7FO-51@gated-at.bofh.it> |
| In reply to | #1706373 |
Make these const as they are only passed to the function
drm_connector_init and the corresponding argument is of type const.
Done using Coccinelle
@match disable optional_qualifier@
identifier s;
@@
static struct drm_connector_funcs s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier match.s;
expression e1,e2;
position ref.p;
@@
drm_connector_init(e1,e2,&s@p,...)
@bad depends on !good1@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct drm_connector_funcs s;
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 76362c0..4a456de 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -119,7 +119,7 @@ static int sun4i_rgb_mode_valid(struct drm_connector *connector,
drm_connector_cleanup(connector);
}
-static struct drm_connector_funcs sun4i_rgb_con_funcs = {
+static const struct drm_connector_funcs sun4i_rgb_con_funcs = {
.dpms = drm_atomic_helper_connector_dpms,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = sun4i_rgb_connector_destroy,
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 73bfe7b..d246794 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -537,7 +537,7 @@ static int sun4i_tv_comp_mode_valid(struct drm_connector *connector,
drm_connector_cleanup(connector);
}
-static struct drm_connector_funcs sun4i_tv_comp_connector_funcs = {
+static const struct drm_connector_funcs sun4i_tv_comp_connector_funcs = {
.dpms = drm_atomic_helper_connector_dpms,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = sun4i_tv_comp_connector_destroy,
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-08-08 13:30 +0200 |
| Subject | [PATCH 3/3] drm/rockchip: make drm_connector_funcs structures const |
| Message-ID | <ucaRZ-7FO-57@gated-at.bofh.it> |
| In reply to | #1706373 |
Make these const as they are only passed to the function
drm_connector_init and the corresponding argument is of type const.
Done using Coccinelle
@match disable optional_qualifier@
identifier s;
@@
static struct drm_connector_funcs s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier match.s;
expression e1,e2;
position ref.p;
@@
drm_connector_init(e1,e2,&s@p,...)
@bad depends on !good1@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct drm_connector_funcs s;
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
index 7149968..1a1a3dd 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -592,7 +592,7 @@ static void inno_hdmi_connector_destroy(struct drm_connector *connector)
drm_connector_cleanup(connector);
}
-static struct drm_connector_funcs inno_hdmi_connector_funcs = {
+static const struct drm_connector_funcs inno_hdmi_connector_funcs = {
.dpms = drm_atomic_helper_connector_dpms,
.fill_modes = inno_hdmi_probe_single_connector_modes,
.detect = inno_hdmi_connector_detect,
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Archit Taneja <architt@codeaurora.org> |
|---|---|
| Date | 2017-08-09 12:40 +0200 |
| Message-ID | <ucwz8-5TC-3@gated-at.bofh.it> |
| In reply to | #1706373 |
On 08/08/2017 04:58 PM, Bhumika Goyal wrote: > Declare drm_connector_funcs structures as const. Could you rebase this series over the latest drm-misc-next? The recently merged patch "drm: Nuke drm_atomic_helper_connector_dpms" causes conflicts with these. drm-misc-next: https://cgit.freedesktop.org/drm/drm-misc/log/ Thanks, Archit > > Bhumika Goyal (3): > drm/bridge: make drm_connector_funcs structures const > drm/sun4i: make drm_connector_funcs structures const > drm/rockchip: make drm_connector_funcs structures const > > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +- > 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, 4 insertions(+), 4 deletions(-) > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Date | 2017-08-09 18:40 +0200 |
| Message-ID | <ucCbw-1mZ-19@gated-at.bofh.it> |
| In reply to | #1707259 |
On Wed, Aug 09, 2017 at 04:02:45PM +0530, Archit Taneja wrote: > > > On 08/08/2017 04:58 PM, Bhumika Goyal wrote: > > Declare drm_connector_funcs structures as const. > > Could you rebase this series over the latest drm-misc-next? The > recently merged patch "drm: Nuke drm_atomic_helper_connector_dpms" > causes conflicts with these. I got bored and fixed up the conflicts (wiggle pulled it off). All applied, no need to resend. Thanks, Daniel > > drm-misc-next: > > https://cgit.freedesktop.org/drm/drm-misc/log/ > > Thanks, > Archit > > > > > Bhumika Goyal (3): > > drm/bridge: make drm_connector_funcs structures const > > drm/sun4i: make drm_connector_funcs structures const > > drm/rockchip: make drm_connector_funcs structures const > > > > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +- > > 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, 4 insertions(+), 4 deletions(-) > > > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > a Linux Foundation Collaborative Project > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
[toc] | [prev] | [next] | [standalone]
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-08-10 08:30 +0200 |
| Message-ID | <ucP8J-1KB-7@gated-at.bofh.it> |
| In reply to | #1707475 |
On Wed, Aug 9, 2017 at 10:07 PM, Daniel Vetter <daniel@ffwll.ch> wrote: > On Wed, Aug 09, 2017 at 04:02:45PM +0530, Archit Taneja wrote: >> >> >> On 08/08/2017 04:58 PM, Bhumika Goyal wrote: >> > Declare drm_connector_funcs structures as const. >> >> Could you rebase this series over the latest drm-misc-next? The >> recently merged patch "drm: Nuke drm_atomic_helper_connector_dpms" >> causes conflicts with these. > > I got bored and fixed up the conflicts (wiggle pulled it off). All > applied, no need to resend. > Thank you :) Thanks, Bhumika > Thanks, Daniel > >> >> drm-misc-next: >> >> https://cgit.freedesktop.org/drm/drm-misc/log/ >> >> Thanks, >> Archit >> >> > >> > Bhumika Goyal (3): >> > drm/bridge: make drm_connector_funcs structures const >> > drm/sun4i: make drm_connector_funcs structures const >> > drm/rockchip: make drm_connector_funcs structures const >> > >> > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +- >> > 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, 4 insertions(+), 4 deletions(-) >> > >> >> -- >> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, >> a Linux Foundation Collaborative Project >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web