[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-doc
Subject:    Re: [PATCH v2 2/3] mmc: add module param to set fault injection attributes
From:       Akinobu Mita <akinobu.mita () gmail ! com>
Date:       2011-09-14 11:47:24
Message-ID: CAC5umyjAymZL7jA2VJq=aPBRnUDyUL6poTitLL6DBrk2SfZnug () mail ! gmail ! com
[Download RAW message or body]

2011/9/14 Per Forlin <per.forlin@linaro.org>:

>>>> +static int fail_mmc_request_param_set(const char *val,
>>>> +                                     const struct kernel_param *kp)
>>>> +{
>>>> +       setup_fault_attr(&fail_default_attr, (char *) val);
> I am thinking of returning failure here if setup_fault_attr() fails.
> if (setup_fault_attr(&fail_default_attr, (char *) val) == 0)
>  return -EINVAL;

It's good idea and it also prevents from loading the module if invalid
parameter is specified.

> There will be a printk(KERN_WARNING "FAULT_INJECTION: failed to parse
> arguments) it setup() fails. Is it too harsh to return failure?

Yes.  I'll try to fix in the future.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic