From: Jyri Sarha <jyri.sarha@iki.fi>
To: Joe Perches <joe@perches.com>
Cc: Xiang wangx <wangxiang@cdjrlc.com>,
tomba@kernel.org, airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/tilcdc: add const to of_device_id
Date: Thu, 16 Dec 2021 12:20:52 +0200 [thread overview]
Message-ID: <ae333b46910989862ca2bd17f409833b@iki.fi> (raw)
In-Reply-To: <c0adb7fef6d51691e864fdaef5595a9014b12f1e.camel@perches.com>
On 2021-12-16 11:44, Joe Perches wrote:
> On Thu, 2021-12-16 at 17:26 +0800, Xiang wangx wrote:
>> struct of_device_id should normally be const.
> []
>> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
>> b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> []
>> @@ -60,7 +60,7 @@ void tilcdc_module_cleanup(struct tilcdc_module
>> *mod)
>> list_del(&mod->list);
>> }
>>
>> -static struct of_device_id tilcdc_of_match[];
>> +static const struct of_device_id tilcdc_of_match[];
>
> This line could likely be removed instead.
>
> $ git grep -w -n tilcdc_of_match
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:63:static struct of_device_id
> tilcdc_of_match[];
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:590:static struct of_device_id
> tilcdc_of_match[] = {
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:595:MODULE_DEVICE_TABLE(of,
> tilcdc_of_match);
> drivers/gpu/drm/tilcdc/tilcdc_drv.c:603:
> .of_match_table = tilcdc_of_match,
>
Oh yes. It appears to have been there from day one and even then it was
bogus.
Xiang Wang, could you produce one more version of the patch with the
declaration removed.
Best regards,
Jyri
>> @@ -587,7 +587,7 @@ static int tilcdc_pdev_remove(struct
>> platform_device *pdev)
>> return 0;
>> }
>>
>> -static struct of_device_id tilcdc_of_match[] = {
>> +static const struct of_device_id tilcdc_of_match[] = {
>> { .compatible = "ti,am33xx-tilcdc", },
>> { .compatible = "ti,da850-tilcdc", },
>> { },
prev parent reply other threads:[~2021-12-16 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 9:26 Xiang wangx
2021-12-16 9:44 ` Joe Perches
2021-12-16 10:20 ` Jyri Sarha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae333b46910989862ca2bd17f409833b@iki.fi \
--to=jyri.sarha@iki.fi \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tomba@kernel.org \
--cc=wangxiang@cdjrlc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®