Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754305AbbEUL3Q (ORCPT ); Thu, 21 May 2015 07:29:16 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:60544 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbbEUL3N (ORCPT ); Thu, 21 May 2015 07:29:13 -0400 From: Arnd Bergmann To: Dave Gordon Cc: Andrew Morton , "Martin K. Petersen" , Akinobu Mita , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, jbottomley@odin.com Subject: Re: [PATCH] scsi: debug: fix type mismatch warning for sg_pcopy_from_buffer Date: Thu, 21 May 2015 13:28:55 +0200 Message-ID: <10573000.xg2bp6EQuX@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <555DBD06.7060601@intel.com> References: <6309932.EjHf7uUo1X@wuerfel> <2386515.9NuRN4zp72@wuerfel> <555DBD06.7060601@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Tg4kfyL4sr7Ee2FacrB27oJxUqaiJLmWrSUheWhGeO2vfw3P6E4 Dq/vqhNaqSXXzNq8eAFb07MU5uOVZaaLyVm1jtFCOuWFQK9qFfY89OYyr1DI9OO+zEkoiaM yk6ZOYiNDFsjvI3R5v94a9ZSVwlRw1h7Bi7+m9yE0dWePg1ZjMbsvskeq8gK/+bZHbjdfTq QN1ZbWpL352OlHnJQjoMQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1260 Lines: 26 On Thursday 21 May 2015 12:09:58 Dave Gordon wrote: > From b304c5a99ea260eac1cf98ced5f3c79c793ad4fd Mon Sep 17 00:00:00 2001 > From: Dave Gordon > 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 > --- Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/