All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Staging: i2o: Remove unnecessary 'out of memory' message
@ 2015-02-25 23:12 aybuke ozdemir
  2015-02-25 23:12 ` [PATCH v2 2/2] Staging: i2o: Corrected code indentation aybuke ozdemir
  0 siblings, 1 reply; 3+ messages in thread
From: aybuke ozdemir @ 2015-02-25 23:12 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 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
index 2af2255..e47496c 100644
--- a/drivers/staging/i2o/device.c
+++ b/drivers/staging/i2o/device.c
@@ -565,10 +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) {
-		printk(KERN_ERR "i2o: no memory for query buffer.\n");
+	if (opblk == NULL)
 		return -ENOMEM;
-	}
 
 	opblk[0] = 1;		/* operation count */
 	opblk[1] = 0;		/* pad */
-- 
1.9.1



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

* [PATCH v2 2/2] Staging: i2o: Corrected code indentation
  2015-02-25 23:12 [PATCH v2 1/2] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
@ 2015-02-25 23:12 ` aybuke ozdemir
  2015-02-26 18:38   ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: aybuke ozdemir @ 2015-02-25 23:12 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 | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
index e47496c..cd6da9c 100644
--- a/drivers/staging/i2o/device.c
+++ b/drivers/staging/i2o/device.c
@@ -260,10 +260,10 @@ 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)
-		&& (tmp != i2o_dev)) {
-		rc = sysfs_create_link(&tmp->device.kobj,
-				       &i2o_dev->device.kobj, "user");
+		if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
+						&& (tmp != i2o_dev)) {
+			rc = sysfs_create_link(&tmp->device.kobj,
+						&i2o_dev->device.kobj, "user");
 		if (rc)
 			goto rmlink1;
 	}
@@ -279,10 +279,10 @@ 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)
-		&& (tmp != i2o_dev)) {
-		rc = sysfs_create_link(&tmp->device.kobj,
-				       &i2o_dev->device.kobj, "parent");
+		if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
+						&& (tmp != i2o_dev)) {
+			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] 3+ messages in thread

* Re: [Outreachy kernel] [PATCH v2 2/2] Staging: i2o: Corrected code indentation
  2015-02-25 23:12 ` [PATCH v2 2/2] Staging: i2o: Corrected code indentation aybuke ozdemir
@ 2015-02-26 18:38   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2015-02-26 18:38 UTC (permalink / raw)
  To: aybuke ozdemir; +Cc: outreachy-kernel

On Thu, Feb 26, 2015 at 01:12:19AM +0200, aybuke ozdemir wrote:
> 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 | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/i2o/device.c b/drivers/staging/i2o/device.c
> index e47496c..cd6da9c 100644
> --- a/drivers/staging/i2o/device.c
> +++ b/drivers/staging/i2o/device.c
> @@ -260,10 +260,10 @@ 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)
> -		&& (tmp != i2o_dev)) {
> -		rc = sysfs_create_link(&tmp->device.kobj,
> -				       &i2o_dev->device.kobj, "user");
> +		if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
> +						&& (tmp != i2o_dev)) {
> +			rc = sysfs_create_link(&tmp->device.kobj,
> +						&i2o_dev->device.kobj, "user");
>  		if (rc)
>  			goto rmlink1;

Something is still wrong with the indentation here, sorry.  Look at the
{ placement.

thanks,

greg k-h


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

end of thread, other threads:[~2015-02-26 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 23:12 [PATCH v2 1/2] Staging: i2o: Remove unnecessary 'out of memory' message aybuke ozdemir
2015-02-25 23:12 ` [PATCH v2 2/2] Staging: i2o: Corrected code indentation aybuke ozdemir
2015-02-26 18:38   ` [Outreachy kernel] " Greg KH

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.