drivers/scsi/scsi_debug.c: resolve sg buffer const-ness issue
authorDave Gordon <[email protected]>
Tue, 30 Jun 2015 21:58:57 +0000 (14:58 -0700)
committerLinus Torvalds <[email protected]>
Wed, 1 Jul 2015 02:44:59 +0000 (19:44 -0700)
commit386ecb1216f9e38947ce6a2af22e5e1e47256a97
treeeeaa8bce553855a9ab106ef4a9166f1695835472
parent2a1bf8f93b33992bb0457512b28d046e279bbd7e
drivers/scsi/scsi_debug.c: resolve sg buffer const-ness issue

do_device_access() takes a separate parameter to indicate the direction of
data transfer, which it used to use to select the appropriate function out
of sg_pcopy_{to,from}_buffer().  However these two functions now have

So this patch makes it bypass these wrappers and call the underlying
function sg_copy_buffer() directly; this has the same calling style as
do_device_access() i.e.  a separate direction-of-transfer parameter and no
pointers-to-const, so skipping the wrappers not only eliminates the
warning, it also make the code simpler :)

[[email protected]: fix very broken build]
Signed-off-by: Dave Gordon <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Cc: James Bottomley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/scsi/scsi_debug.c
include/linux/scatterlist.h
lib/scatterlist.c