All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Shresth Prasad <shresthprasad7@gmail.com>
Cc: lee@kernel.org, jingoohan1@gmail.com, deller@gmx.de,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
	javier.carrasco.cruz@gmail.com,
	Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH][next] drivers: video: Simplify device_node cleanup using __free
Date: Fri, 19 Apr 2024 12:16:13 +0100	[thread overview]
Message-ID: <20240419111613.GA12884@aspen.lan> (raw)
In-Reply-To: <20240418194302.1466-1-shresthprasad7@gmail.com>

^^^

Please fix the subject line to be "backlight: <driver>: ...". I came
very close to deleting this patch without reading it ;-) .


On Fri, Apr 19, 2024 at 01:13:02AM +0530, Shresth Prasad wrote:
> diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
> index eb18c6eb0ff0..3c5d8125080c 100644
> --- a/drivers/video/backlight/sky81452-backlight.c
> +++ b/drivers/video/backlight/sky81452-backlight.c
> @@ -182,7 +182,7 @@ static const struct attribute_group sky81452_bl_attr_group = {
>  static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
>  							struct device *dev)
>  {
> -	struct device_node *np = of_node_get(dev->of_node);
> +	struct device_node *np __free(device_node) = of_node_get(dev->of_node);


Do we need to get dev->of_node at all? The device, which we are
borrowing, already owns a reference to the node so I don't see
any point in this function taking an extra one.

So why not simply make this:

	struct device_node *np = dev->of_node;


Daniel.

  reply	other threads:[~2024-04-19 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 19:43 [PATCH][next] drivers: video: Simplify device_node cleanup using __free Shresth Prasad
2024-04-19 11:16 ` Daniel Thompson [this message]
2024-04-19 18:52   ` Shresth Prasad
2024-04-19 19:43     ` Dmitry Baryshkov
2024-04-20  7:11       ` Shresth Prasad

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=20240419111613.GA12884@aspen.lan \
    --to=daniel.thompson@linaro.org \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=julia.lawall@inria.fr \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shresthprasad7@gmail.com \
    --cc=skhan@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.