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 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.

> 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>

Thanks
Jon

-- 
nvpublic



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux