Skip to contentSkip to conversation

move memory_read_from_buffer() from fs.h to string.h

PATCH In review Akinobu Mita 3 participants 11 messages Jul 14, 2008 – Jul 17, 2008

Subsystems (8)
VFS SCSI Framebuffer layer s390 +4 more subsystems
lore
Share & tools
lore
#0 lore raw

cover move memory_read_from_buffer() from fs.h to string.h

James Bottomley said that inclusion of linux/fs.h in a low level driver was always a danger signal. This patch moves memory_read_from_buffer() from fs.h to string.h and remove inclusion of linux/fs.h in existing memory_read_from_buffer() users and -mm patches

#1 lore raw

PATCH 1/6 move memory_read_from_buffer() from fs.h to string.h

James Bottomley warns that inclusion of linux/fs.h in a low level driver was always a danger signal. This patch moves memory_read_from_buffer() from fs.h to string.h and remove inclusion of linux/fs.h in existing memory_read_from_buffer() user.

Cc James Bottomley <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Bob Moore <[email protected]>
Cc Thomas Renninger <[email protected]>
Cc Len Brown <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Heiko Carstens <[email protected]>
---
 arch/s390/kernel/ipl.c      |    1 -
 drivers/zorro/zorro-sysfs.c |    1 -
 include/linux/fs.h          |    2 --
 include/linux/string.h      |    3 +++
 4 files changed, 3 insertions(+), 4 deletions(-)
include/linux/fs.h +0 -2
Index: 2.6-mmotm/include/linux/fs.h
===================================================================
@@ -2028,8 +2028,6 @@ extern void simple_release_fs(struct vfs
 
 extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
 			loff_t *ppos, const void *from, size_t available);
-extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
-			const void *from, size_t available);
 
 #ifdef CONFIG_MIGRATION
 extern int buffer_migrate_page(struct address_space *,
include/linux/string.h +3 -0
Index: 2.6-mmotm/include/linux/string.h
===================================================================
@@ -111,5 +111,8 @@ extern void argv_free(char **argv);
 
 extern bool sysfs_streq(const char *s1, const char *s2);
 
+extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
+			const void *from, size_t available);
+
 #endif
 #endif /* _LINUX_STRING_H_ */
drivers/zorro/zorro-sysfs.c +0 -1
Index: 2.6-mmotm/drivers/zorro/zorro-sysfs.c
===================================================================
@@ -15,7 +15,6 @@
 #include <linux/zorro.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/fs.h>
 
 #include "zorro.h"
 
arch/s390/kernel/ipl.c +0 -1
Index: 2.6-mmotm/arch/s390/kernel/ipl.c
===================================================================
@@ -14,7 +14,6 @@
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/ctype.h>
-#include <linux/fs.h>
 #include <asm/ipl.h>
 #include <asm/smp.h>
 #include <asm/setup.h>
#2 lore raw

PATCH 2/6 fix qla2xxx-use-memory_read_from_buffer.patch

In reply to Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Andrew Vasquez <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Andrew Vasquez <[email protected]>
Cc Seokmann Ju <[email protected]>
---
 drivers/scsi/qla2xxx/qla_attr.c |    1 -
 1 file changed, 1 deletion(-)
drivers/scsi/qla2xxx/qla_attr.c +0 -1
Index: 2.6-mmotm/drivers/scsi/qla2xxx/qla_attr.c
===================================================================
@@ -8,7 +8,6 @@
 
 #include <linux/kthread.h>
 #include <linux/vmalloc.h>
-#include <linux/fs.h>
 
 static int qla24xx_vport_disable(struct fc_vport *, bool);
 
Acked-by on v1 2/6
#3 lore raw

Re: [patch -mmotm 2/6] fix qla2xxx-use-memory_read_from_buffer.patch

Quoted 7 lines · Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Andrew Vasquez <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Andrew Vasquez <[email protected]>
Cc Seokmann Ju <[email protected]>

If needed:

BTW: is the memory_read_from_buffer() work for qla2xxx going in through the mm tree submission path???

#4 lore raw

Re: [patch -mmotm 2/6] fix qla2xxx-use-memory_read_from_buffer.patch

Quoted 10 lines · On Thu, 17 Jul 2008 16:12:35 -0700 Andrew Vasquez <[email protected]>…
Quoted 7 lines · Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Andrew Vasquez <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Andrew Vasquez <[email protected]>
Cc Seokmann Ju <[email protected]>
Quoted 3 lines

If needed:

Thanks. So we now have tested-by:you and acked-by:you. That'll do ;)

Quoted 2 lines

BTW: is the memory_read_from_buffer() work for qla2xxx going in through the mm tree submission path???

FSVO "through", yeah. It's appeared on linux-scsi four times so far. Last time James complained about the fs.h inclusion so Akinobu raised a patch "move memory_read_from_buffer() from fs.h to string.h" which I just merged.

I'll just keep pressing send - it'll get there sometime. Or you can merge it if you like.

#5 lore raw

Re: [patch -mmotm 2/6] fix qla2xxx-use-memory_read_from_buffer.patch

Quoted 19 lines · Andrew Morton
Quoted 10 lines · Akinobu Mita
Quoted 8 lines

Now memory_read_from_buffer() belongs in string.h

Cc Andrew Vasquez <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Andrew Vasquez <[email protected]>
Cc Seokmann Ju <[email protected]>
Quoted 3 lines

If needed:

Thanks. So we now have tested-by:you and acked-by:you. That'll do ;)

Quoted 2 lines

BTW: is the memory_read_from_buffer() work for qla2xxx going in through the mm tree submission path???

Quoted 7 lines

FSVO "through", yeah. It's appeared on linux-scsi four times so far. Last time James complained about the fs.h inclusion so Akinobu raised a patch "move memory_read_from_buffer() from fs.h to string.h" which I just merged.

I'll just keep pressing send - it'll get there sometime. Or you can merge it if you like.

Would it too bothersome if I were to just collapse the two patches and submit the composite with the my next set of patches??? Seems silly to add the oneliner to the history...

#6 lore raw

Re: [patch -mmotm 2/6] fix qla2xxx-use-memory_read_from_buffer.patch

Quoted 26 lines · On Thu, 17 Jul 2008 16:44:16 -0700 Andrew Vasquez <[email protected]>…
Quoted 24 lines · Andrew Morton
Quoted 10 lines · Akinobu Mita
Quoted 8 lines

Now memory_read_from_buffer() belongs in string.h

Cc Andrew Vasquez <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Andrew Vasquez <[email protected]>
Cc Seokmann Ju <[email protected]>
Quoted 3 lines

If needed:

Thanks. So we now have tested-by:you and acked-by:you. That'll do ;)

Quoted 2 lines

BTW: is the memory_read_from_buffer() work for qla2xxx going in through the mm tree submission path???

FSVO "through", yeah. It's appeared on linux-scsi four times so far. Last time James complained about the fs.h inclusion so Akinobu raised a patch "move memory_read_from_buffer() from fs.h to string.h" which I just merged.

Quoted 6 lines
Quoted 2 lines

I'll just keep pressing send - it'll get there sometime. Or you can merge it if you like.

Would it too bothersome if I were to just collapse the two patches and submit the composite with the my next set of patches??? Seems silly to add the oneliner to the history...

Sure, no probs.

#7 lore raw

PATCH 3/6 fix dcdbas-use-memory_read_from_buffer.patch

In reply to Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Doug Warzecha <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Matt Domsch <[email protected]>
---
 drivers/firmware/dcdbas.c |    1 -
 1 file changed, 1 deletion(-)
drivers/firmware/dcdbas.c +0 -1
Index: 2.6-mmotm/drivers/firmware/dcdbas.c
===================================================================
@@ -34,7 +34,6 @@
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/mutex.h>
-#include <linux/fs.h>
 #include <asm/io.h>
 
 #include "dcdbas.h"
#8 lore raw

PATCH 4/6 fix aty-use-memory_read_from_buffer.patch

In reply to Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Benjamin Herrenschmidt <[email protected]>
Cc "Antonino A. Daplas" <[email protected]>
Cc Krzysztof Helt <[email protected]>
---
 drivers/video/aty/radeon_base.c |    1 -
 1 file changed, 1 deletion(-)
drivers/video/aty/radeon_base.c +0 -1
Index: 2.6-mmotm/drivers/video/aty/radeon_base.c
===================================================================
@@ -70,7 +70,6 @@
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
 #include <linux/device.h>
-#include <linux/fs.h>
 
 #include <asm/io.h>
 #include <linux/uaccess.h>
#9 lore raw

PATCH 5/6 fix firmware-use-memory_read_from_buffer.patch

In reply to Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Greg Kroah-Hartman <[email protected]>
Cc Markus Rechberger <[email protected]>
Cc Kay Sievers <[email protected]>
---
 drivers/base/firmware_class.c |    1 -
 1 file changed, 1 deletion(-)
drivers/base/firmware_class.c +0 -1
Index: 2.6-mmotm/drivers/base/firmware_class.c
===================================================================
@@ -17,7 +17,6 @@
 #include <linux/bitops.h>
 #include <linux/mutex.h>
 #include <linux/kthread.h>
-#include <linux/fs.h>
 
 #include <linux/firmware.h>
 #include "base.h"
#10 lore raw

PATCH 6/6 fix dell_rbu-use-memory_read_from_buffer.patch

In reply to Akinobu Mita

Now memory_read_from_buffer() belongs in string.h

Cc Abhay Salunke <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Matt Domsch <[email protected]>
---
 drivers/firmware/dell_rbu.c |    1 -
 1 file changed, 1 deletion(-)
drivers/firmware/dell_rbu.c +0 -1
Index: 2.6-mmotm/drivers/firmware/dell_rbu.c
===================================================================
@@ -44,7 +44,6 @@
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/dma-mapping.h>
-#include <linux/fs.h>
 
 MODULE_AUTHOR("Abhay Salunke <[email protected]>");
 MODULE_DESCRIPTION("Driver for updating BIOS image on DELL systems");