From patchwork Tue Dec 17 16:48:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3362921 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D47DF9F344 for ; Tue, 17 Dec 2013 16:58:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A01E420381 for ; Tue, 17 Dec 2013 16:58:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 435962031C for ; Tue, 17 Dec 2013 16:58:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754933Ab3LQQ6h (ORCPT ); Tue, 17 Dec 2013 11:58:37 -0500 Received: from mtv-iport-2.cisco.com ([173.36.130.13]:10048 "EHLO mtv-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754943Ab3LQQ6f (ORCPT ); Tue, 17 Dec 2013 11:58:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5879; q=dns/txt; s=iport; t=1387299515; x=1388509115; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Z23WNXdk070NNOgzPt+QJ/7qtDEZqIZiXfbBnKhtNlE=; b=D2tlsqulZOBup5i8t5j4D/SKk+ZSgcAADsSRb36BK1KBc32cZds/AvU1 QS1VWVmvKN0RbFIGX2wWuODwv+BXzE8Tqx0IZ2QVftwLEwTUkPLlUqv2T /kyX/VlfYUHMtCpjmlYdbHvI/CuPABBqocp5AClGte1w008AumPqgukr4 0=; X-IronPort-AV: E=Sophos;i="4.95,502,1384300800"; d="scan'208";a="100838485" Received: from mtv-core-4.cisco.com ([171.68.58.9]) by mtv-iport-2.cisco.com with ESMTP; 17 Dec 2013 16:49:04 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id rBHGn3jx021255; Tue, 17 Dec 2013 16:49:03 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id C21A63F80A; Tue, 17 Dec 2013 08:49:03 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 8/9] IB/usnic: Remove duplicate and unnecessary consts Date: Tue, 17 Dec 2013 08:48:36 -0800 Message-Id: <1387298917-7365-9-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387298917-7365-1-git-send-email-umalhi@cisco.com> References: <1387298917-7365-1-git-send-email-umalhi@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 Sparse, https://lists.01.org/pipermail/kbuild/2013-December/000877.html, gave lots of duplicate const warnings. Remove the duplicate const as well as the original const bc both consts are unnecessary. Signed-off-by: Upinder Malhi --- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 19 +++++++++---------- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h | 12 +++++------- drivers/infiniband/hw/usnic/usnic_vnic.c | 12 +++++------- drivers/infiniband/hw/usnic/usnic_vnic.h | 12 +++++------- 4 files changed, 24 insertions(+), 31 deletions(-) -- 1.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c index ad57a77..b5fb4d4 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c @@ -332,8 +332,8 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp, } struct usnic_vnic_res_chunk** -alloc_res_chunk_list(struct usnic_vnic *vnic, const struct usnic_vnic_res_spec - const *res_spec, void *owner_obj) +alloc_res_chunk_list(struct usnic_vnic *vnic, + struct usnic_vnic_res_spec *res_spec, void *owner_obj) { enum usnic_vnic_res_type res_type; struct usnic_vnic_res_chunk **res_chunk_list; @@ -427,20 +427,19 @@ static void qp_grp_and_vf_unbind(struct usnic_ib_qp_grp *qp_grp) qp_grp->vf = NULL; } -static void log_spec(const struct usnic_vnic_res_spec - const *res_spec) +static void log_spec(struct usnic_vnic_res_spec *res_spec) { char buf[512]; usnic_vnic_spec_dump(buf, sizeof(buf), res_spec); usnic_dbg("%s\n", buf); } -struct usnic_ib_qp_grp *usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, - struct usnic_ib_vf *vf, - struct usnic_ib_pd *pd, - const struct usnic_vnic_res_spec - const *res_spec, - enum usnic_transport_type transport) +struct usnic_ib_qp_grp * +usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, + struct usnic_ib_vf *vf, + struct usnic_ib_pd *pd, + struct usnic_vnic_res_spec *res_spec, + enum usnic_transport_type transport) { struct usnic_ib_qp_grp *qp_grp; u16 port_num; diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h index 37423f8..6416a95 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h +++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h @@ -75,13 +75,11 @@ usnic_vnic_res_spec min_transport_spec[USNIC_TRANSPORT_MAX] = { const char *usnic_ib_qp_grp_state_to_string(enum ib_qp_state state); int usnic_ib_qp_grp_dump_hdr(char *buf, int buf_sz); int usnic_ib_qp_grp_dump_rows(void *obj, char *buf, int buf_sz); -struct usnic_ib_qp_grp *usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, - struct usnic_ib_vf *vf, - struct usnic_ib_pd *pd, - const struct usnic_vnic_res_spec - const *res_spec, - enum usnic_transport_type - transport); +struct usnic_ib_qp_grp * +usnic_ib_qp_grp_create(struct usnic_fwd_dev *ufdev, struct usnic_ib_vf *vf, + struct usnic_ib_pd *pd, + struct usnic_vnic_res_spec *res_spec, + enum usnic_transport_type transport); void usnic_ib_qp_grp_destroy(struct usnic_ib_qp_grp *qp_grp); int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp, enum ib_qp_state new_state, diff --git a/drivers/infiniband/hw/usnic/usnic_vnic.c b/drivers/infiniband/hw/usnic/usnic_vnic.c index 02d66d9..5a50acb 100644 --- a/drivers/infiniband/hw/usnic/usnic_vnic.c +++ b/drivers/infiniband/hw/usnic/usnic_vnic.c @@ -138,10 +138,8 @@ void usnic_vnic_res_spec_update(struct usnic_vnic_res_spec *spec, WARN_ON(1); } -int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec - const *min_spec, - const struct usnic_vnic_res_spec - const *res_spec) +int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec *min_spec, + struct usnic_vnic_res_spec *res_spec) { int found, i, j; @@ -165,8 +163,8 @@ int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec return 0; } -int usnic_vnic_spec_dump(char *buf, int buf_sz, const struct usnic_vnic_res_spec - const *res_spec) +int usnic_vnic_spec_dump(char *buf, int buf_sz, + struct usnic_vnic_res_spec *res_spec) { enum usnic_vnic_res_type res_type; int res_cnt; @@ -186,7 +184,7 @@ int usnic_vnic_spec_dump(char *buf, int buf_sz, const struct usnic_vnic_res_spec } int usnic_vnic_check_room(struct usnic_vnic *vnic, - const struct usnic_vnic_res_spec const *res_spec) + struct usnic_vnic_res_spec *res_spec) { int i; enum usnic_vnic_res_type res_type; diff --git a/drivers/infiniband/hw/usnic/usnic_vnic.h b/drivers/infiniband/hw/usnic/usnic_vnic.h index 0a69a5d..14d931a 100644 --- a/drivers/infiniband/hw/usnic/usnic_vnic.h +++ b/drivers/infiniband/hw/usnic/usnic_vnic.h @@ -77,14 +77,12 @@ int usnic_vnic_dump(struct usnic_vnic *vnic, char *buf, int buf_sz, void usnic_vnic_res_spec_update(struct usnic_vnic_res_spec *spec, enum usnic_vnic_res_type trgt_type, u16 cnt); -int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec - const *min_spec, - const struct usnic_vnic_res_spec - const *res_spec); -int usnic_vnic_spec_dump(char *buf, int buf_sz, const struct usnic_vnic_res_spec - const *res_spec); +int usnic_vnic_res_spec_satisfied(const struct usnic_vnic_res_spec *min_spec, + struct usnic_vnic_res_spec *res_spec); +int usnic_vnic_spec_dump(char *buf, int buf_sz, + struct usnic_vnic_res_spec *res_spec); int usnic_vnic_check_room(struct usnic_vnic *vnic, - const struct usnic_vnic_res_spec const *res_spec); + struct usnic_vnic_res_spec *res_spec); int usnic_vnic_res_cnt(struct usnic_vnic *vnic, enum usnic_vnic_res_type type); int usnic_vnic_res_free_cnt(struct usnic_vnic *vnic,