All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message
@ 2015-02-25 22:10 aybuke ozdemir
  2015-02-25 22:10 ` [PATCH 2/3] Staging: i2o: Remove unnecessary braces aybuke ozdemir
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: aybuke ozdemir @ 2015-02-25 22:10 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: aybuke ozdemir

This patch removes unnecessay out of memory message fixing the following
checkpach.pl warning in device.c

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
---
 drivers/staging/i2o/device.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
index 2af2255..162a887 100644
--- a/drivers/staging/i2o/device.c
+++ b/drivers/staging/i2o/device.c
@@ -566,7 +566,6 @@ int i2o_parm_table_get(struct i2o_device *dev, int oper, int group,
 
 	opblk = kmalloc(size, GFP_KERNEL);
 	if (opblk == NULL) {
-		printk(KERN_ERR "i2o: no memory for query buffer.\n");
 		return -ENOMEM;
 	}
 
-- 
1.9.1



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

* [PATCH 2/3] Staging: i2o: Remove unnecessary braces
  2015-02-25 22:10 [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
@ 2015-02-25 22:10 ` aybuke ozdemir
  2015-02-25 22:10 ` [PATCH 3/3] Staging: i2o: Corrected code indentation aybuke ozdemir
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: aybuke ozdemir @ 2015-02-25 22:10 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: aybuke ozdemir

Brackets were removed from the expression that containing single
statement. Removed following checkpatch.pl warnings:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
---
 drivers/staging/i2o/device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
index 162a887..e47496c 100644
--- a/drivers/staging/i2o/device.c
+++ b/drivers/staging/i2o/device.c
@@ -565,9 +565,8 @@ int i2o_parm_table_get(struct i2o_device *dev, int oper, int group,
 		size += 4 - size % 4;
 
 	opblk = kmalloc(size, GFP_KERNEL);
-	if (opblk == NULL) {
+	if (opblk == NULL)
 		return -ENOMEM;
-	}
 
 	opblk[0] = 1;		/* operation count */
 	opblk[1] = 0;		/* pad */
-- 
1.9.1



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

* [PATCH 3/3] Staging: i2o: Corrected code indentation
  2015-02-25 22:10 [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
  2015-02-25 22:10 ` [PATCH 2/3] Staging: i2o: Remove unnecessary braces aybuke ozdemir
@ 2015-02-25 22:10 ` aybuke ozdemir
  2015-02-25 22:19   ` [Outreachy kernel] " Julia Lawall
  2015-02-25 22:20 ` [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message Julia Lawall
  2015-02-25 23:00 ` Greg KH
  3 siblings, 1 reply; 8+ messages in thread
From: aybuke ozdemir @ 2015-02-25 22:10 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: aybuke ozdemir

WARNING: suspect code indent for conditional statements(8,12)
spaces are converting to tabs suspect code indent is deleted.
That was found by running checkpatch.pl

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
---
 drivers/staging/i2o/device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
index e47496c..d643043 100644
--- a/drivers/staging/i2o/device.c
+++ b/drivers/staging/i2o/device.c
@@ -260,9 +260,9 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
 
 	/* create user entries referring to this device */
 	list_for_each_entry(tmp, &c->devices, list)
-	    if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
+		if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
 		&& (tmp != i2o_dev)) {
-		rc = sysfs_create_link(&tmp->device.kobj,
+			rc = sysfs_create_link(&tmp->device.kobj,
 				       &i2o_dev->device.kobj, "user");
 		if (rc)
 			goto rmlink1;
@@ -279,9 +279,9 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
 
 	/* create parent entries referring to this device */
 	list_for_each_entry(tmp, &c->devices, list)
-	    if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
+		if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
 		&& (tmp != i2o_dev)) {
-		rc = sysfs_create_link(&tmp->device.kobj,
+			rc = sysfs_create_link(&tmp->device.kobj,
 				       &i2o_dev->device.kobj, "parent");
 		if (rc)
 			goto rmlink2;
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH 3/3] Staging: i2o: Corrected code indentation
  2015-02-25 22:10 ` [PATCH 3/3] Staging: i2o: Corrected code indentation aybuke ozdemir
@ 2015-02-25 22:19   ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2015-02-25 22:19 UTC (permalink / raw)
  To: aybuke ozdemir; +Cc: outreachy-kernel

>  	list_for_each_entry(tmp, &c->devices, list)
> -	    if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
> +		if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
>  		&& (tmp != i2o_dev)) {

The line above should not be left aligned with the if.

> -		rc = sysfs_create_link(&tmp->device.kobj,
> +			rc = sysfs_create_link(&tmp->device.kobj,
>  				       &i2o_dev->device.kobj, "user");

Maybe it is possible to push the second line of the call to the right a 
bit more to align with the start of the argument on the line before.

The same comments apply below.

julia

>  		if (rc)
>  			goto rmlink1;
> @@ -279,9 +279,9 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
>  
>  	/* create parent entries referring to this device */
>  	list_for_each_entry(tmp, &c->devices, list)
> -	    if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
> +		if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
>  		&& (tmp != i2o_dev)) {
> -		rc = sysfs_create_link(&tmp->device.kobj,
> +			rc = sysfs_create_link(&tmp->device.kobj,
>  				       &i2o_dev->device.kobj, "parent");
>  		if (rc)
>  			goto rmlink2;
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424902222-10105-3-git-send-email-aybuke.147%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* Re: [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message
  2015-02-25 22:10 [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
  2015-02-25 22:10 ` [PATCH 2/3] Staging: i2o: Remove unnecessary braces aybuke ozdemir
  2015-02-25 22:10 ` [PATCH 3/3] Staging: i2o: Corrected code indentation aybuke ozdemir
@ 2015-02-25 22:20 ` Julia Lawall
  2015-02-25 23:00 ` Greg KH
  3 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2015-02-25 22:20 UTC (permalink / raw)
  To: aybuke ozdemir; +Cc: outreachy-kernel

On Thu, 26 Feb 2015, aybuke ozdemir wrote:

> This patch removes unnecessay out of memory message fixing the following

unnecessary

> checkpach.pl warning in device.c
> 
> Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
> ---
>  drivers/staging/i2o/device.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
> index 2af2255..162a887 100644
> --- a/drivers/staging/i2o/device.c
> +++ b/drivers/staging/i2o/device.c
> @@ -566,7 +566,6 @@ int i2o_parm_table_get(struct i2o_device *dev, int oper, int group,
>  
>  	opblk = kmalloc(size, GFP_KERNEL);
>  	if (opblk == NULL) {
> -		printk(KERN_ERR "i2o: no memory for query buffer.\n");
>  		return -ENOMEM;
>  	}

Now you don't need the braces.  Your change should not introduce new 
checkpatch errors.

julia

> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424902222-10105-1-git-send-email-aybuke.147%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* Re: [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message
  2015-02-25 22:10 [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
                   ` (2 preceding siblings ...)
  2015-02-25 22:20 ` [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message Julia Lawall
@ 2015-02-25 23:00 ` Greg KH
  2015-02-25 23:03   ` Julia Lawall
  3 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2015-02-25 23:00 UTC (permalink / raw)
  To: aybuke ozdemir; +Cc: outreachy-kernel

On Thu, Feb 26, 2015 at 12:10:20AM +0200, aybuke ozdemir wrote:
> This patch removes unnecessay out of memory message fixing the following
> checkpach.pl warning in device.c
> 
> Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
> ---
>  drivers/staging/i2o/device.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
> index 2af2255..162a887 100644
> --- a/drivers/staging/i2o/device.c
> +++ b/drivers/staging/i2o/device.c
> @@ -566,7 +566,6 @@ int i2o_parm_table_get(struct i2o_device *dev, int oper, int group,
>  
>  	opblk = kmalloc(size, GFP_KERNEL);
>  	if (opblk == NULL) {
> -		printk(KERN_ERR "i2o: no memory for query buffer.\n");
>  		return -ENOMEM;
>  	}
>  
> -- 
> 1.9.1

I'll take these, but please stay away from the i2o drivers, they are
going to be removed from the kernel soon and are not worth the cleanup.

thanks,

greg k-h


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

* Re: [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message
  2015-02-25 23:00 ` Greg KH
@ 2015-02-25 23:03   ` Julia Lawall
  2015-02-25 23:17     ` aybüke özdemir
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2015-02-25 23:03 UTC (permalink / raw)
  To: Greg KH; +Cc: aybuke ozdemir, outreachy-kernel

> I'll take these, but please stay away from the i2o drivers, they are
> going to be removed from the kernel soon and are not worth the cleanup.

Aybuke,

There is a list of directories to avoid in:

http://kernelnewbies.org/Outreachyfirstpatch

In the section Find a driver to clean up.  Concretely,

i2o
line6
media/parport
media/tlg2300
media/vino

julia


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

* Re: [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message
  2015-02-25 23:03   ` Julia Lawall
@ 2015-02-25 23:17     ` aybüke özdemir
  0 siblings, 0 replies; 8+ messages in thread
From: aybüke özdemir @ 2015-02-25 23:17 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Greg KH, outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

I am sorry, I'm clean now. Thanks :)

2015-02-26 1:03 GMT+02:00 Julia Lawall <julia.lawall@lip6.fr>:

> > I'll take these, but please stay away from the i2o drivers, they are
> > going to be removed from the kernel soon and are not worth the cleanup.
>
> Aybuke,
>
> There is a list of directories to avoid in:
>
> http://kernelnewbies.org/Outreachyfirstpatch
>
> In the section Find a driver to clean up.  Concretely,
>
> i2o
> line6
> media/parport
> media/tlg2300
> media/vino
>
> julia
>



-- 
Aybüke Özdemir
http://www.aybukeozdemir.com

[-- Attachment #2: Type: text/html, Size: 1480 bytes --]

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

end of thread, other threads:[~2015-02-25 23:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-25 22:10 [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
2015-02-25 22:10 ` [PATCH 2/3] Staging: i2o: Remove unnecessary braces aybuke ozdemir
2015-02-25 22:10 ` [PATCH 3/3] Staging: i2o: Corrected code indentation aybuke ozdemir
2015-02-25 22:19   ` [Outreachy kernel] " Julia Lawall
2015-02-25 22:20 ` [Outreachy kernel] [PATCH 1/3] Staging: i2o: Remove unnecessary 'out of memory' message Julia Lawall
2015-02-25 23:00 ` Greg KH
2015-02-25 23:03   ` Julia Lawall
2015-02-25 23:17     ` aybüke özdemir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.