diff mbox series

[3/5] drm/amdgpu: Remove superfluous void * cast in debugfs_create_file() call

Message ID 20191021145149.31657-4-geert+renesas@glider.be (mailing list archive)
State New, archived
Headers show
Series debugfs: Remove casts in debugfs_create_*() callers | expand

Commit Message

Geert Uytterhoeven Oct. 21, 2019, 2:51 p.m. UTC
There is no need to cast a typed pointer to a void pointer when calling
a function that accepts the latter.  Remove it, as the cast prevents
further compiler checks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Deucher Oct. 28, 2019, 5:56 p.m. UTC | #1
On Mon, Oct 21, 2019 at 6:23 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> There is no need to cast a typed pointer to a void pointer when calling
> a function that accepts the latter.  Remove it, as the cast prevents
> further compiler checks.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 5652cc72ed3a9b3a..b97a38b1e089b3d6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -1090,8 +1090,8 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
>  {
>         adev->debugfs_preempt =
>                 debugfs_create_file("amdgpu_preempt_ib", 0600,
> -                                   adev->ddev->primary->debugfs_root,
> -                                   (void *)adev, &fops_ib_preempt);
> +                                   adev->ddev->primary->debugfs_root, adev,
> +                                   &fops_ib_preempt);
>         if (!(adev->debugfs_preempt)) {
>                 DRM_ERROR("unable to create amdgpu_preempt_ib debugsfs file\n");
>                 return -EIO;
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 5652cc72ed3a9b3a..b97a38b1e089b3d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1090,8 +1090,8 @@  int amdgpu_debugfs_init(struct amdgpu_device *adev)
 {
 	adev->debugfs_preempt =
 		debugfs_create_file("amdgpu_preempt_ib", 0600,
-				    adev->ddev->primary->debugfs_root,
-				    (void *)adev, &fops_ib_preempt);
+				    adev->ddev->primary->debugfs_root, adev,
+				    &fops_ib_preempt);
 	if (!(adev->debugfs_preempt)) {
 		DRM_ERROR("unable to create amdgpu_preempt_ib debugsfs file\n");
 		return -EIO;