Re: [PATCH v2 2/3] mmc: add module param to set fault injection attributes

2011-09-14 Thread Akinobu Mita
2011/9/14 Per Forlin : +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() fai

Re: [PATCH v2 2/3] mmc: add module param to set fault injection attributes

2011-09-14 Thread Per Forlin
On 14 September 2011 12:38, Per Forlin wrote: > On 14 September 2011 12:18, Per Forlin wrote: >> On 14 September 2011 12:05, Akinobu Mita wrote: >>> 2011/9/14 Per Forlin : >>> +#ifdef CONFIG_FAIL_MMC_REQUEST + +static DECLARE_FAULT_ATTR(fail_default_attr); +static char *fail_

Re: [PATCH v2 2/3] mmc: add module param to set fault injection attributes

2011-09-14 Thread Per Forlin
On 14 September 2011 12:18, Per Forlin wrote: > On 14 September 2011 12:05, Akinobu Mita wrote: >> 2011/9/14 Per Forlin : >> >>> +#ifdef CONFIG_FAIL_MMC_REQUEST >>> + >>> +static DECLARE_FAULT_ATTR(fail_default_attr); >>> +static char *fail_request; >> >> This is not used anymore and ... >> > Yes

Re: [PATCH v2 2/3] mmc: add module param to set fault injection attributes

2011-09-14 Thread Per Forlin
On 14 September 2011 12:05, Akinobu Mita wrote: > 2011/9/14 Per Forlin : > >> +#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

Re: [PATCH v2 2/3] mmc: add module param to set fault injection attributes

2011-09-14 Thread Akinobu Mita
2011/9/14 Per Forlin : > +#ifdef CONFIG_FAIL_MMC_REQUEST > + > +static DECLARE_FAULT_ATTR(fail_default_attr); > +static char *fail_request; This is not used anymore and ... > +static int fail_mmc_request_param_set(const char *val, > +                                     const struct kernel_param

[PATCH v2 2/3] mmc: add module param to set fault injection attributes

2011-09-14 Thread Per Forlin
Replace setup("fail_mmc_request") and faulty "ifdef KERNEL" with a module_param_cb(). The module param mmc_core.fail_request may be used to set the fault injection attributes during boot time or module load time. Signed-off-by: Per Forlin --- drivers/mmc/core/debugfs.c | 38 +++