From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E564F1C0DFA for ; Tue, 14 Mar 2017 10:42:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DF37289986 for ; Tue, 14 Mar 2017 10:42:43 +0000 (UTC) Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Od-dt14DXhFm for ; Tue, 14 Mar 2017 10:42:43 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by hemlock.osuosl.org (Postfix) with ESMTPS id 402288951E for ; Tue, 14 Mar 2017 10:42:43 +0000 (UTC) Date: Tue, 14 Mar 2017 21:42:39 +1100 From: "Tobin C. Harding" Subject: Re: [PATCH 07/12] staging: ks7010: move comparison to right hand side Message-ID: <20170314104239.GA15006@eros> References: <1489445650-11398-1-git-send-email-me@tobin.cc> <1489445650-11398-8-git-send-email-me@tobin.cc> <20170314091749.GJ4136@mwanda> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170314091749.GJ4136@mwanda> List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Dan Carpenter Cc: Greg Kroah-Hartman , driverdev-devel@linuxdriverproject.org, Wolfram Sang On Tue, Mar 14, 2017 at 12:17:49PM +0300, Dan Carpenter wrote: > On Tue, Mar 14, 2017 at 09:54:05AM +1100, Tobin C. Harding wrote: > > Checkpatch emits WARNING: Comparisons should place the constant on the > > right side of the test. > > > > Move constant to right hand side of test, modify operator to ensure > > logic is maintained. > > > > Signed-off-by: Tobin C. Harding > > --- > > drivers/staging/ks7010/ks_wlan_net.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c > > index 59eabb9..cee3971 100644 > > --- a/drivers/staging/ks7010/ks_wlan_net.c > > +++ b/drivers/staging/ks7010/ks_wlan_net.c > > @@ -2164,7 +2164,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev, > > } > > } > > if (ptr == &priv->pmklist.head) { /* not find address. */ > > - if (PMK_LIST_MAX > priv->pmklist.size) { /* new cache data */ > > + if (priv->pmklist.size <= PMK_LIST_MAX) { /* new cache data */ > > Nope. Well now, that is embarrassing. Good catch, thanks. This has been merged but I'll put another patch in tomorrow to fix it. thanks, Tobin. _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel