linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <baohua@kernel.org>
To: Baolin Wang <baolin.wang7@gmail.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	linux-remoteproc@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org, bjorn.andersson@linaro.org
Subject: Re: [PATCH] hwspinlock: sirf: Remove the redundant 'of_match_ptr'
Date: Fri, 10 Jul 2020 18:08:14 +1200	[thread overview]
Message-ID: <CAGsJ_4y25psj9vAyjstFQiGwAd_TfTdyeNt41YbXfphOXoFVig@mail.gmail.com> (raw)
In-Reply-To: <250d35cb489c3c4c066f7ce256d27f36712a1979.1591618255.git.baolin.wang7@gmail.com>

Baolin Wang <baolin.wang7@gmail.com> 于2020年6月9日周二 上午12:22写道:
>
> Remove the the redundant 'of_match_ptr' macro to fix below warning
> when the CONFIG_OF is not selected.
>
> All warnings:
> drivers/hwspinlock/sirf_hwspinlock.c:87:34: warning: unused variable
> 'sirf_hwpinlock_ids' [-Wunused-const-variable]
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
> ---
>  drivers/hwspinlock/sirf_hwspinlock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c
> index 823d3c4f621e..a3f77120bad7 100644
> --- a/drivers/hwspinlock/sirf_hwspinlock.c
> +++ b/drivers/hwspinlock/sirf_hwspinlock.c
> @@ -94,7 +94,7 @@ static struct platform_driver sirf_hwspinlock_driver = {
>         .probe = sirf_hwspinlock_probe,
>         .driver = {
>                 .name = "atlas7_hwspinlock",
> -               .of_match_table = of_match_ptr(sirf_hwpinlock_ids),
> +               .of_match_table = sirf_hwpinlock_ids,

is it better to do?

#ifdef CONFIG_OF
static const struct of_device_id sirf_hwpinlock_ids[] = {
        { .compatible = "sirf,hwspinlock", },
        {},
};
MODULE_DEVICE_TABLE(of, sirf_hwpinlock_ids);
#endif

>         },
>  };
>
> --
> 2.17.1

Thanks
barry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2020-07-10  6:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 12:20 [PATCH] hwspinlock: sirf: Remove the redundant 'of_match_ptr' Baolin Wang
2020-07-10  6:08 ` Barry Song [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=CAGsJ_4y25psj9vAyjstFQiGwAd_TfTdyeNt41YbXfphOXoFVig@mail.gmail.com \
    --to=baohua@kernel.org \
    --cc=baolin.wang7@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.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;
as well as URLs for NNTP newsgroup(s).