lkml.org 
[lkml]   [2011]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 2/3] mmc: add module param to set fault injection attributes
    From
    On 14 September 2011 12:18, Per Forlin <per.forlin@linaro.org> wrote:
    > On 14 September 2011 12:05, Akinobu Mita <akinobu.mita@gmail.com> wrote:
    >> 2011/9/14 Per Forlin <per.forlin@linaro.org>:
    >>
    >>> +#ifdef CONFIG_FAIL_MMC_REQUEST
    >>> +
    >>> +static DECLARE_FAULT_ATTR(fail_default_attr);
    >>> +static char *fail_request;
    >>
    >> This is not used anymore and ...
    >>
    > Yes of course. Will remove it.
    >
    >>> +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;

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

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

    \
     
     \ /
      Last update: 2011-09-14 12:41    [W:0.021 / U:2.188 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site