Re: [PATCH] Staging: speakup: kobjects: Return the error type to caller

From: Dan Carpenter
Date: Mon Dec 07 2015 - 03:32:12 EST


On Mon, Dec 07, 2015 at 12:46:37PM +0530, Saurabh Sengar wrote:
> >> @@ -688,6 +689,8 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
> >>
> >> if (ret == -ERESTART)
> >> pr_info("%s reset to default value\n", param->name);
> >
> > Is this really true?
> Sorry, I am not sure here what you mean here.
> I have not implemented it.
> >
> > This function is so weird and broken. Please look at it some more and
> > fix it harder with a mallet.
> You mean I broke it ?

No, I mean it was broken to begin with. Write a more extensive patch to
fix it.

That printk should be moved up to where we actually do the reset.
Anyway speakup is actually really bad and there is a lot of broken
stuff so you don't have to fix this function if you don't want to. Just
fix the -ERANGE issue I mentioned and resend if you want.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/