From patchwork Fri Feb 24 16:56:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: santosh nayak X-Patchwork-Id: 142947 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9DD61B6F62 for ; Sat, 25 Feb 2012 03:57:38 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757862Ab2BXQ5O (ORCPT ); Fri, 24 Feb 2012 11:57:14 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:61894 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753660Ab2BXQ5M (ORCPT ); Fri, 24 Feb 2012 11:57:12 -0500 Received: by pbcun15 with SMTP id un15so2835776pbc.19 for ; Fri, 24 Feb 2012 08:57:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=CO1kPrQWgnTFRdMSWt0gFr0q6DkIQeilWtmCG9KGGmc=; b=fb6Bp3HjGQ1Q+3kuf5BcQali3W9Arzvxn/M9H3QrYMB9PfWljb24Chw483V4DhOlhA MBGrjgkDAc6ztapSz0GA0vqBi3WIDvTvojv0EOyAyMnQA2KSKkPYRRomEZGULp9J7siw N02R20Kp1OuF8/AiALPE811cCpkYR5mRHZQZk= Received: by 10.68.240.164 with SMTP id wb4mr7236815pbc.57.1330102632253; Fri, 24 Feb 2012 08:57:12 -0800 (PST) Received: from localhost.localdomain (72-163-216-217.cisco.com. [72.163.216.217]) by mx.google.com with ESMTPS id j9sm4777115pbp.43.2012.02.24.08.57.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Feb 2012 08:57:11 -0800 (PST) From: santosh nayak To: benve@cisco.com Cc: roprabhu@cisco.com, neepatel@cisco.com, nistrive@cisco.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Santosh Nayak Subject: [PATCH 1/2] enic: Fix endianness bug. Date: Fri, 24 Feb 2012 22:26:39 +0530 Message-Id: <1330102599-1245-1-git-send-email-santoshprasadnayak@gmail.com> X-Mailer: git-send-email 1.7.4.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Santosh Nayak Sparse complaints the endian bug. Signed-off-by: Santosh Nayak --- drivers/net/ethernet/cisco/enic/cq_enet_desc.h | 2 +- drivers/net/ethernet/cisco/enic/enic_pp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/cq_enet_desc.h b/drivers/net/ethernet/cisco/enic/cq_enet_desc.h index c2c0680..ac37cac 100644 --- a/drivers/net/ethernet/cisco/enic/cq_enet_desc.h +++ b/drivers/net/ethernet/cisco/enic/cq_enet_desc.h @@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc, CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0; *fcoe_enc_error = (desc->flags & CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0; - *fcoe_eof = (u8)((desc->checksum_fcoe >> + *fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >> CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) & CQ_ENET_RQ_DESC_FCOE_EOF_MASK); *checksum = 0; diff --git a/drivers/net/ethernet/cisco/enic/enic_pp.c b/drivers/net/ethernet/cisco/enic/enic_pp.c index c758674..dafea1e 100644 --- a/drivers/net/ethernet/cisco/enic/enic_pp.c +++ b/drivers/net/ethernet/cisco/enic/enic_pp.c @@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf) struct enic_port_profile *pp; struct vic_provinfo *vp; const u8 oui[3] = VIC_PROVINFO_CISCO_OUI; - const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX); + const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX); char uuid_str[38]; char client_mac_str[18]; u8 *client_mac;