linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: icom: Fix some indentation
@ 2022-08-15 12:05 Christophe JAILLET
  2022-08-16  5:51 ` Jiri Slaby
  2022-08-30 11:33 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-08-15 12:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-serial

checkpatch and smatch report some code alignment issues.

So remove some unneeded leading spaces to fix the warnings.

While at it remove some {} around a single statement and convert some
spaces into a tab.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/tty/serial/icom.c | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
index 45df29947fe8..3ac81622c4fb 100644
--- a/drivers/tty/serial/icom.c
+++ b/drivers/tty/serial/icom.c
@@ -1727,10 +1727,10 @@ static int icom_probe(struct pci_dev *dev,
 
 	retval = pci_request_regions(dev, "icom");
 	if (retval) {
-		 dev_err(&dev->dev, "pci_request_regions FAILED\n");
-		 pci_disable_device(dev);
-		 return retval;
-	 }
+		dev_err(&dev->dev, "pci_request_regions FAILED\n");
+		pci_disable_device(dev);
+		return retval;
+	}
 
 	pci_set_master(dev);
 
@@ -1754,9 +1754,9 @@ static int icom_probe(struct pci_dev *dev,
 
 	retval = icom_alloc_adapter(&icom_adapter);
 	if (retval) {
-		 dev_err(&dev->dev, "icom_alloc_adapter FAILED\n");
-		 retval = -EIO;
-		 goto probe_exit0;
+		dev_err(&dev->dev, "icom_alloc_adapter FAILED\n");
+		retval = -EIO;
+		goto probe_exit0;
 	}
 
 	icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
@@ -1778,11 +1778,10 @@ static int icom_probe(struct pci_dev *dev,
 		goto probe_exit1;
 	}
 
-	 /* save off irq and request irq line */
-	 retval = request_irq(dev->irq, icom_interrupt, IRQF_SHARED, ICOM_DRIVER_NAME, (void *)icom_adapter);
-	 if (retval) {
-		  goto probe_exit2;
-	 }
+	/* save off irq and request irq line */
+	retval = request_irq(dev->irq, icom_interrupt, IRQF_SHARED, ICOM_DRIVER_NAME, (void *)icom_adapter);
+	if (retval)
+		goto probe_exit2;
 
 	retval = icom_load_ports(icom_adapter);
 
@@ -1798,11 +1797,11 @@ static int icom_probe(struct pci_dev *dev,
 			icom_port->uart_port.fifosize = 16;
 			icom_port->uart_port.ops = &icom_ops;
 			icom_port->uart_port.line =
-		        icom_port->port + icom_adapter->index * 4;
+			icom_port->port + icom_adapter->index * 4;
 			if (uart_add_one_port (&icom_uart_driver, &icom_port->uart_port)) {
 				icom_port->status = ICOM_PORT_OFF;
 				dev_err(&dev->dev, "Device add failed\n");
-			 } else
+			} else
 				dev_info(&dev->dev, "Device added\n");
 		}
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: icom: Fix some indentation
  2022-08-15 12:05 [PATCH] serial: icom: Fix some indentation Christophe JAILLET
@ 2022-08-16  5:51 ` Jiri Slaby
  2022-08-30 11:33 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2022-08-16  5:51 UTC (permalink / raw)
  To: Christophe JAILLET, Greg Kroah-Hartman
  Cc: linux-kernel, kernel-janitors, linux-serial

On 15. 08. 22, 14:05, Christophe JAILLET wrote:
> checkpatch and smatch report some code alignment issues.
> 
> So remove some unneeded leading spaces to fix the warnings.
> 
> While at it remove some {} around a single statement and convert some
> spaces into a tab.

Looks good, but maintainers don't like the "While at it" part :D.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/tty/serial/icom.c | 27 +++++++++++++--------------
>   1 file changed, 13 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
> index 45df29947fe8..3ac81622c4fb 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1727,10 +1727,10 @@ static int icom_probe(struct pci_dev *dev,
>   
>   	retval = pci_request_regions(dev, "icom");
>   	if (retval) {
> -		 dev_err(&dev->dev, "pci_request_regions FAILED\n");
> -		 pci_disable_device(dev);
> -		 return retval;
> -	 }
> +		dev_err(&dev->dev, "pci_request_regions FAILED\n");
> +		pci_disable_device(dev);
> +		return retval;
> +	}
>   
>   	pci_set_master(dev);
>   
> @@ -1754,9 +1754,9 @@ static int icom_probe(struct pci_dev *dev,
>   
>   	retval = icom_alloc_adapter(&icom_adapter);
>   	if (retval) {
> -		 dev_err(&dev->dev, "icom_alloc_adapter FAILED\n");
> -		 retval = -EIO;
> -		 goto probe_exit0;
> +		dev_err(&dev->dev, "icom_alloc_adapter FAILED\n");
> +		retval = -EIO;
> +		goto probe_exit0;
>   	}
>   
>   	icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
> @@ -1778,11 +1778,10 @@ static int icom_probe(struct pci_dev *dev,
>   		goto probe_exit1;
>   	}
>   
> -	 /* save off irq and request irq line */
> -	 retval = request_irq(dev->irq, icom_interrupt, IRQF_SHARED, ICOM_DRIVER_NAME, (void *)icom_adapter);
> -	 if (retval) {
> -		  goto probe_exit2;
> -	 }
> +	/* save off irq and request irq line */
> +	retval = request_irq(dev->irq, icom_interrupt, IRQF_SHARED, ICOM_DRIVER_NAME, (void *)icom_adapter);
> +	if (retval)
> +		goto probe_exit2;
>   
>   	retval = icom_load_ports(icom_adapter);
>   
> @@ -1798,11 +1797,11 @@ static int icom_probe(struct pci_dev *dev,
>   			icom_port->uart_port.fifosize = 16;
>   			icom_port->uart_port.ops = &icom_ops;
>   			icom_port->uart_port.line =
> -		        icom_port->port + icom_adapter->index * 4;
> +			icom_port->port + icom_adapter->index * 4;
>   			if (uart_add_one_port (&icom_uart_driver, &icom_port->uart_port)) {
>   				icom_port->status = ICOM_PORT_OFF;
>   				dev_err(&dev->dev, "Device add failed\n");
> -			 } else
> +			} else
>   				dev_info(&dev->dev, "Device added\n");
>   		}
>   	}

-- 
js
suse labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: icom: Fix some indentation
  2022-08-15 12:05 [PATCH] serial: icom: Fix some indentation Christophe JAILLET
  2022-08-16  5:51 ` Jiri Slaby
@ 2022-08-30 11:33 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2022-08-30 11:33 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Jiri Slaby, linux-kernel, kernel-janitors, linux-serial

On Mon, Aug 15, 2022 at 02:05:50PM +0200, Christophe JAILLET wrote:
> checkpatch and smatch report some code alignment issues.
> 
> So remove some unneeded leading spaces to fix the warnings.
> 
> While at it remove some {} around a single statement and convert some
> spaces into a tab.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/tty/serial/icom.c | 27 +++++++++++++--------------
>  1 file changed, 13 insertions(+), 14 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-30 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-15 12:05 [PATCH] serial: icom: Fix some indentation Christophe JAILLET
2022-08-16  5:51 ` Jiri Slaby
2022-08-30 11:33 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).