From patchwork Thu Jan 16 01:02:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3496031 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 61DB2C02DC for ; Thu, 16 Jan 2014 01:02:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95F752017B for ; Thu, 16 Jan 2014 01:02:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A9F8020170 for ; Thu, 16 Jan 2014 01:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750900AbaAPBCa (ORCPT ); Wed, 15 Jan 2014 20:02:30 -0500 Received: from mtv-iport-1.cisco.com ([173.36.130.12]:46722 "EHLO mtv-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbaAPBC3 (ORCPT ); Wed, 15 Jan 2014 20:02:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1379; q=dns/txt; s=iport; t=1389834149; x=1391043749; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=JGmSHf9RDZ3UDMAvb2gHST+HODehU4nztSczvKR0IbY=; b=YXqr0lOgQsa52x/ozzOsq5cTF4ikTIriwPl/NjcGFzpmj1/6ydk11fr8 mJPMh0QmG9J5viwPgR1I9r2A3zbm7Ch0lDVWwkl/GaFMt0bd05Oo/YlOV vA7A5N+MeDSULwzs+vWSj609XHTyzRCftRVxUZo/zqT3vVS6FzSk6/WKq c=; X-IronPort-AV: E=Sophos;i="4.95,665,1384300800"; d="scan'208";a="99825803" Received: from mtv-core-2.cisco.com ([171.68.58.7]) by mtv-iport-1.cisco.com with ESMTP; 16 Jan 2014 01:02:28 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by mtv-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id s0G12SQN007776; Thu, 16 Jan 2014 01:02:28 GMT Received: by cisco.com (Postfix, from userid 246720) id 63B7E3FAA09F; Wed, 15 Jan 2014 17:02:28 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org, roland@kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 1/2] IB/usnic: Fix endianness related warnings Date: Wed, 15 Jan 2014 17:02:20 -0800 Message-Id: <1389834141-16587-2-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1389834141-16587-1-git-send-email-umalhi@cisco.com> References: <1389834141-16587-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=-14.8 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 Fix sparse endianness related warnings. Signed-off-by: Upinder Malhi --- drivers/infiniband/hw/usnic/usnic_common_util.h | 2 +- drivers/infiniband/hw/usnic/usnic_transport.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_common_util.h b/drivers/infiniband/hw/usnic/usnic_common_util.h index afd8bfa..9d737ed 100644 --- a/drivers/infiniband/hw/usnic/usnic_common_util.h +++ b/drivers/infiniband/hw/usnic/usnic_common_util.h @@ -36,7 +36,7 @@ usnic_mac_to_gid(const char *const mac, char *raw_gid) } static inline void -usnic_mac_ip_to_gid(const char *const mac, const uint32_t inaddr, char *raw_gid) +usnic_mac_ip_to_gid(const char *const mac, const __be32 inaddr, char *raw_gid) { raw_gid[0] = 0xfe; raw_gid[1] = 0x80; diff --git a/drivers/infiniband/hw/usnic/usnic_transport.c b/drivers/infiniband/hw/usnic/usnic_transport.c index 9182cc8..ddef6f7 100644 --- a/drivers/infiniband/hw/usnic/usnic_transport.c +++ b/drivers/infiniband/hw/usnic/usnic_transport.c @@ -59,8 +59,7 @@ int usnic_transport_sock_to_str(char *buf, int buf_sz, if (err) return 0; - addr = htonl(addr); - return scnprintf(buf, buf_sz, "Proto:%u Addr:%pI4 Port:%hu", + return scnprintf(buf, buf_sz, "Proto:%u Addr:%pI4h Port:%hu", proto, &addr, port); }