From patchwork Tue Apr 15 14:43:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 3993501 Return-Path: X-Original-To: patchwork-linux-wireless@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 26A379F2CC for ; Tue, 15 Apr 2014 14:44:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 451EA2021A for ; Tue, 15 Apr 2014 14:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35E6C20219 for ; Tue, 15 Apr 2014 14:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335AbaDOOnz (ORCPT ); Tue, 15 Apr 2014 10:43:55 -0400 Received: from mail-ob0-f182.google.com ([209.85.214.182]:47037 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbaDOOny (ORCPT ); Tue, 15 Apr 2014 10:43:54 -0400 Received: by mail-ob0-f182.google.com with SMTP id uz6so10962461obc.27 for ; Tue, 15 Apr 2014 07:43:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=m2RK6tz+HEzsCLC4+ydNYr7rBNdEOOyp9LwjL+2Vsd8=; b=fMWwkAQ7uC7jXLlr5wt4B33yJ6vVvlBIRq+VG+cTqgVlJ75S9nzVrNljTR7el5vVQu bEG1GhPvdVia7w4rWgfg+Xpqe9IDvTHUk+ExvwVweAoIs2V+66ckS9xKEku0uJDud6ed pBYhHBaiFHDgrI+X3gtkDZc/sjBg78H6fF2BBDZnHytypXAqwOENS4/Wlb9mtzvvUSS7 7/aoKzKmKJP+wPuhhPZSI5ecjX5pjAya1nYhI2AV/FFSxv+lsYHX5IU6seSTYehTXCiT rU9wQZqw+uB1zz+rgWaBl14orkutjIAiE2Tyz7M3CZBQ0mZMGnpuE3V5y3ia/NRQee+v 2qRg== X-Gm-Message-State: ALoCoQn9/Lro2OM0mean8j/UwdS7+fw/MLchIKutCfdDmzoRLaVSbPpYuRj91zAoHAlvBG8yRhdv X-Received: by 10.60.34.65 with SMTP id x1mr1837392oei.6.1397573034251; Tue, 15 Apr 2014 07:43:54 -0700 (PDT) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by mx.google.com with ESMTPSA id f9sm33793377obm.2.2014.04.15.07.43.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 15 Apr 2014 07:43:53 -0700 (PDT) Received: from bob by hash with local (Exim 4.80) (envelope-from ) id 1Wa4a8-0000q5-B9; Tue, 15 Apr 2014 10:43:28 -0400 From: Bob Copeland To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org, Bob Copeland Subject: [PATCH 1/3] mac80211: mesh: use u16 return type for u16 getter Date: Tue, 15 Apr 2014 10:43:06 -0400 Message-Id: <1397572988-3181-1-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 u16_field_get() is a simple wrapper around get_unaligned_le16(), and it is being assigned to a u16, so there's no need to promote to u32 in the middle. Signed-off-by: Bob Copeland --- net/mac80211/mesh_hwmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index f951468..03ff5ea 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -37,7 +37,7 @@ static inline u32 u32_field_get(const u8 *preq_elem, int offset, bool ae) return get_unaligned_le32(preq_elem + offset); } -static inline u32 u16_field_get(const u8 *preq_elem, int offset, bool ae) +static inline u16 u16_field_get(const u8 *preq_elem, int offset, bool ae) { if (ae) offset += 6;