Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671378

Re: [PATCH 1/2] drm/rockchip: add const to drm_encoder_helper_funcs structures

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
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 Wed, 21 Jun 2017 08:10:01 +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>
X-Original-To Mark yao <mark.yao@rock-chips.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BfS6fP0LUi4RDyTfF7LN+ogKKtBA9DAxDu5mqGZ5eIU=; b=IctH1oXjKkty8xKEO2bmDBveGd1BDWl77Avcqtt4FqM9iSM6TJeZdRaB/+x6r0wuQV CEQ92F/GBhTtAi7m39Wpm6iwGsV+SpneUHsfF0vaQv3f/yQdefFldEgtqzroaiKC8UZ0 S5LU/mqXXLLW1j0vZWNn0oYNi22KRxeWo0Vpcz70+iQhqxWWDxNMhl5JP1tdYIKy0GRW 8+5I0AJPDSdQl5eNejyz+W54bf4tM2+hJyq5KaNOnAOGg8pixamkcphM33AdUBcyx1y2 nL76k/Cw3lruiv80tgFSF6YSM8UJ3o9QcCQEvmycO7LEAczsMX/UjT2eyccIrUmFJW9r tIpg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=BfS6fP0LUi4RDyTfF7LN+ogKKtBA9DAxDu5mqGZ5eIU=; b=X9lFKLRvTVNsJGmHLIgzWrUDuu59gnb2EApvBv4QmPj+2gmrXnyDMwpCs4T+HggPfT +gXfHIWV3fv8FSkVqCXtnueCDw0JYlp/VFQlno+Le+44XUP3RScsEoSDmfp7wklfIC3L EZhh0TaRT5770K1iqR4tqwwpy2xz5DZcf434I3ROkUx9HlLbgTBM41CxN0nWDmIJn2R4 mFwTpPXaj+XKao5OkOfo6YP/qSfbMg5YfUuMwKUOAOUUQR+PHaW2MIGV7sHX9Dlk5zW9 eb0zXDnB2a7510MwmoQ3u8xIIapVOVRKFNBJaDMk+ujNU5H8PUyLsTatfkO3zQcCAMaG QYpA==
X-Gm-Message-State AKS2vOzpDzkTFtl0NgFG/8+n1EBqwLJjAKLQT/fYgyb8y1LW17lMjpyE OuBiVJASMg1O3oXClU+HoGIjWPD8uQ==
X-Received by 10.107.155.140 with SMTP id d134mr15496235ioe.88.1498025285125; Tue, 20 Jun 2017 23:08:05 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 72
Organization linux.* mail to news gateway
X-Original-Cc Julia Lawall <julia.lawall@lip6.fr>, maxime.ripard@free-electrons.com, airlied@linux.ie, Chen-Yu Tsai <wens@csie.org>, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stübner <heiko@sntech.de>, linux-rockchip@lists.infradead.org
X-Original-Date Wed, 21 Jun 2017 11:38:04 +0530
X-Original-Message-ID <CAOH+1jH5k0-veO_p-Jn91FYO04ZJ-ai0Zns17skXcB5ToY10=Q@mail.gmail.com>
X-Original-References <1497964080-27301-1-git-send-email-bhumirks@gmail.com> <1497964080-27301-2-git-send-email-bhumirks@gmail.com> <5949C274.6050806@rock-chips.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1671378

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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