From patchwork Wed Apr 21 18:09:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 50667 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 EB692B6EEB for ; Thu, 22 Apr 2010 04:10:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753978Ab0DUSK2 (ORCPT ); Wed, 21 Apr 2010 14:10:28 -0400 Received: from sj-iport-1.cisco.com ([171.71.176.70]:48417 "EHLO sj-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638Ab0DUSKY (ORCPT ); Wed, 21 Apr 2010 14:10:24 -0400 Authentication-Results: sj-iport-1.cisco.com; dkim=neutral (message not signed) header.i=none X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEABrczkurRN+K/2dsb2JhbACcEnGjd5o/hQ8EgzQ X-IronPort-AV: E=Sophos;i="4.52,251,1270425600"; d="scan'208";a="319242460" Received: from sj-core-4.cisco.com ([171.68.223.138]) by sj-iport-1.cisco.com with ESMTP; 21 Apr 2010 18:09:25 +0000 Received: from roland-alpha.cisco.com (roland-alpha.cisco.com [10.33.42.9]) by sj-core-4.cisco.com (8.13.8/8.14.3) with ESMTP id o3LI9PZv027962; Wed, 21 Apr 2010 18:09:25 GMT Received: by roland-alpha.cisco.com (Postfix, from userid 33217) id DFD9B20151; Wed, 21 Apr 2010 11:09:21 -0700 (PDT) From: Roland Dreier To: Dimitris Michailidis , "David S. Miller" Cc: netdev@vger.kernel.org Subject: cxgb4: Use ntohs() on __be16 value instead of htons() X-Message-Flag: Warning: May contain useful information Date: Wed, 21 Apr 2010 11:09:21 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use the correct direction of byte-swapping function to fix a mistake shown by sparse endianness checking -- c.fl0id is __be16. Signed-off-by: Roland Dreier Acked-by: Dimitris Michailidis --- drivers/net/cxgb4/sge.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c index 14adc58..70bf2b2 100644 --- a/drivers/net/cxgb4/sge.c +++ b/drivers/net/cxgb4/sge.c @@ -2047,7 +2047,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq, adap->sge.ingr_map[iq->cntxt_id] = iq; if (fl) { - fl->cntxt_id = htons(c.fl0id); + fl->cntxt_id = ntohs(c.fl0id); fl->avail = fl->pend_cred = 0; fl->pidx = fl->cidx = 0; fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0;