linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] drivers: base: platform.c: Fix coding style issue.
@ 2020-03-10 18:17 Sladyn Nunes
  2020-03-10 18:32 ` Greg KH
  2020-03-10 18:33 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Sladyn Nunes @ 2020-03-10 18:17 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel-mentees, linux-kernel, rafael

Fixed whitespace and coding style issues in the
document.

Signed-off-by: Sladyn Nunes <sladynlinuxkernel@gmail.com>
---
 drivers/base/platform.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 7fa654f1288b..0da339e14437 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -552,7 +552,8 @@ int platform_device_add(struct platform_device *pdev)
 		if (p) {
 			ret = insert_resource(p, r);
 			if (ret) {
-				dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);
+				dev_err(&pdev->dev, "failed to claim resource %d: %pR\n",
+						 i, r);
 				goto failed;
 			}
 		}
@@ -573,6 +574,7 @@ int platform_device_add(struct platform_device *pdev)
 
 	while (i--) {
 		struct resource *r = &pdev->resource[i];
+
 		if (r->parent)
 			release_resource(r);
 	}
@@ -604,6 +606,7 @@ void platform_device_del(struct platform_device *pdev)
 
 		for (i = 0; i < pdev->num_resources; i++) {
 			struct resource *r = &pdev->resource[i];
+
 			if (r->parent)
 				release_resource(r);
 		}
@@ -997,7 +1000,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
 	if (len != -ENODEV)
 		return len;
 
-	len = acpi_device_modalias(dev, buf, PAGE_SIZE -1);
+	len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
 	if (len != -ENODEV)
 		return len;
 
-- 
2.18.0

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [Linux-kernel-mentees] [PATCH] drivers: base: platform.c: Fix coding style issue.
  2020-03-10 18:17 [Linux-kernel-mentees] [PATCH] drivers: base: platform.c: Fix coding style issue Sladyn Nunes
@ 2020-03-10 18:32 ` Greg KH
  2020-03-10 18:33 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-03-10 18:32 UTC (permalink / raw)
  To: Sladyn Nunes; +Cc: linux-kernel-mentees, linux-kernel, rafael

On Tue, Mar 10, 2020 at 11:47:12PM +0530, Sladyn Nunes wrote:
> Fixed whitespace and coding style issues in the
> document.
> 
> Signed-off-by: Sladyn Nunes <sladynlinuxkernel@gmail.com>
> ---
>  drivers/base/platform.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 7fa654f1288b..0da339e14437 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -552,7 +552,8 @@ int platform_device_add(struct platform_device *pdev)
>  		if (p) {
>  			ret = insert_resource(p, r);
>  			if (ret) {
> -				dev_err(&pdev->dev, "failed to claim resource %d: %pR\n", i, r);
> +				dev_err(&pdev->dev, "failed to claim resource %d: %pR\n",
> +						 i, r);
>  				goto failed;
>  			}
>  		}
> @@ -573,6 +574,7 @@ int platform_device_add(struct platform_device *pdev)
>  
>  	while (i--) {
>  		struct resource *r = &pdev->resource[i];
> +
>  		if (r->parent)
>  			release_resource(r);
>  	}
> @@ -604,6 +606,7 @@ void platform_device_del(struct platform_device *pdev)
>  
>  		for (i = 0; i < pdev->num_resources; i++) {
>  			struct resource *r = &pdev->resource[i];
> +
>  			if (r->parent)
>  				release_resource(r);
>  		}
> @@ -997,7 +1000,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a,
>  	if (len != -ENODEV)
>  		return len;
>  
> -	len = acpi_device_modalias(dev, buf, PAGE_SIZE -1);
> +	len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
>  	if (len != -ENODEV)
>  		return len;
>  
> -- 
> 2.18.0
> 

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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [Linux-kernel-mentees] [PATCH] drivers: base: platform.c: Fix coding style issue.
  2020-03-10 18:17 [Linux-kernel-mentees] [PATCH] drivers: base: platform.c: Fix coding style issue Sladyn Nunes
  2020-03-10 18:32 ` Greg KH
@ 2020-03-10 18:33 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-03-10 18:33 UTC (permalink / raw)
  To: Sladyn Nunes; +Cc: linux-kernel-mentees, linux-kernel, rafael

On Tue, Mar 10, 2020 at 11:47:12PM +0530, Sladyn Nunes wrote:
> Fixed whitespace and coding style issues in the
> document.
> 
> Signed-off-by: Sladyn Nunes <sladynlinuxkernel@gmail.com>
> ---
>  drivers/base/platform.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Also, please start with coding style issues in drivers/staging/ not
anywhere else in the kernel, you will have a much easier time there.

thanks,

greg k-h
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

end of thread, other threads:[~2020-03-10 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 18:17 [Linux-kernel-mentees] [PATCH] drivers: base: platform.c: Fix coding style issue Sladyn Nunes
2020-03-10 18:32 ` Greg KH
2020-03-10 18:33 ` Greg KH

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).