Patch "tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tty-mips_ejtag_fdc-fix-passing-incompatible-pointer-.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3804bdb51f0d0d6ad30275ff05143e27686f7e7d
Author: Serge Semin <fancer.lancer@xxxxxxxxx>
Date:   Thu Feb 15 20:17:29 2024 +0300

    tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning
    
    [ Upstream commit 188942f05ce45f80c06f7242ad7478bd204c3387 ]
    
    mips_ejtag_fdc_encode() method expects having a first argument passed of
    the "u8 **" type, meanwhile the driver passes the "const char **" type.
    That causes the next build-warning:
    
    drivers/tty/mips_ejtag_fdc.c: In function ‘mips_ejtag_fdc_console_write’:
    drivers/tty/mips_ejtag_fdc.c:343:32: error: passing argument 1 of ‘mips_ejtag_fdc_encode’ from incompatible pointer type [-Werror=incompatible-pointer-types]
       word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1);
                                    ^
    drivers/tty/mips_ejtag_fdc.c:216:24: note: expected ‘const u8 ** {aka const unsigned char **}’ but argument is of type ‘const char **’
     static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
                            ^~~~~~~~~~~~~~~~~~~~~
    
    Fix it by altering the type of the pointer which is passed to the
    mips_ejtag_fdc_encode() method.
    
    Fixes: ce7cbd9a6c81 ("tty: mips_ejtag_fdc: use u8 for character pointers")
    Signed-off-by: Serge Semin <fancer.lancer@xxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index aac80b69a069c..afbf7738c7c47 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -309,7 +309,7 @@ static void mips_ejtag_fdc_console_write(struct console *c, const char *s,
 	unsigned int i, buf_len, cpu;
 	bool done_cr = false;
 	char buf[4];
-	const char *buf_ptr = buf;
+	const u8 *buf_ptr = buf;
 	/* Number of bytes of input data encoded up to each byte in buf */
 	u8 inc[4];
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux