Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757719AbbDWN5t (ORCPT ); Thu, 23 Apr 2015 09:57:49 -0400 Received: from mga01.intel.com ([192.55.52.88]:7067 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbbDWN5r (ORCPT ); Thu, 23 Apr 2015 09:57:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,631,1422950400"; d="scan'208";a="718110440" From: Dave Gordon To: linux-kernel@vger.kernel.org Cc: Akinobu Mita , "Martin K. Petersen" , Dave Gordon Subject: [PATCH] lib/scatterlist: fix kerneldoc for sg_pcopy_{to,from}_buffer() Date: Thu, 23 Apr 2015 14:57:17 +0100 Message-Id: <1429797437-23573-1-git-send-email-david.s.gordon@intel.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1959 Lines: 55 The kerneldoc for the functions doesn't match the code; the last two parameters (buflen, skip) have been transposed, which is confusing, especially as they're both integral types and the compiler won't warn about swapping them. These functions and the kerneldoc were introduced in commit: df642cea lib/scatterlist: introduce sg_pcopy_from_buffer() ... Author: Akinobu Mita Date: Mon Jul 8 16:01:54 2013 -0700 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 functions have the extra argument at the end, but the kerneldoc lists it in penultimate position. Signed-off-by: Dave Gordon --- lib/scatterlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scatterlist.c b/lib/scatterlist.c index c9f2e8c..233ebe7 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -697,8 +697,8 @@ EXPORT_SYMBOL(sg_copy_to_buffer); * @sgl: The SG list * @nents: Number of SG entries * @buf: Where to copy from - * @skip: Number of bytes to skip before copying * @buflen: The number of bytes to copy + * @skip: Number of bytes to skip before copying * * Returns the number of copied bytes. * @@ -715,8 +715,8 @@ EXPORT_SYMBOL(sg_pcopy_from_buffer); * @sgl: The SG list * @nents: Number of SG entries * @buf: Where to copy to - * @skip: Number of bytes to skip before copying * @buflen: The number of bytes to copy + * @skip: Number of bytes to skip before copying * * Returns the number of copied bytes. * -- 1.7.9.5 -- 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/