Re: [PATCH 2/3] gpio: tegra: no need to cast away return value of debugfs_create_file()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 18, 2019 at 06:49:23PM +0100, Jon Hunter wrote:
> 
> On 18/06/2019 18:17, Greg Kroah-Hartman wrote:
> > 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@xxxxxxxxxx>
> >>> Cc: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> >>> Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
> >>> Cc: Jonathan Hunter <jonathanh@xxxxxxxxxx>
> >>> Cc: linux-gpio@xxxxxxxxxxxxxxx
> >>> Cc: linux-tegra@xxxxxxxxxxxxxxx
> >>> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> >>> ---
> >>>  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@xxxxxxxxxx>
> > 
> > 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?
> 
> No its fine, we can fix this.

Wonderful, thank you!

greg k-h



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux