[PATCH v2 2/4] mtd: nand: convert printk() to pr_*()

Artem Bityutskiy dedekind1 at gmail.com
Thu Jul 7 15:56:26 EDT 2011


On Thu, 2011-07-07 at 10:00 -0700, Brian Norris wrote:
> I believe the problem is simply that partitions are named and
> registered, whereas the master is not. During initialization, all
> debug messages, etc. are run through the master MTD, not the named
> partitions. This gives the "(null):" dev_* messages I saw on bootup.
> I'm not sure if the master device causes much trouble after
> initialization...I think it kinda fades away and leaves the partitions
> for interaction with the user.
> 
> FYI, I'm looking mostly at cases where there *is* a partition layout.
> In cases where there are no partitions, the driver will usually just
> call "add_mtd_device" on the master MTD, and so this device be named
> and registered properly. This isn't so much an issue, except that it
> provides inconsistency between setups that use partitions and those
> that don't. (Couldn't we just force everyone to use partitions? Users
> who don't need them could just form a single partition for the whole
> device...)

Well, ok, indeed, in the driver level we have no idea about partitions,
we deal with the flash chip, by design...

Probably we should better use pr_* series of functions instead, I guess,
as dev_* functions seem to not be really suitable for us. That's what
you have originally done, sorry for bad suggestion.

On the other hand, why we cannot pass the partition struct mtd_info down
to the driver instead? Well, ideally, drivers should not use struct
mtd_info at all. But this is probably a different story...

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list