linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: bamv2005@gmail.com, linus.walleij@linaro.org,
	bgolaszewski@baylibre.com,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH 2/3] gpio: tegra: no need to cast away return value of debugfs_create_file()
Date: Tue, 18 Jun 2019 19:17:27 +0200	[thread overview]
Message-ID: <20190618171727.GA26838@kroah.com> (raw)
In-Reply-To: <06e0fa20-7bf9-7e5d-93a7-efba1379f74d@nvidia.com>

On Tue, Jun 18, 2019 at 05:26:28PM +0100, Jon Hunter wrote:
> 
> On 18/06/2019 16:50, Greg Kroah-Hartman wrote:
> > It is fine to ignore the return value (and encouraged), so need to cast
> 
> I assume you mean 'no need' here.

{sigh} yes :)

> > away the return value, you will not get a build warning at all.
> > 
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Jonathan Hunter <jonathanh@nvidia.com>
> > Cc: linux-gpio@vger.kernel.org
> > Cc: linux-tegra@vger.kernel.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  drivers/gpio/gpio-tegra.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> > index 6d9b6906b9d0..a54bba1bda6c 100644
> > --- a/drivers/gpio/gpio-tegra.c
> > +++ b/drivers/gpio/gpio-tegra.c
> > @@ -550,8 +550,8 @@ DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio);
> >  
> >  static void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
> >  {
> > -	(void) debugfs_create_file("tegra_gpio", 0444,
> > -				   NULL, tgi, &tegra_dbg_gpio_fops);
> > +	debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
> > +			    &tegra_dbg_gpio_fops);
> >  }
> >  
> >  #else
> 
> Looks like we can get rid of this entire function and just call
> debugfs_create_file directly to simplify the code even more. We can
> handle that.
> 
> Acked-by: Jon Hunter <jonathanh@nvidia.com>

Great!  Do you want to just take this through your tree and then add
that change on top of it?  Or do you need me to take it and make that
change?

thanks,

greg k-h

  reply	other threads:[~2019-06-18 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 15:50 [PATCH 1/3] gpiolib: no need to cast away return value of debugfs_create_file() Greg Kroah-Hartman
2019-06-18 15:50 ` [PATCH 2/3] gpio: tegra: " Greg Kroah-Hartman
2019-06-18 16:26   ` Jon Hunter
2019-06-18 17:17     ` Greg Kroah-Hartman [this message]
2019-06-18 17:49       ` Jon Hunter
2019-06-18 18:05         ` Greg Kroah-Hartman
2019-06-19  8:19   ` Thierry Reding
2019-06-25 12:45   ` Linus Walleij
2019-06-18 15:50 ` [PATCH 3/3] gpio: mockup: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-06-20  7:25   ` [PATCH v2] " Greg Kroah-Hartman
2019-06-24  8:20     ` Bartosz Golaszewski
2019-06-25 12:29 ` [PATCH 1/3] gpiolib: no need to cast away return value of debugfs_create_file() Linus Walleij

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=20190618171727.GA26838@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bamv2005@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.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).