]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: axis-fifo: Remove unnecessary casts from file->private_data
authorOvidiu Panait <ovidiu.panait.oss@gmail.com>
Sat, 27 Dec 2025 21:26:36 +0000 (23:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jan 2026 12:54:12 +0000 (13:54 +0100)
Drop explicit casts when accessing file->private_data in the read() and
write() paths, as they are not needed.

Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Link: https://patch.msgid.link/20251227212640.3321310-5-ovidiu.panait.oss@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/axis-fifo/axis-fifo.c

index 4071060419ba15f48493e63987954b481bff460c..bf610e71253ed0b0a4ffbeac013a1bcf71bd8b3a 100644 (file)
@@ -157,7 +157,7 @@ static void reset_ip_core(struct axis_fifo *fifo)
 static ssize_t axis_fifo_read(struct file *f, char __user *buf,
                              size_t len, loff_t *off)
 {
-       struct axis_fifo *fifo = (struct axis_fifo *)f->private_data;
+       struct axis_fifo *fifo = f->private_data;
        size_t bytes_available;
        unsigned int words_available;
        unsigned int copied;
@@ -268,7 +268,7 @@ end_unlock:
 static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
                               size_t len, loff_t *off)
 {
-       struct axis_fifo *fifo = (struct axis_fifo *)f->private_data;
+       struct axis_fifo *fifo = f->private_data;
        unsigned int words_to_write;
        u32 *txbuf;
        int ret;