Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Joe Perches
On Mon, 2014-10-20 at 19:54 +0300, Tanya Brokhman wrote: > On 10/20/2014 4:51 PM, Artem Bityutskiy wrote: > > On Tue, 2014-10-14 at 09:05 -0700, Joe Perches wrote: > >> It's pretty trivial when all the lines are already > >> being touched. > > > > OK, but then the same change should done in UBIFS,

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
On 10/20/2014 4:51 PM, Artem Bityutskiy wrote: On Tue, 2014-10-14 at 09:05 -0700, Joe Perches wrote: It's pretty trivial when all the lines are already being touched. OK, but then the same change should done in UBIFS, because it's ubifs_msg() and so on macros are consistent with UBI macros. So

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Artem Bityutskiy
On Tue, 2014-10-14 at 12:31 -0700, Joe Perches wrote: > On Tue, 2014-10-14 at 16:18 -0300, Ezequiel Garcia wrote: > > On 14 Oct 12:13 PM, Joe Perches wrote: > > > On Tue, 2014-10-14 at 15:47 -0300, Ezequiel Garcia wrote: > [] > > > > When the gendisk is not available, a simple pr_{} would work. > >

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Artem Bityutskiy
On Tue, 2014-10-14 at 09:05 -0700, Joe Perches wrote: > It's pretty trivial when all the lines are already > being touched. OK, but then the same change should done in UBIFS, because it's ubifs_msg() and so on macros are consistent with UBI macros. So I think if this is done, then it is done separ

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Joe Perches
On Tue, 2014-10-14 at 16:18 -0300, Ezequiel Garcia wrote: > On 14 Oct 12:13 PM, Joe Perches wrote: > > On Tue, 2014-10-14 at 15:47 -0300, Ezequiel Garcia wrote: [] > > > When the gendisk is not available, a simple pr_{} would work. > > > > Or maybe combine these in the ubi_ calls passing > > NULL

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Ezequiel Garcia
On 14 Oct 12:13 PM, Joe Perches wrote: > On Tue, 2014-10-14 at 15:47 -0300, Ezequiel Garcia wrote: > > On 14 Oct 06:09 PM, Artem Bityutskiy wrote: > > > On Tue, 2014-10-14 at 11:39 -0300, Ezequiel Garcia wrote: > > > > Please use some pr_fmt for this. Something like this before the headers > > > >

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Joe Perches
On Tue, 2014-10-14 at 15:47 -0300, Ezequiel Garcia wrote: > On 14 Oct 06:09 PM, Artem Bityutskiy wrote: > > On Tue, 2014-10-14 at 11:39 -0300, Ezequiel Garcia wrote: > > > Please use some pr_fmt for this. Something like this before the headers > > > should be enough: > > > > > > #define pr_fmt(fmt

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Ezequiel Garcia
On 14 Oct 06:09 PM, Artem Bityutskiy wrote: > On Tue, 2014-10-14 at 11:39 -0300, Ezequiel Garcia wrote: > > Please use some pr_fmt for this. Something like this before the headers > > should be enough: > > > > #define pr_fmt(fmt) "UBI: block:" fmt > > Sinc ubiblock is a device, there should be a

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Joe Perches
On Tue, 2014-10-14 at 18:07 +0300, Artem Bityutskiy wrote: > On Tue, 2014-10-14 at 07:33 -0700, Joe Perches wrote: > > If you are going to change all the ubi_ calls, > > can you also please add a terminating newline to all > > the uses for consistency with all the other > > pr_/dev_/_ calls? > > I

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Artem Bityutskiy
On Tue, 2014-10-14 at 11:39 -0300, Ezequiel Garcia wrote: > Please use some pr_fmt for this. Something like this before the headers > should be enough: > > #define pr_fmt(fmt) "UBI: block:" fmt Sinc ubiblock is a device, there should be a 'struct device' somewhere, so probably dev_printk() and ot

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Artem Bityutskiy
On Tue, 2014-10-14 at 07:33 -0700, Joe Perches wrote: > If you are going to change all the ubi_ calls, > can you also please add a terminating newline to all > the uses for consistency with all the other > pr_/dev_/_ calls? I get the consistency argument. On the other hand, this is about printing

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Ezequiel Garcia
On 14 Oct 05:13 PM, Tanya Brokhman wrote: > diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c > index 8876c7d..3532f8a 100644 > --- a/drivers/mtd/ubi/block.c > +++ b/drivers/mtd/ubi/block.c > @@ -111,12 +111,12 @@ static int __init ubiblock_set_param(const char *val, > > len =

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Joe Perches
On Tue, 2014-10-14 at 17:16 +0300, Tanya Brokhman wrote: > On 10/14/2014 5:13 PM, Tanya Brokhman wrote: > > If there is more then one UBI device mounted, there is no way to > > distinguish between messages from different UBI devices. > > Add device number to all ubi layer message types. [] > > diff

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 5:13 PM, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure

[PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya Brokhm