From patchwork Tue Jun 16 11:43:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaishali Thakkar X-Patchwork-Id: 6617531 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 114F79F326 for ; Tue, 16 Jun 2015 11:43:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41F5E204E4 for ; Tue, 16 Jun 2015 11:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43DC9203C4 for ; Tue, 16 Jun 2015 11:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbbFPLnN (ORCPT ); Tue, 16 Jun 2015 07:43:13 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:33572 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbbFPLnM (ORCPT ); Tue, 16 Jun 2015 07:43:12 -0400 Received: by pdjn11 with SMTP id n11so12804370pdj.0; Tue, 16 Jun 2015 04:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=fncngfHwIaFznQ31gzosHabakm+9M62uUxnlOHq9qyQ=; b=SpYYvrBvxU3AorLXIR5A/AFNMXzFr8UZL3TcZCatwM7cXx+pqwTDtcN6omt0QPHaAH CLV/I5KSRyEm+k+zc7IblLgtNY87hzCz6MVpho7DxEh+ry7tubgopQq12bi+w3jzyu4s /CJBtdU1LI6XzbiHqbd8FKAq2xTKsOvfHs7jMZeCsATYzOWNUdQAapGc9M57yfJ4pG73 KBwUgZ1XSa4+ganOBu/1jbqby710xrGCvnxgG27IBYxL4PzDx6ZgKv/lphBIuDMCCmkn ghs3ryUppgXRY+ZeGhiiSrv/jbm8tRtZxwQTlXFZL4z2ujMcen71FF0MQ/38xmZ9J2mr hWCQ== X-Received: by 10.66.65.162 with SMTP id y2mr57710816pas.101.1434454991257; Tue, 16 Jun 2015 04:43:11 -0700 (PDT) Received: from vaishali-Ideapad-Z570 ([43.249.235.236]) by mx.google.com with ESMTPSA id f1sm1127374pds.62.2015.06.16.04.43.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Jun 2015 04:43:10 -0700 (PDT) Date: Tue, 16 Jun 2015 17:13:05 +0530 From: Vaishali Thakkar To: Mike Marciniszyn Cc: Doug Ledford , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Julia Lawall Subject: [PATCH] IB/ipath: Convert use of __constant_ to Message-ID: <20150616114305.GA6350@vaishali-Ideapad-Z570> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 In little endian cases, the macros be16_to_cpu and cpu_to_be64 unfolds to __swab{16,64} which provides special case for constants. In big endian cases, __constant_be16_to_cpu and be16_to_cpu expand directly to the same expression. The same applies for __constant_cpu_to_be64 and cpu_to_be64. So, replace __constant_be16_to_cpu with be16_to_cpu and __constant_cpu_to_be64 with cpu_to_be64, with the goal of getting rid of the definition of __constant_be16_to_cpu and __constant_cpu_to_be64 completely. Signed-off-by: Vaishali Thakkar --- drivers/infiniband/hw/ipath/ipath_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 44ea939..5da33ec 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -2023,9 +2023,9 @@ int ipath_register_ib_device(struct ipath_devdata *dd) spin_lock_init(&idev->qp_table.lock); spin_lock_init(&idev->lk_table.lock); - idev->sm_lid = __constant_be16_to_cpu(IB_LID_PERMISSIVE); + idev->sm_lid = be16_to_cpu(IB_LID_PERMISSIVE); /* Set the prefix to the default value (see ch. 4.1.1) */ - idev->gid_prefix = __constant_cpu_to_be64(0xfe80000000000000ULL); + idev->gid_prefix = cpu_to_be64(0xfe80000000000000ULL); ret = ipath_init_qp_table(idev, ib_ipath_qp_table_size); if (ret)