[PATCH] nandsim: add id_bytes module parameter

Akinobu Mita akinobu.mita at gmail.com
Fri Oct 17 09:35:42 PDT 2014

2014-10-16 8:04 GMT+09:00 Brian Norris <computersforpeace at gmail.com>:
> On Mon, Oct 13, 2014 at 06:40:45PM +0300, Artem Bityutskiy wrote:
>> On Mon, 2014-10-13 at 16:48 +0300, Artem Bityutskiy wrote:
>> > On Mon, 2014-08-11 at 08:29 +0900, Akinobu Mita wrote:
>> > > nandsim can simulate NAND Flash which returns the ID bytes specified
>> > > by first_id_byte, ..., fourth_id_byte module parameters.
>> > >
>> > > In order to simulate NAND flash which returns more than four ID bytes,
>> > > this adds id_bytes module parameter which is specified by the array of
>> > > byte like this:
>> > >
>> > >  # modprobe nandsim id_bytes=0x98,0xdc,0x90,0x26,0x76,0x15,0x01,0x08 bch=1
>> > >
>> > > This doesn't add fifth_id_byte, ..., seventh_id_byte module parameters,
>> > > becuase they are redundant.  But the existing first_id_byte, ...,
>> > > fourth_id_byte module parameters are preserved.
>> >
>> > Hi, I missed this patch, sorry. It looks good to me, I'll take it to my
>> > tree.
>> Actually, let's merge this via the l2-mtd.git tree. Brian, what do you
>> think about this patch? It looks good for me in general, but I did not
>> review it line-by-line. The only thing is that the 'modinfo nandsim' may
>> look confusing for the user, who sees so many ID-related parameters, so
>> I'd add an "(obsolete)" marker to the string describing the old
>> parameters. But this is a minor thing, I did not want to ask Akinobu
>> about this because the patch was already waiting for very long time, I'd
>> do this myself while merging.
> Sorry, I really don't have the time to review every single patch these
> days. I had briefly looked at this patch previously and thought it was a
> good idea, but like you, I didn't look through all the code.
> I'll try to queue this up after the merge window, unless I discover
> something that really must be improved.

Thanks for considering this patch.

After reading this again, I realized that module_param_named() should
be used instead of module_param_cb() for existing parameters.  So I'll
send updated patch with adding "(obsolete)" to module description as
Artem suggested.

More information about the linux-mtd mailing list