From patchwork Fri Feb 8 16:32:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2116941 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 11E61DFE75 for ; Fri, 8 Feb 2013 16:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760130Ab3BHQcj (ORCPT ); Fri, 8 Feb 2013 11:32:39 -0500 Received: from mail-ia0-f176.google.com ([209.85.210.176]:53995 "EHLO mail-ia0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759956Ab3BHQcj (ORCPT ); Fri, 8 Feb 2013 11:32:39 -0500 Received: by mail-ia0-f176.google.com with SMTP id i18so4369907iac.21 for ; Fri, 08 Feb 2013 08:32:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=TEdiurthPcmiQuW4GQTsOcaCubmSZ9BoK72B6VowNWE=; b=pVQC7FgxUktK3esSp2fXhWAgLOVpF6Cpx5hNfG5ztopeU8/FGc0glbzCEmMs0RqZst 1qNMd9Xjw09aYfldAxIZOprePG3g2w8ENoj7QpQgvI2XdfALNu6tMqvHyX5dTGKfXQSx XXamKjB/9s2n+K2xBXn+DUt1numuFt/IDhxEBxT/hXQTiwru1rberBJHdhIPtsxvr8iw SRRwoefXPajVaaTXgn5EXyaU8d7O63OBynPrjx7yX5fqm4FsEcus9CY6lCDtPcRusgDp 2y0cPTDsEBKi4hD0EBbdFdo169d723tqZhuSuQT11tqG5Em6brQaW+wS9mv+HTBVhPzy zGmw== X-Received: by 10.50.16.144 with SMTP id g16mr3627038igd.2.1360341158571; Fri, 08 Feb 2013 08:32:38 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id j11sm15789898igc.5.2013.02.08.08.32.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 08:32:37 -0800 (PST) Message-ID: <511528A3.9090406@inktank.com> Date: Fri, 08 Feb 2013 10:32:35 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org" Subject: [PATCH 2/5] libceph: use void pointers in page vector functions References: <51152847.2030305@inktank.com> In-Reply-To: <51152847.2030305@inktank.com> X-Gm-Message-State: ALoCoQmM7lcX3basgVY/0NgyMpenUNhny+LrnQS9BwG3AJPP10LA2UrmnnfkTcf3EMdBqvkxFHWI Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org The functions used for working with ceph page vectors are defined with char pointers, but they're really intended to operate on untyped data. Change the types of these function parameters to (void *) to reflect this. (Note that the functions now assume void pointer arithmetic works like arithmetic on char pointers.) Signed-off-by: Alex Elder --- include/linux/ceph/libceph.h | 10 +++++----- net/ceph/pagevec.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index c44275a..2250f8b 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h @@ -222,7 +222,7 @@ extern int ceph_open_session(struct ceph_client *client); /* pagevec.c */ extern void ceph_release_page_vector(struct page **pages, int num_pages); -extern struct page **ceph_get_direct_page_vector(const char __user *data, +extern struct page **ceph_get_direct_page_vector(const void __user *data, int num_pages, bool write_page); extern void ceph_put_page_vector(struct page **pages, int num_pages, @@ -230,15 +230,15 @@ extern void ceph_put_page_vector(struct page **pages, int num_pages, extern void ceph_release_page_vector(struct page **pages, int num_pages); extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); extern int ceph_copy_user_to_page_vector(struct page **pages, - const char __user *data, + const void __user *data, loff_t off, size_t len); extern int ceph_copy_to_page_vector(struct page **pages, - const char *data, + const void *data, loff_t off, size_t len); extern int ceph_copy_from_page_vector(struct page **pages, - char *data, + void *data, loff_t off, size_t len); -extern int ceph_copy_page_vector_to_user(struct page **pages, char __user *data, +extern int ceph_copy_page_vector_to_user(struct page **pages, void __user *data, loff_t off, size_t len); extern void ceph_zero_page_vector_range(int off, int len, struct page **pages); diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index cd9c21d..5b20be9 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c @@ -12,7 +12,7 @@ /* * build a vector of user pages */ -struct page **ceph_get_direct_page_vector(const char __user *data, +struct page **ceph_get_direct_page_vector(const void __user *data, int num_pages, bool write_page) { struct page **pages; @@ -93,7 +93,7 @@ EXPORT_SYMBOL(ceph_alloc_page_vector); * copy user data into a page vector */ int ceph_copy_user_to_page_vector(struct page **pages, - const char __user *data, + const void __user *data, loff_t off, size_t len) { int i = 0; @@ -119,7 +119,7 @@ int ceph_copy_user_to_page_vector(struct page **pages, EXPORT_SYMBOL(ceph_copy_user_to_page_vector); int ceph_copy_to_page_vector(struct page **pages, - const char *data, + const void *data, loff_t off, size_t len) { int i = 0; @@ -143,7 +143,7 @@ int ceph_copy_to_page_vector(struct page **pages, EXPORT_SYMBOL(ceph_copy_to_page_vector); int ceph_copy_from_page_vector(struct page **pages, - char *data, + void *data, loff_t off, size_t len) { int i = 0; @@ -170,7 +170,7 @@ EXPORT_SYMBOL(ceph_copy_from_page_vector); * copy user data from a page vector into a user pointer */ int ceph_copy_page_vector_to_user(struct page **pages, - char __user *data, + void __user *data, loff_t off, size_t len) { int i = 0;