linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] jffs2: update to new MTD interface (missed a few)
@ 2012-02-03  0:21 Brian Norris
  2012-02-03  2:20 ` Randy Dunlap
  2012-02-03  5:36 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Norris @ 2012-02-03  0:21 UTC (permalink / raw)
  To: linux-mtd
  Cc: David Woodhouse, Artem Bityutskiy, Brian Norris, linux-next,
	Linux Kernel, Randy Dunlap

There were a few instances of the old MTD interface remaining for JFFS2. We
fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
defined) like this:

  fs/jffs2/read.c: In function 'jffs2_read_dnode':
  fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read'
  fs/jffs2/read.c:112:8: error: 'struct mtd_info' has no member named 'read'
  ...

We also simply remove two macros that are not in use, were not updated to
the new MTD interface, and don't even utilize the old interface properly.
(That means they weren't used since commit 8593fbc6, year 2006; almost 6
years ago, for those who don't want to do the math)

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
This fixes some linux-next build errors seen by Randy Dunlap

 fs/jffs2/os-linux.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index ab65ee3..1cd3aec 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -76,7 +76,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
 #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO)
 
 #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, buf)
-#define jffs2_flash_read(c, ofs, len, retlen, buf) ((c)->mtd->read((c)->mtd, ofs, len, retlen, buf))
+#define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf))
 #define jffs2_flush_wbuf_pad(c) ({ do{} while(0); (void)(c), 0; })
 #define jffs2_flush_wbuf_gc(c, i) ({ do{} while(0); (void)(c), (void) i, 0; })
 #define jffs2_write_nand_badblock(c,jeb,bad_offset) (1)
@@ -108,8 +108,6 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
 
 #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
 
-#define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
-#define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf))
 #define jffs2_wbuf_dirty(c) (!!(c)->wbuf_len)
 
 /* wbuf.c */
-- 
1.7.5.4

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

* Re: [PATCH] jffs2: update to new MTD interface (missed a few)
  2012-02-03  0:21 [PATCH] jffs2: update to new MTD interface (missed a few) Brian Norris
@ 2012-02-03  2:20 ` Randy Dunlap
  2012-02-03  5:36 ` Artem Bityutskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2012-02-03  2:20 UTC (permalink / raw)
  To: Brian Norris
  Cc: linux-mtd, David Woodhouse, Artem Bityutskiy, linux-next, Linux Kernel

On 02/02/2012 04:21 PM, Brian Norris wrote:
> There were a few instances of the old MTD interface remaining for JFFS2. We
> fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
> defined) like this:
> 
>   fs/jffs2/read.c: In function 'jffs2_read_dnode':
>   fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read'
>   fs/jffs2/read.c:112:8: error: 'struct mtd_info' has no member named 'read'
>   ...
> 
> We also simply remove two macros that are not in use, were not updated to
> the new MTD interface, and don't even utilize the old interface properly.
> (That means they weren't used since commit 8593fbc6, year 2006; almost 6
> years ago, for those who don't want to do the math)
> 
> Reported-by: Randy Dunlap <rdunlap@xenotime.net>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>

Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.

> ---
> This fixes some linux-next build errors seen by Randy Dunlap
> 
>  fs/jffs2/os-linux.h |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
> index ab65ee3..1cd3aec 100644
> --- a/fs/jffs2/os-linux.h
> +++ b/fs/jffs2/os-linux.h
> @@ -76,7 +76,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
>  #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO)
>  
>  #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, buf)
> -#define jffs2_flash_read(c, ofs, len, retlen, buf) ((c)->mtd->read((c)->mtd, ofs, len, retlen, buf))
> +#define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf))
>  #define jffs2_flush_wbuf_pad(c) ({ do{} while(0); (void)(c), 0; })
>  #define jffs2_flush_wbuf_gc(c, i) ({ do{} while(0); (void)(c), (void) i, 0; })
>  #define jffs2_write_nand_badblock(c,jeb,bad_offset) (1)
> @@ -108,8 +108,6 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
>  
>  #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
>  
> -#define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf))
> -#define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf))
>  #define jffs2_wbuf_dirty(c) (!!(c)->wbuf_len)
>  
>  /* wbuf.c */


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] jffs2: update to new MTD interface (missed a few)
  2012-02-03  0:21 [PATCH] jffs2: update to new MTD interface (missed a few) Brian Norris
  2012-02-03  2:20 ` Randy Dunlap
@ 2012-02-03  5:36 ` Artem Bityutskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2012-02-03  5:36 UTC (permalink / raw)
  To: Brian Norris
  Cc: linux-mtd, David Woodhouse, linux-next, Linux Kernel, Randy Dunlap

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

On Thu, 2012-02-02 at 16:21 -0800, Brian Norris wrote:
> There were a few instances of the old MTD interface remaining for JFFS2. We
> fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not
> defined) like this:

Pushed to l2-mtd.git, thank you!

-- 
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] 3+ messages in thread

end of thread, other threads:[~2012-02-03  5:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-03  0:21 [PATCH] jffs2: update to new MTD interface (missed a few) Brian Norris
2012-02-03  2:20 ` Randy Dunlap
2012-02-03  5:36 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).