From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbbJOIsb (ORCPT ); Thu, 15 Oct 2015 04:48:31 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:41662 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbbJOIs2 (ORCPT ); Thu, 15 Oct 2015 04:48:28 -0400 Date: Thu, 15 Oct 2015 11:48:12 +0300 From: Dan Carpenter To: Marc Dietrich Cc: gregkh@linuxfoundation.org, linux-tegra@vger.kernel.org, Sakshi Bansal , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: nvec: fixed few coding style warnings Message-ID: <20151015084812.GP7289@mwanda> References: <20151014140822.GA23114@localhost.localdomain> <20151014181236.GX7340@mwanda> <1971511.Ec7FdKlGRN@fb07-iapwap2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1971511.Ec7FdKlGRN@fb07-iapwap2> 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 On Thu, Oct 15, 2015 at 10:39:02AM +0200, Marc Dietrich wrote: > > > - if (unlikely(nvec->rx == NULL)) { > > > + if (!unlikely(nvec->rx)) { > > > > This isn't right. You intented to say: > > > > if (unlikely(!nvec->rx)) { > > > > But even better to just remove the unlikely entirely. > > > > if (!nvec->rx) { > > why? the "unlikely" is there to optimize a critical interrupt path. The rule is that drivers should not use likely/unlikely() unless there is a difference in benchmark numbers. How critical can it be when it's always followed by a udelay(100)??? There are more important optimizations needed here. regards, dan carpenter