projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a13bcd
)
video: fbdev: atari: Remove unneeded casts to void *
author
Geert Uytterhoeven
<geert@linux-m68k.org>
Mon, 11 Jul 2022 15:50:30 +0000
(17:50 +0200)
committer
Helge Deller
<deller@gmx.de>
Mon, 18 Jul 2022 05:56:18 +0000
(07:56 +0200)
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@linux-m68k.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/atafb.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/atafb.c
b/drivers/video/fbdev/atafb.c
index f20535ea3e54938430d426f33cb005f37742d4c1..fbc333d5615df5d599b785f054d8ebf201be2183 100644
(file)
--- 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);