drivers/usb/serial/ftdi_sio.c | 16 ++++++++++------ drivers/usb/serial/ftdi_sio.h | 2 +- drivers/usb/serial/ftdi_sio_ids.h | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-)
Fix the following code style issues:
- Space before comma
- Missing blank line after declarations
- Superfluous space before statement
- Spaces used for indentation instead of tabs
- Misaligned block comment
- Space before tabs
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
---
drivers/usb/serial/ftdi_sio.c | 16 ++++++++++------
drivers/usb/serial/ftdi_sio.h | 2 +-
drivers/usb/serial/ftdi_sio_ids.h | 4 ++--
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 9b34e23b7091..60d24152e385 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -190,7 +190,7 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_232RL_PID) },
- { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) ,
+ { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID),
.driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk },
{ USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
@@ -1143,6 +1143,7 @@ static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base)
unsigned short int divisor;
/* divisor shifted 3 bits to the left */
int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud);
+
if ((divisor3 & 0x7) == 7)
divisor3++; /* round x.7/8 up to x+1 */
divisor = divisor3 >> 3;
@@ -1160,7 +1161,7 @@ static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base)
static unsigned short int ftdi_232am_baud_to_divisor(int baud)
{
- return ftdi_232am_baud_base_to_divisor(baud, 48000000);
+ return ftdi_232am_baud_base_to_divisor(baud, 48000000);
}
static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base)
@@ -1169,6 +1170,7 @@ static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base)
u32 divisor;
/* divisor shifted 3 bits to the left */
int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud);
+
divisor = divisor3 >> 3;
divisor |= (u32)divfrac[divisor3 & 0x7] << 14;
/* Deal with special cases for highest baud rates. */
@@ -1181,7 +1183,7 @@ static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base)
static u32 ftdi_232bm_baud_to_divisor(int baud)
{
- return ftdi_232bm_baud_base_to_divisor(baud, 48000000);
+ return ftdi_232bm_baud_base_to_divisor(baud, 48000000);
}
static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base)
@@ -1211,7 +1213,7 @@ static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base)
static u32 ftdi_2232h_baud_to_divisor(int baud)
{
- return ftdi_2232h_baud_base_to_divisor(baud, 120000000);
+ return ftdi_2232h_baud_base_to_divisor(baud, 120000000);
}
#define set_mctrl(port, set) update_mctrl((port), (set), 0)
@@ -1657,6 +1659,7 @@ static ssize_t latency_timer_show(struct device *dev,
{
struct usb_serial_port *port = to_usb_serial_port(dev);
struct ftdi_private *priv = usb_get_serial_port_data(port);
+
if (priv->flags & ASYNC_LOW_LATENCY)
return sprintf(buf, "1\n");
else
@@ -2194,6 +2197,7 @@ static int ftdi_probe(struct usb_serial *serial, const struct usb_device_id *id)
if (quirk && quirk->probe) {
int ret = quirk->probe(serial);
+
if (ret != 0)
return ret;
}
@@ -2621,8 +2625,8 @@ static bool ftdi_tx_empty(struct usb_serial_port *port)
* WARNING: set_termios calls this with old_termios in kernel space
*/
static void ftdi_set_termios(struct tty_struct *tty,
- struct usb_serial_port *port,
- const struct ktermios *old_termios)
+ struct usb_serial_port *port,
+ const struct ktermios *old_termios)
{
struct usb_device *dev = port->serial->dev;
struct device *ddev = &port->dev;
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index 55ea61264f91..d671d2194c64 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -95,7 +95,7 @@
*
* The Purge RX and TX buffer commands affect nothing except the buffers
*
- */
+ */
/* FTDI_SIO_SET_BAUDRATE */
#define FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE 0x40
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 52be47d684ea..3d9f6ed97783 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1022,7 +1022,7 @@
* Kondo Kagaku Co.Ltd.
* http://www.kondo-robot.com/EN
*/
-#define KONDO_VID 0x165c
+#define KONDO_VID 0x165c
#define KONDO_USB_SERIAL_PID 0x0002
/*
@@ -1446,7 +1446,7 @@
/*
* Accesio USB Data Acquisition products (http://www.accesio.com/)
*/
-#define ACCESIO_COM4SM_PID 0xD578
+#define ACCESIO_COM4SM_PID 0xD578
/* www.sciencescope.co.uk educational dataloggers */
#define FTDI_SCIENCESCOPE_LOGBOOKML_PID 0xFF18
--
2.34.1
On Mon, Mar 24, 2025 at 04:34:50PM +0000, Dominik Karol Piątkowski wrote: > Fix the following code style issues: > - Space before comma > - Missing blank line after declarations > - Superfluous space before statement > - Spaces used for indentation instead of tabs > - Misaligned block comment > - Space before tabs > > Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com> > --- > drivers/usb/serial/ftdi_sio.c | 16 ++++++++++------ > drivers/usb/serial/ftdi_sio.h | 2 +- > drivers/usb/serial/ftdi_sio_ids.h | 4 ++-- > 3 files changed, 13 insertions(+), 9 deletions(-) Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
© 2016 - 2025 Red Hat, Inc.