All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Wambui Karuga <wambui.karugax@gmail.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>,
	Dave Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/arc: make arcpgu_debugfs_init return 0
Date: Tue, 18 Feb 2020 20:00:30 +0100	[thread overview]
Message-ID: <CAKMK7uHeSW-sFCZK09n89mJ66J3sb0EtxYU9Ojfi-adM7czTug@mail.gmail.com> (raw)
In-Reply-To: <20200218172821.18378-1-wambui.karugax@gmail.com>

On Tue, Feb 18, 2020 at 6:28 PM Wambui Karuga <wambui.karugax@gmail.com> wrote:
>
> As drm_debugfs_create_files should return void, remove its use as the
> return value of arcpgu_debugfs_init and have the latter function
> return 0 directly.
>
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
> index d6a6692db0ac..660b25f9588e 100644
> --- a/drivers/gpu/drm/arc/arcpgu_drv.c
> +++ b/drivers/gpu/drm/arc/arcpgu_drv.c
> @@ -139,8 +139,10 @@ static struct drm_info_list arcpgu_debugfs_list[] = {
>
>  static int arcpgu_debugfs_init(struct drm_minor *minor)
>  {
> -       return drm_debugfs_create_files(arcpgu_debugfs_list,
> -               ARRAY_SIZE(arcpgu_debugfs_list), minor->debugfs_root, minor);
> +       drm_debugfs_create_files(arcpgu_debugfs_list,
> +                                ARRAY_SIZE(arcpgu_debugfs_list),
> +                                minor->debugfs_root, minor);
> +       return 0;

For cases like these I think we should go a step further and also
remove the return value from the driver wrapper. And that all the way
up until there's something that actually needs to return a value for
some other reason than debugfs.
-Daniel

>  }
>  #endif
>
> --
> 2.25.0
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Wambui Karuga <wambui.karugax@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	Alexey Brodkin <abrodkin@synopsys.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/arc: make arcpgu_debugfs_init return 0
Date: Tue, 18 Feb 2020 20:00:30 +0100	[thread overview]
Message-ID: <CAKMK7uHeSW-sFCZK09n89mJ66J3sb0EtxYU9Ojfi-adM7czTug@mail.gmail.com> (raw)
In-Reply-To: <20200218172821.18378-1-wambui.karugax@gmail.com>

On Tue, Feb 18, 2020 at 6:28 PM Wambui Karuga <wambui.karugax@gmail.com> wrote:
>
> As drm_debugfs_create_files should return void, remove its use as the
> return value of arcpgu_debugfs_init and have the latter function
> return 0 directly.
>
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
> index d6a6692db0ac..660b25f9588e 100644
> --- a/drivers/gpu/drm/arc/arcpgu_drv.c
> +++ b/drivers/gpu/drm/arc/arcpgu_drv.c
> @@ -139,8 +139,10 @@ static struct drm_info_list arcpgu_debugfs_list[] = {
>
>  static int arcpgu_debugfs_init(struct drm_minor *minor)
>  {
> -       return drm_debugfs_create_files(arcpgu_debugfs_list,
> -               ARRAY_SIZE(arcpgu_debugfs_list), minor->debugfs_root, minor);
> +       drm_debugfs_create_files(arcpgu_debugfs_list,
> +                                ARRAY_SIZE(arcpgu_debugfs_list),
> +                                minor->debugfs_root, minor);
> +       return 0;

For cases like these I think we should go a step further and also
remove the return value from the driver wrapper. And that all the way
up until there's something that actually needs to return a value for
some other reason than debugfs.
-Daniel

>  }
>  #endif
>
> --
> 2.25.0
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-02-18 19:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 17:28 [PATCH] drm/arc: make arcpgu_debugfs_init return 0 Wambui Karuga
2020-02-18 17:28 ` Wambui Karuga
2020-02-18 17:28 ` [PATCH] drm/arm: make hdlcd_debugfs_init " Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-24 13:59   ` Liviu Dudau
2020-02-24 13:59     ` Liviu Dudau
2020-02-18 17:28 ` [PATCH 1/2] drm/debugfs: remove checks for return value of drm_debugfs functions Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-18 19:09   ` Daniel Vetter
2020-02-18 19:09     ` Daniel Vetter
2020-02-18 17:28 ` [PATCH] drm/etnaviv: remove check for return value of drm_debugfs function Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-18 17:38   ` Lucas Stach
2020-02-18 17:38     ` Lucas Stach
2020-02-18 18:02     ` Wambui Karuga
2020-02-18 18:02       ` Wambui Karuga
2020-02-18 17:28 ` [PATCH] drm/i915: make i915_debugfs_register return void Wambui Karuga
2020-02-18 17:28   ` [Intel-gfx] " Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-18 17:28 ` [PATCH] drm/nouveau: remove checks for return value of debugfs functions Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-19  5:39   ` [Nouveau] " Ben Skeggs
2020-02-19  5:39     ` Ben Skeggs
2020-02-19  5:39     ` Ben Skeggs
2020-02-18 17:28 ` [PATCH] drm/v3d: make v3d_debugfs_init return 0 Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-19 18:46   ` Eric Anholt
2020-02-19 18:46     ` Eric Anholt
2020-02-18 17:28 ` [PATCH] drm/vc4: remove check of return value of drm_debugfs functions Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-18 17:28 ` [PATCH] drm/vram-helper: make drm_vram_mm_debugfs_init return 0 Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-19  6:00   ` Thomas Zimmermann
2020-02-19  6:00     ` Thomas Zimmermann
2020-02-18 17:28 ` [PATCH 2/2] drm: convert drm_debugfs functions to return void Wambui Karuga
2020-02-18 17:28   ` Wambui Karuga
2020-02-18 18:19 ` [PATCH] drm/arc: make arcpgu_debugfs_init return 0 Greg KH
2020-02-18 18:19   ` Greg KH
2020-02-18 19:00 ` Daniel Vetter [this message]
2020-02-18 19:00   ` Daniel Vetter
2020-02-18 19:18   ` Daniel Vetter
2020-02-18 19:18     ` Daniel Vetter
2020-02-19  0:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: make i915_debugfs_register return void Patchwork
2020-02-20 13:40 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=CAKMK7uHeSW-sFCZK09n89mJ66J3sb0EtxYU9Ojfi-adM7czTug@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=abrodkin@synopsys.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wambui.karugax@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 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.