mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Xiang wangx <wangxiang@cdjrlc.com>, jyri.sarha@iki.fi
Cc: 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 01:44:43 -0800	[thread overview]
Message-ID: <c0adb7fef6d51691e864fdaef5595a9014b12f1e.camel@perches.com> (raw)
In-Reply-To: <20211216092652.33414-1-wangxiang@cdjrlc.com>

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,

> @@ -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", },
>  		{ },



  reply	other threads:[~2021-12-16  9:44 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 [this message]
2021-12-16 10:20   ` Jyri Sarha

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=c0adb7fef6d51691e864fdaef5595a9014b12f1e.camel@perches.com \
    --to=joe@perches.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jyri.sarha@iki.fi \
    --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®