Staging: i2o: Remove unnecessary 'out of memory' message
PATCH v2 1/2 Staging: i2o: Remove unnecessary 'out of memory' message
This patch removes unnecessay out of memory message fixing the following checkpach.pl warning in device.c
--- drivers/staging/i2o/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/i2o/device.c +1 -3
@@ -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 */
Signature · 1 line
1.9.1
PATCH v2 2/2 Staging: i2o: Corrected code indentation
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
--- drivers/staging/i2o/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/i2o/device.c +8 -8
@@ -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; }
Signature · 1 line
1.9.1
Greg KH
maintainerRe: [Outreachy kernel] [PATCH v2 2/2] Staging: i2o: Corrected code indentation
Quoted 17 lines · 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.plSigned-off-by aybuke ozdemir <[email protected]>--- drivers/staging/i2o/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/staging/i2o/device.c +0
-0@@ -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)
drivers/staging/i2o/device.c static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry) · line 268
Quoted 10 lines
drivers/staging/i2o/device.c +4
-4-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