Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1671378
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures |
| Date | 2017-06-21 08:10 +0200 |
| Message-ID | <tUGZX-2ml-3@gated-at.bofh.it> (permalink) |
| References | <tUrey-FV-35@gated-at.bofh.it> <tUrey-FV-33@gated-at.bofh.it> <tUC0h-7jD-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures Bhumika Goyal <bhumirks@gmail.com> - 2017-06-20 15:20 +0200
Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures Mark yao <mark.yao@rock-chips.com> - 2017-06-21 02:50 +0200
Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures Bhumika Goyal <bhumirks@gmail.com> - 2017-06-21 08:10 +0200
csiph-web