Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp856143imu; Tue, 20 Nov 2018 08:00:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/VPArz2DtxWayIN7WQglA1+FNLFV+eNf50/nAtX1/tshSCESdoXaWEMXAY/yjI4F2HWXPqP X-Received: by 2002:a63:4246:: with SMTP id p67mr2358761pga.335.1542729643267; Tue, 20 Nov 2018 08:00:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542729643; cv=none; d=google.com; s=arc-20160816; b=nVr5CS0kIQKDGQAY5OB3k2MYZEl04tey5F/XPau3lXwXxTFVxZaOni1PT1uesczYw2 H+j8xiP3d5n6QCTvJpzKUvJri9YEvEvkOaldINT9v8pUVDxlk1TOxDukIuclchLZTmMi lIEQgvwY7iKuLD46wxVqLy/PxLfeJ2RbUsFa+epP8DwWTTVigiPTSzt/IEQegl9wsw9O c45RcNkVUCv9YoWgbmI5UlpxCN8eevzUM3YgJv8JAX4bw/XzvG8t2vn0cunrzWTiQVIC Ok496GUVuYhyscY2wJns1S19sect/H70Y6SsVEatdikx0T66RlA3oK2Rs/pYTHqSFcPz 0G8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=By1XcD31rX/VPT7M9w25J7fJhEmJOCMqmsU+wmh5StE=; b=vHBmhF/hBCB8dn0FIEdOgGnS0kXBsM1dXpp25zvQTpX8ukTxCG2rI+N//Ant8NtpEM nX2vItYkd+FNRsqA9WJKOp9c1M3LT9qNvb9hGJdEKjz44WbjPm3BxCZs3TpKWgSgCvp1 dX1j9eGx1LalveNUCHplTSEUbJJPmk0eNlmwWONZQEbwEJek1AVv/NQbymB8lLN4yA1D 4jflzGO/OI9Vhn9718pllIwUzI6zvqw22u98RjoHRUYkAvJKBsUG7LBRFXlKAWj+/eL+ 0KeeNernBRPI54FnK5v3DZJ64nw97tQb4m2yFDaYROHmFC7GQRc9MdlxkUY+Wi242GSt UppQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=pobvoXCk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si42536995pgj.142.2018.11.20.08.00.28; Tue, 20 Nov 2018 08:00:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=pobvoXCk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729864AbeKTXbW (ORCPT + 99 others); Tue, 20 Nov 2018 18:31:22 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:52734 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726708AbeKTXbW (ORCPT ); Tue, 20 Nov 2018 18:31:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=By1XcD31rX/VPT7M9w25J7fJhEmJOCMqmsU+wmh5StE=; b=pobvoXCkoQsaKWHNQcYq8EB07 COJk50c0E9pM55Uolsd977jAvP2dH1Z3Vt29UzZWHSMzb/md6otT9awKTPcmMoAlESaF/MOtXwx9E 9jQqQ+qK4qs0weqxHqEsEjTi8dms8X2AsP/Kr2EW6DN1FY3pK+KCf4teds4Z5hQ5a3rXg=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gP5fP-0001ch-HG; Tue, 20 Nov 2018 13:02:11 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id EC2EF1124DC1; Tue, 20 Nov 2018 13:02:10 +0000 (GMT) Date: Tue, 20 Nov 2018 13:02:10 +0000 From: Mark Brown To: Tomer Maimon Cc: olof@lixom.net, Rob Herring , Mark Rutland , Nancy Yuen , Patrick Venture , Brendan Higgins , Avi Fishman , Joel Stanley , linux-spi@vger.kernel.org, OpenBMC Maillist , Linux Kernel Mailing List , devicetree Subject: Re: [PATCH v1 1/1] spi: npcm: fix uninitialized 'val' warning in receive function Message-ID: <20181120130210.GA3894@sirena.org.uk> References: <20181118123504.83082-1-tmaimon77@gmail.com> <20181118123504.83082-2-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: X-Cookie: fortune: No such file or directory User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 20, 2018 at 12:51:19PM +0200, Tomer Maimon wrote: > We just tried to reduce the number of lines to minimum, so we have debug it > quite a lot (with all the numbers that can > get from priv->tx_bytes) and the only numbers that minimum function return > are 0, 1 or 2. > But in the end of the day, we don't have an issue with your solution as > long it will be done also in the transfer function. In general it's better to have the code be obviously correct than to try to push down the line count - it saves people the effort of figuring out if things are safe every time they look at it. --T4sUOijqQbZv57TR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlv0BdAACgkQJNaLcl1U h9ASIQf/cI3kpprBTkLEFxruAQbRVP4iqcAlySu6P7KxALXVKRtjn5bSW6zo68KR pdQQSaIy69W6iehi7+9YacuKmtJcDiqfRItJLuj5FK4PM0Wfv5SjLEs5oS5SahGi +CZsjlLWD7IKm/eiBfgpujOh1SuuAhJd0VuuEFkWE9ICbZWqaXYNTa4+5UVjwKPJ FQqUz1BO7UYUZ9rsECcO0IpJBThxcdSrSl3UV5CAivmve0HEo3FTD6Os9wO8wAx1 e5+3m35TBPjUatI3kdyB9PrQNSroqgGe5Ou3atz7GXwXPR5eA0Zt391/0I53kPsx vc11Ia8qPkKFJBlJQKYJRNzdRMdBXw== =b+mA -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--