Re: [PATCH v9 2/3] mmc: core: add random fault injection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13 September 2011 15:12, Akinobu Mita <akinobu.mita@xxxxxxxxx> wrote:
> 2011/8/19 Per Forlin <per.forlin@xxxxxxxxxxxxxx>:
>
>> +#ifdef KERNEL
>> +/*
>> + * Internal function. Pass the boot param fail_mmc_request to
>> + * the setup fault injection attributes routine.
>> + */
>> +static int __init setup_fail_mmc_request(char *str)
>> +{
>> +       return setup_fault_attr(&fail_mmc_request, str);
>> +}
>> +__setup("fail_mmc_request=", setup_fail_mmc_request);
>> +#endif /* KERNEL */
>
> You attempt to enable __setup() only when mmc_core is built into
> the kernel.  Does it really work? I cannot find any drivers using
> "KERNEL" macro.
>
Your right it doesn't work. I think I change from ifndef MODULE to
ifdef KERNEL at one point.
It should be "ifndef MODULE"

> You can use module_param_cb() instead of __setup() without #ifdef KERNEL.
> When mmc_core is built into the kernel, you can specify the parameter
> with "mmc_core.fail_mmc_request=..."
>
Thanks, this is the proper way to do it.

> Sorry for pointing that out too late.
>
I think this patch is queued for 3.2 so there should be time to fix it still.

Thanks again,
Per
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux