From patchwork Sun Aug 18 18:28:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Droneaud X-Patchwork-Id: 2846201 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0B360BF546 for ; Sun, 18 Aug 2013 18:29:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B0C420201 for ; Sun, 18 Aug 2013 18:29:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 835D2201FF for ; Sun, 18 Aug 2013 18:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753957Ab3HRS3a (ORCPT ); Sun, 18 Aug 2013 14:29:30 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:49683 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218Ab3HRS33 (ORCPT ); Sun, 18 Aug 2013 14:29:29 -0400 Received: from localhost.localdomain (unknown [IPv6:2a01:e35:2e9f:6ac0:f909:bc73:7b7d:1daf]) by smtp2-g21.free.fr (Postfix) with ESMTP id E10AF4B01CC; Sun, 18 Aug 2013 20:29:21 +0200 (CEST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.7/8.14.7) with ESMTP id r7IITKUJ031965; Sun, 18 Aug 2013 20:29:20 +0200 Received: (from ydroneaud@localhost) by localhost.localdomain (8.14.7/8.14.7/Submit) id r7IITFKO031964; Sun, 18 Aug 2013 20:29:15 +0200 From: Yann Droneaud To: linux-rdma@vger.kernel.org Cc: Yann Droneaud Subject: [PATCH 01/22] infiniband: ib_copy_{from, to}_udata(): const'ify arguments Date: Sun, 18 Aug 2013 20:28:37 +0200 Message-Id: <9dcb48d02ca489604f9535ba6d38fe1988f9496e.1376847403.git.ydroneaud@opteya.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Source buffers are not modified, let them be 'const'. Signed-off-by: Yann Droneaud Link: http://mid.gmane.org/cover.1376847403.git.ydroneaud@opteya.com --- include/rdma/ib_verbs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index a84d3df..ef37c59 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1353,12 +1353,12 @@ void *ib_get_client_data(struct ib_device *device, struct ib_client *client); void ib_set_client_data(struct ib_device *device, struct ib_client *client, void *data); -static inline int ib_copy_from_udata(void *dest, struct ib_udata *udata, size_t len) +static inline int ib_copy_from_udata(void *dest, const struct ib_udata *udata, size_t len) { return copy_from_user(dest, udata->inbuf, len) ? -EFAULT : 0; } -static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len) +static inline int ib_copy_to_udata(struct ib_udata *udata, const void *src, size_t len) { return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0; }