[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d1da8bf1b21759bcda39c572bc102c5a6380b1a8.1657554353.git.geert@linux-m68k.org>
Date: Mon, 11 Jul 2022 17:50:30 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Helge Deller <deller@....de>
Cc: Michael Schmitz <schmitzmic@...il.com>,
Jonathan Corbet <corbet@....net>, linux-fbdev@...r.kernel.org,
linux-doc@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 06/10] video: fbdev: atari: Remove unneeded casts to void *
Arbitrary pointers can be passed to functions accepting "void *" without
casting.
Remove the casts, as they make it impossible to validate types.
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
drivers/video/fbdev/atafb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index f20535ea3e549384..fbc333d5615df5d5 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -2599,14 +2599,14 @@ atafb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
switch (cmd) {
#ifdef FBCMD_GET_CURRENTPAR
case FBCMD_GET_CURRENTPAR:
- if (copy_to_user((void *)arg, (void *)¤t_par,
+ if (copy_to_user((void *)arg, ¤t_par,
sizeof(struct atafb_par)))
return -EFAULT;
return 0;
#endif
#ifdef FBCMD_SET_CURRENTPAR
case FBCMD_SET_CURRENTPAR:
- if (copy_from_user((void *)¤t_par, (void *)arg,
+ if (copy_from_user(¤t_par, (void *)arg,
sizeof(struct atafb_par)))
return -EFAULT;
ata_set_par(¤t_par);
--
2.25.1
Powered by blists - more mailing lists