Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4698559pxk; Wed, 30 Sep 2020 09:22:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBxuOG+WYNb0Avrp2Of3EFfOwLRPPVQ+Y+WxEc05eukm9+oGMmTFmy/OtPmFRnlQx6Jss9 X-Received: by 2002:a17:906:2307:: with SMTP id l7mr3586212eja.122.1601482971636; Wed, 30 Sep 2020 09:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601482971; cv=none; d=google.com; s=arc-20160816; b=AnQwY8lEkso/Q4DGNOS6S56QhZtwOFGz3DjueQ3vxiKFAlLrEkISY+GCkIBbzV7u8b zKrits66eDmeRdhj6W9SjMxMveRh8pZywGO6yXwk5DiNsrjngphy0cA2HK5WQiWv/8Ni xBC2IGs5qNqw+Nod47RgVenPn5GWA9Sr65TgM7UDxtvT+amF5n+ClNEur4SCu5794+OC LmEPNwcgyPJsIX3ZKcJ2N5r730n3nkrGT/kED4zuAz1eiZzssoPjdcpEEYzFahArlx4a GzZe0Y5weTHehNS5WCAdDoh0vIgmBglJhmwYcUNPUsZgdPB4JX0pOAIAEFpjEmcAhNmr gfpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QmI6Xm2TUjBxk9LN6tIT40v1qAfg04+ap7sc3k1DpBw=; b=OOHPOqLaeKsXUWAvXNpCR2DxEvg+RhzwbtcIjPXcDkPHWWUYML4JwYu/kPJ7LrazR4 w2yQglWsXg6xNsSYdpFDDd0HcbJEUxeYXA0rCZHnmAeSGDgMPJ1pl4G4JMCsZUuRQt2z C8W2rfpda814FxNgl61AWArHtV4L/8pnlVANWafJfwJywT/wxJ/bEU38/ngxiQkjb2DR Z/Aesf9e1PEHjXy+v/RjDb6uf8YFl88T12eyD60laIWw+ASKaJWy2ECtM6ZQETKNuO8p Gy1/9aD2V6GZS+7rvCKHdCkaYFSleF8lXtP78LQ3KF8gw5P8MTIFM5MfTsBfRZcN4Nvo FjDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D7dOdHbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si1435111edw.354.2020.09.30.09.22.28; Wed, 30 Sep 2020 09:22:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D7dOdHbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731146AbgI3QSh (ORCPT + 99 others); Wed, 30 Sep 2020 12:18:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:46106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728744AbgI3QSh (ORCPT ); Wed, 30 Sep 2020 12:18:37 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F223120708; Wed, 30 Sep 2020 16:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601482716; bh=FZDd9NrX/b3X4mhyCraw4fkVuDp38h8GVcG5bQ6IPOY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D7dOdHbAvycDMu4PnK4XYyk/tC2brcv/Hwix+oIE4qjeoZ8xW7wMDdN4A2R/g3WIa YsGQKbpds+73FShsHxCwNy5uwRqdPjJnXOk/I1BvRu+y8S+Z+icclMvJ14HjPP/src NX4ao28aABFZeohCKkrOJrqptQ1EcL5/zsbgYr1c= Date: Wed, 30 Sep 2020 18:18:38 +0200 From: Greg Kroah-Hartman To: Vincent Mailhol Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-can@vger.kernel.org, Wolfgang Grandegger , Marc Kleine-Budde , "David S . Miller" , Jakub Kicinski , Masahiro Yamada , Arunachalam Santhanam , Oliver Neukum , "open list:USB ACM DRIVER" Subject: Re: [PATCH v2 5/6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces Message-ID: <20200930161838.GB1663344@kroah.com> References: <20200926175810.278529-1-mailhol.vincent@wanadoo.fr> <20200930144602.10290-6-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200930144602.10290-6-mailhol.vincent@wanadoo.fr> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 11:45:32PM +0900, Vincent Mailhol wrote: > + num_element = > + es58x_msg_num_element(es58x_dev->dev, > + bulk_rx_loopback_msg->rx_loopback_msg, > + msg_len); > + if (unlikely(num_element <= 0)) > + return num_element; Meta-comment on your use of 'unlikely' everywhere. Please drop it, it's only to be used if you can actually measure the difference in a benchmark. You are dealing with USB devices, which are really really slow here. Also, humans make horrible guessers for this type of thing, the compiler and CPU can get this right much more often than we can, and we had the numbers for it (someone measured that 80-90% of our usages of these markings are actually wrong on modern cpus). So just drop them all, it makes the code simpler to read and understand, and the cpu can actually go faster. thanks, greg k-h