public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the l2-mtd tree with the logfs tree
@ 2011-12-28  1:48 Stephen Rothwell
  2011-12-28  8:52 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2011-12-28  1:48 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: linux-next, linux-kernel, Prasad Joshi, "Jörn Engel"

[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]

Hi Artem,

Today's linux-next merge of the l2-mtd tree got a conflict in
fs/logfs/dev_mtd.c between commit d1cc3ad397f2 ("Logfs: Allow NULL
block_isbad() methods") from the  tree and commit 22aed0c2578c ("mtd:
introduce mtd_block_isbad interface") from the l2-mtd tree.

I fixed it up (see below) and can carry the fix as necessary.  I am a
little worried that the block_isbad member of struct mtd_info may be
hidden in the future and so break the NULL checks here.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc fs/logfs/dev_mtd.c
index d054d7e,136c736..0000000
--- a/fs/logfs/dev_mtd.c
+++ b/fs/logfs/dev_mtd.c
@@@ -147,16 -150,17 +150,16 @@@ static struct page *logfs_mtd_find_firs
  {
  	struct logfs_super *super = logfs_super(sb);
  	struct address_space *mapping = super->s_mapping_inode->i_mapping;
- 	filler_t *filler = mtd_readpage;
+ 	filler_t *filler = logfs_mtd_readpage;
  	struct mtd_info *mtd = super->s_mtd;
  
 -	if (!mtd->block_isbad)
 -		return NULL;
 -
  	*ofs = 0;
 -	while (mtd_block_isbad(mtd, *ofs)) {
 -		*ofs += mtd->erasesize;
 -		if (*ofs >= mtd->size)
 -			return NULL;
 +	if (mtd->block_isbad) {
- 		while (mtd->block_isbad(mtd, *ofs)) {
++		while (mtd_block_isbad(mtd, *ofs)) {
 +			*ofs += mtd->erasesize;
 +			if (*ofs >= mtd->size)
 +				return NULL;
 +		}
  	}
  	BUG_ON(*ofs & ~PAGE_MASK);
  	return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb);
@@@ -166,16 -170,17 +169,16 @@@ static struct page *logfs_mtd_find_last
  {
  	struct logfs_super *super = logfs_super(sb);
  	struct address_space *mapping = super->s_mapping_inode->i_mapping;
- 	filler_t *filler = mtd_readpage;
+ 	filler_t *filler = logfs_mtd_readpage;
  	struct mtd_info *mtd = super->s_mtd;
  
 -	if (!mtd->block_isbad)
 -		return NULL;
 -
  	*ofs = mtd->size - mtd->erasesize;
 -	while (mtd_block_isbad(mtd, *ofs)) {
 -		*ofs -= mtd->erasesize;
 -		if (*ofs <= 0)
 -			return NULL;
 +	if (mtd->block_isbad) {
- 		while (mtd->block_isbad(mtd, *ofs)) {
++		while (mtd_block_isbad(mtd, *ofs)) {
 +			*ofs -= mtd->erasesize;
 +			if (*ofs <= 0)
 +				return NULL;
 +		}
  	}
  	*ofs = *ofs + mtd->erasesize - 0x1000;
  	BUG_ON(*ofs & ~PAGE_MASK);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the l2-mtd tree with the logfs tree
  2011-12-28  1:48 linux-next: manual merge of the l2-mtd tree with the logfs tree Stephen Rothwell
@ 2011-12-28  8:52 ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-12-28  8:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Prasad Joshi, "Jörn Engel"

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

On Wed, 2011-12-28 at 12:48 +1100, Stephen Rothwell wrote:
> Hi Artem,
> 
> Today's linux-next merge of the l2-mtd tree got a conflict in
> fs/logfs/dev_mtd.c between commit d1cc3ad397f2 ("Logfs: Allow NULL
> block_isbad() methods") from the  tree and commit 22aed0c2578c ("mtd:
> introduce mtd_block_isbad interface") from the l2-mtd tree.

Hi, thanks.

> I fixed it up (see below) and can carry the fix as necessary.  I am a
> little worried that the block_isbad member of struct mtd_info may be
> hidden in the future and so break the NULL checks here.

I will take care of all the direct use of "mtd->block_isbad" everywhere
during the 3.3 cycle. So far I just introduced the wrapper functions,
and amended all the users that coccinelle has found.

But it is also OK to use the pointers directly so far (in 3.2), and I
will take care of this by 3.3.

Thanks for taking care of the conflict.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* linux-next: manual merge of the l2-mtd tree with the logfs tree
@ 2012-01-03  3:00 Stephen Rothwell
  2012-01-03  7:45 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2012-01-03  3:00 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: linux-next, linux-kernel, Prasad Joshi, "Jörn Engel"

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

Hi Artem,

Today's linux-next merge of the l2-mtd tree got a conflict in
fs/logfs/dev_mtd.c between commit d1cc3ad397f2 ("Logfs: Allow NULL
block_isbad() methods") from the logfs tree and commit 957afd905eda
("logfs: do not use 'mtd->block_isbad' directly") from the l2-mtd tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc fs/logfs/dev_mtd.c
index d054d7e,e97404d..0000000
--- a/fs/logfs/dev_mtd.c
+++ b/fs/logfs/dev_mtd.c
@@@ -147,16 -149,17 +149,16 @@@ static struct page *logfs_mtd_find_firs
  {
  	struct logfs_super *super = logfs_super(sb);
  	struct address_space *mapping = super->s_mapping_inode->i_mapping;
- 	filler_t *filler = mtd_readpage;
+ 	filler_t *filler = logfs_mtd_readpage;
  	struct mtd_info *mtd = super->s_mtd;
  
 -	if (!mtd_can_have_bb(mtd))
 -		return NULL;
 -
  	*ofs = 0;
- 	if (mtd->block_isbad) {
- 		while (mtd->block_isbad(mtd, *ofs)) {
 -	while (mtd_block_isbad(mtd, *ofs)) {
 -		*ofs += mtd->erasesize;
 -		if (*ofs >= mtd->size)
 -			return NULL;
++	if (mtd_can_have_bb(mtd)) {
++		while (mtd_block_isbad(mtd, *ofs)) {
 +			*ofs += mtd->erasesize;
 +			if (*ofs >= mtd->size)
 +				return NULL;
 +		}
  	}
  	BUG_ON(*ofs & ~PAGE_MASK);
  	return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb);
@@@ -166,16 -169,17 +168,16 @@@ static struct page *logfs_mtd_find_last
  {
  	struct logfs_super *super = logfs_super(sb);
  	struct address_space *mapping = super->s_mapping_inode->i_mapping;
- 	filler_t *filler = mtd_readpage;
+ 	filler_t *filler = logfs_mtd_readpage;
  	struct mtd_info *mtd = super->s_mtd;
  
 -	if (!mtd_can_have_bb(mtd))
 -		return NULL;
 -
  	*ofs = mtd->size - mtd->erasesize;
- 	if (mtd->block_isbad) {
- 		while (mtd->block_isbad(mtd, *ofs)) {
 -	while (mtd_block_isbad(mtd, *ofs)) {
 -		*ofs -= mtd->erasesize;
 -		if (*ofs <= 0)
 -			return NULL;
++	if (mtd_can_have_bb(mtd)) {
++		while (mtd_block_isbad(mtd, *ofs)) {
 +			*ofs -= mtd->erasesize;
 +			if (*ofs <= 0)
 +				return NULL;
 +		}
  	}
  	*ofs = *ofs + mtd->erasesize - 0x1000;
  	BUG_ON(*ofs & ~PAGE_MASK);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the l2-mtd tree with the logfs tree
  2012-01-03  3:00 Stephen Rothwell
@ 2012-01-03  7:45 ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2012-01-03  7:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Prasad Joshi, "Jörn Engel"

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

On Tue, 2012-01-03 at 14:00 +1100, Stephen Rothwell wrote:
> Hi Artem,
> 
> Today's linux-next merge of the l2-mtd tree got a conflict in
> fs/logfs/dev_mtd.c between commit d1cc3ad397f2 ("Logfs: Allow NULL
> block_isbad() methods") from the logfs tree and commit 957afd905eda
> ("logfs: do not use 'mtd->block_isbad' directly") from the l2-mtd tree.
> 
> I fixed it up (see below) and can carry the fix as necessary.

Thanks Stephen, this fix up is good.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-03  7:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-28  1:48 linux-next: manual merge of the l2-mtd tree with the logfs tree Stephen Rothwell
2011-12-28  8:52 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03  3:00 Stephen Rothwell
2012-01-03  7:45 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox