From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126AbcKHFuJ (ORCPT ); Tue, 8 Nov 2016 00:50:09 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35946 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbcKHFuH (ORCPT ); Tue, 8 Nov 2016 00:50:07 -0500 Subject: Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE To: Joe Perches , gregkh@linuxfoundation.org References: <1478541328-2214-1-git-send-email-sergio.paracuellos@gmail.com> <1478541328-2214-2-git-send-email-sergio.paracuellos@gmail.com> <1478545060.22008.5.camel@perches.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org From: Sergio Paracuellos Message-ID: <58216428.3040409@gmail.com> Date: Tue, 8 Nov 2016 06:35:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1478545060.22008.5.camel@perches.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for pointing that Joe. There other files and macros where GENMASK stuff could be applied in wlan-ng driver. Maybe it should be better to apply this patch as it is now and send another patch later which changes all of them. What do you think? Cheers, Sergio Paracuellos El 2016年11月07日 a las 19:57, Joe Perches escribió: > On Mon, 2016-11-07 at 18:55 +0100, Sergio Paracuellos wrote: >> This patch fix the following checkpatch.pl script warning: >> WARNING: line over 80 characters >> >> It also add spaces between or operators inside the macro to >> comply with the standard kernel coding style. > [] >> diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h > [] >> @@ -132,7 +132,8 @@ >> /*------------------------------------------------------------*/ >> >> #define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT(2) | BIT(3))) >> 2) >> -#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT(4)|BIT(5)|BIT(6)|BIT(7))) >> 4) >> +#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & \ >> + (BIT(4) | BIT(5) | BIT(6) | BIT(7))) >> 4) > > Probably better to use GENMASK > > #define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & GENMASK(3, 2)) >> 2) > #define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & GENMASK(7, 4)) >> 4) >