default readv/writev functions

Jörn Engel joern at wohnheim.fh-wedel.de
Tue Jan 14 16:45:10 EST 2003


On Sat, 11 January 2003 15:35:26 +0000, Simon Evans wrote:
> 
> I noticed in fs/jffs2/writev.c there is a mtd_fake_writev and a comment
> that it should be in the MTD core. Is the following ok to commit?
> 
> diff -u -p -u -r1.32 mtdcore.c
> --- drivers/mtd/mtdcore.c	7 Mar 2002 18:38:10 -0000	1.32
> +++ drivers/mtd/mtdcore.c	11 Jan 2003 12:28:16 -0000
>
> +int default_mtd_writev(struct mtd_info *mtd, const struct iovec *vecs,
> +		       unsigned long count, loff_t to, size_t *retlen)
> +int default_mtd_readv(struct mtd_info *mtd, struct iovec *vecs,
> +		      unsigned long count, loff_t from, size_t *retlen)
>
> +EXPORT_SYMBOL(default_mtd_writev);
> +EXPORT_SYMBOL(default_mtd_readv);
>
> diff -u -p -u -r1.37 mtd.h
> --- include/linux/mtd/mtd.h	19 Nov 2002 01:22:31 -0000	1.37
> +++ include/linux/mtd/mtd.h	11 Jan 2003 12:28:17 -0000
>
> +int default_mtd_writev(struct mtd_info *mtd, const struct iovec *vecs,
> +		       unsigned long count, loff_t to, size_t *retlen);
> +
> +int default_mtd_readv(struct mtd_info *mtd, struct iovec *vecs,
> +		      unsigned long count, loff_t from, size_t *retlen);

IMHO this is the wrong place. This should go into
drivers/mtd/chips/cfi_cmdset*.c.

Maybe I should comment on the code as well, but I'm lazy tonight. You
can compare it with cfi_cmdset_0003.c, that one should have a working
writev-function.

Jörn

-- 
Jörn Engel
mailto: joern at wohnheim.fh-wedel.de
http://wohnheim.fh-wedel.de/~joern
Phone: +49 179 6704074




More information about the linux-mtd mailing list