From: Akinobu Mita Date: Mon, 8 Jul 2013 23:01:52 +0000 (-0700) Subject: lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next() X-Git-Tag: v3.11-rc1~67^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1105200480b4faeb673d1b23658650b003302c06;p=pandora-kernel.git lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next() This patchset introduces sg_pcopy_from_buffer() and sg_pcopy_to_buffer(), which copy data between a linear buffer and an SG list. The only difference between sg_pcopy_{from,to}_buffer() and sg_copy_{from,to}_buffer() is an additional argument that specifies the number of bytes to skip the SG list before copying. The main reason for introducing these functions is to fix a problem in scsi_debug module. And there is a local function in crypto/talitos module, which can be replaced by sg_pcopy_to_buffer(). This patch: sg_miter_get_next_page() is used to proceed page iterator to the next page if necessary, and will be used to implement the variants of sg_copy_{from,to}_buffer() later. Signed-off-by: Akinobu Mita Acked-by: Tejun Heo Cc: Tejun Heo Cc: Imre Deak Cc: Herbert Xu Cc: "David S. Miller" Cc: "James E.J. Bottomley" Cc: Douglas Gilbert Cc: Horia Geanta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed