lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] scsi: debug: fix type mismatch warning for sg_pcopy_from_buffer
Date
On Thursday 21 May 2015 12:09:58 Dave Gordon wrote:
> From b304c5a99ea260eac1cf98ced5f3c79c793ad4fd Mon Sep 17 00:00:00 2001
> From: Dave Gordon <david.s.gordon@intel.com>
> Date: Thu, 21 May 2015 12:06:27 +0100
> Subject: [PATCH] scsi: 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
> different const-ness in their signatures, leading to compiler warnings.
>
> 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
>
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
> ---

Acked-by: Arnd Bergmann <arnd@arndb.de>


\
 
 \ /
  Last update: 2015-05-21 13:41    [W:0.037 / U:1.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site