Staging: lustre: lproc_osc: Remove irrelevant check
PATCH 1/1 Staging: lustre: lproc_osc: Remove irrelevant check
The variable val has been declared as unsigned long and thus the check for negative values should be removed from it.
Signed-off-by Shivani Bhardwaj <[email protected]>
--- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/osc/lproc_osc.c +1 -1
@@ -63,7 +63,7 @@ static ssize_t active_store(struct kobject *kobj, struct attribute *attr, rc =kstrtoul (buffer,10 , &val);if (rc)return rc; -if (val <0 || val >1 ) +if (val >1 )return -ERANGE ;/* opposite senses */
Signature · 1 line
2.1.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 24 lines · Greg KH
Quoted 13 lines · Shivani Bhardwaj
The variable val has been declared as unsigned long and thus the check for negative values should be removed from it.
Signed-off-by Shivani Bhardwaj <[email protected]>--- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/lustre/lustre/osc/lproc_osc.c +0
-0drivers/staging/lustre/lustre/osc/lproc_osc.c static ssize_t active_store(struct kobject *kobj, struct attribute *attr, · line 67
Quoted 6 lines
drivers/staging/lustre/lustre/osc/lproc_osc.c +1
-1@@ -63,7 +63,7 @@ static ssize_t active_store(struct kobject *kobj, struct attribute *attr, rc =kstrtoul (buffer,10 , &val);if (rc)return rc; -if (val <0 || val >1 ) +if (val >1 )return -ERANGE ;Doesn't apply as I added your other patch, can you provide a fix-up on top of that for this instead?
Quoted 3 lines
thanks,
greg k-h
Yes, I'll do that.
Thank you