From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andri Yngvason Subject: Re: [PATCH 1/4] Consolidate and unify state change handling Date: Thu, 18 Sep 2014 17:05:08 +0000 Message-ID: <541B10C4.5050206@marel.com> References: <541B078C.2020007@marel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bl2on0079.outbound.protection.outlook.com ([65.55.169.79]:2464 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932117AbaIRRFS (ORCPT ); Thu, 18 Sep 2014 13:05:18 -0400 In-Reply-To: Sender: linux-can-owner@vger.kernel.org List-ID: To: Paul Lever Cc: Wolfgang Grandegger , Marc Kleine-Budde , linux-can@vger.kernel.org On fim 18.sep 2014 16:55, Paul Lever wrote: > + if (rxerr < rxerr) > + return CAN_ERR_DIR_RX; > > This doesn't look right. rxerr can't be less than itself. Whoa! Nice catch. That should be "txerr < rxerr". This error would be near to impossible to catch in tests because this means that the case where "txerr == rxerr" would never happen. Andri