From: Helen Koike <helen.koike@collabora.com>
To: Ezequiel Garcia <ezequiel@collabora.com>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: kernel@collabora.com, Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH 1/3] rkisp1: Get rid of unused variable warning
Date: Thu, 2 Apr 2020 10:58:35 -0300 [thread overview]
Message-ID: <86db2adb-d567-afc4-b675-49ad031cd75e@collabora.com> (raw)
In-Reply-To: <20200401213721.24173-2-ezequiel@collabora.com>
On 4/1/20 6: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>
Acked-by: Helen Koike <helen.koike@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);
> rkisp1 = devm_kzalloc(dev, sizeof(*rkisp1), GFP_KERNEL);
> if (!rkisp1)
> return -ENOMEM;
>
next prev parent reply other threads:[~2020-04-02 13:58 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
2020-04-02 13:58 ` Helen Koike [this message]
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=86db2adb-d567-afc4-b675-49ad031cd75e@collabora.com \
--to=helen.koike@collabora.com \
--cc=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 \
/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).