linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: Robin Murphy <robin.murphy@arm.com>,
	linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>, kernel@collabora.com
Subject: Re: [PATCH 1/3] rkisp1: Get rid of unused variable warning
Date: Thu, 02 Apr 2020 13:31:27 -0300	[thread overview]
Message-ID: <530189e1af69fb04168cf1237aa2990895e471dd.camel@collabora.com> (raw)
In-Reply-To: <b994a6fe-865b-d5c4-7f3f-ed6b1815f37f@arm.com>

On Thu, 2020-04-02 at 10:47 +0100, Robin Murphy wrote:
> On 2020-04-01 10:37 pm, Ezequiel Garcia wrote:
> > If CONFIG_OF is not selected, the compiler will complain:
> > 
> > drivers/staging/media/rkisp1/rkisp1-dev.c: In function ‘rkisp1_probe’:
> > drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: warning: unused variable ‘node’ [-Wunused-variable]
> >    457 |  struct device_node *node = pdev->dev.of_node;
> > 
> > Rework the code slightly and make the compiler happy.
> > 
> > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> > ---
> >   drivers/staging/media/rkisp1/rkisp1-dev.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c
> > index b1b3c058e957..5e7e797aad71 100644
> > --- a/drivers/staging/media/rkisp1/rkisp1-dev.c
> > +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c
> > @@ -454,7 +454,6 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1)
> >   
> >   static int rkisp1_probe(struct platform_device *pdev)
> >   {
> > -	struct device_node *node = pdev->dev.of_node;
> >   	const struct rkisp1_match_data *clk_data;
> >   	const struct of_device_id *match;
> >   	struct device *dev = &pdev->dev;
> > @@ -463,7 +462,7 @@ static int rkisp1_probe(struct platform_device *pdev)
> >   	unsigned int i;
> >   	int ret, irq;
> >   
> > -	match = of_match_node(rkisp1_of_match, node);
> > +	match = of_match_node(rkisp1_of_match, pdev->dev.of_node);
> 
> FWIW you could clean up "match" too by using of_device_get_match_data().
> 

Ah, that's nicer.

Thanks,
Ezequiel


  reply	other threads:[~2020-04-02 16:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 21:37 [PATCH 0/3] Rockchip ISP1 minor fixes Ezequiel Garcia
2020-04-01 21:37 ` [PATCH 1/3] rkisp1: Get rid of unused variable warning Ezequiel Garcia
2020-04-02  9:47   ` Robin Murphy
2020-04-02 16:31     ` Ezequiel Garcia [this message]
2020-04-02 13:58   ` Helen Koike
2020-04-01 21:37 ` [PATCH 2/3] phy-rockchip-dphy-rx0: Drop unneeded CONFIG_OF dependency Ezequiel Garcia
2020-04-02 13:59   ` Helen Koike
2020-04-21  3:55     ` Ezequiel Garcia
2020-04-01 21:37 ` [PATCH 3/3] rkisp1: Fix wrong PHY config dependency Ezequiel Garcia
2020-04-02 13:59   ` Helen Koike

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=530189e1af69fb04168cf1237aa2990895e471dd.camel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robin.murphy@arm.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).