From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753600AbbGXKwn (ORCPT ); Fri, 24 Jul 2015 06:52:43 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:29486 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbbGXKwk (ORCPT ); Fri, 24 Jul 2015 06:52:40 -0400 Date: Fri, 24 Jul 2015 13:52:27 +0300 From: Dan Carpenter To: Joshua Clayton Cc: Larry Finger , Florian Schilhabel , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Tapasweni Pathak , Vaishali Thakkar , Nitin Kuppelur , linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: Re: [PATCH 5/5] staging: rtl8712: style fix: Message-ID: <20150724105227.GW5371@mwanda> References: <1437712717-7287-1-git-send-email-stillcompiling@gmail.com> <1437713598-7657-1-git-send-email-stillcompiling@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437713598-7657-1-git-send-email-stillcompiling@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Write a better subject line. On Thu, Jul 23, 2015 at 09:53:18PM -0700, Joshua Clayton wrote: > change instances SupportedRates to compliant and sane "rates" > This change in no way harms readability, and brings several lines > under the 80 character limit. > Yeah, but it does a some other stuff as well like removing casts. > - while ((pcur_bss->SupportedRates[i] != 0) && > - (pcur_bss->SupportedRates[i] != 0xFF)) { > - rate = pcur_bss->SupportedRates[i] & 0x7F; > + while (pcur_bss->rates[i] && (pcur_bss->rates[i] != 0xFF)) { > + rate = pcur_bss->rates[i] & 0x7F; > if (rate > max_rate) > max_rate = rate; > wrqu->bitrate.fixed = 0; /* no auto select */ I actually like the != 0 here because we're talking about the number zero. It should look like this: while (pcur_bss->rates[i] != 0 && pcur_bss->rates[i] != 0xFF) { But removing the parens is something for a different patch. I use a script to help review these so when you mix different changes together it means there is more manual review work for me. regards, dan carpenter