Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2230936pxa; Fri, 7 Aug 2020 06:31:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIpeD3yBTWjI7+iEDHhrFOMoBZrwd976mG2YbZsTwD2H/ifys/n2RvFhbrxkc58yMFafEo X-Received: by 2002:a05:6402:1855:: with SMTP id v21mr8996071edy.355.1596807075713; Fri, 07 Aug 2020 06:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596807075; cv=none; d=google.com; s=arc-20160816; b=n6uw2gTaAxX8z79jirWr4FTXcsywFbpHbOPpDSwlX8r7hz7cDWTV5Os/MD67L4zrsj pRAXAakBcX6ZqXBE6rKV2doIo/M5Q0PsRsK3DcDPHFGccW/nD/LXzT0OqcikU3UhUs4k +Hn/uMwp0s5toD9TYDCDryScAQple/twaE4IiJjrWgDNWcqhs5mbQVetihwSJCPsU7+4 9sf4iQwwvMK5vZcz+AHzLjdLvXpPhEPLD17w21KTbw3iDW/rJjHWc5YWBLZjD42vywL5 MJo7KPVrPUcHhPrpNJab9bhk6Q1ZzRS0LZTJo025x6ht2pzZm7jMQtC5VjD0k/IyaNLo XgpQ== 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=01JjBNZd/YuqAH4AX704dW9UQYE8dcWsuc3bmHru8lk=; b=kfga+UHizG1drPz4eiRrrynGn5egR9cHdDy35KhJUsBo4/rYzmiBOMY0IZ5wYG4qrC SXAZoXODgFqXix/41v3fgIVknMaraanPLZf6ha9FLlBgX5JPkEi9lvjCft5Yby2Qt5o5 L/NWidp/mjMcALqvx0Btu11SQ0ruMLSFvYXJsZ5SdxjCNrS5RnETUnM6+bIObbwJzPVE rQK3A5FO7YwF6k4LsYou2SbXwR3QzyE5MCJrBK6Kap0lU6/B1lrgy+zitwUT8gjgM1Cl hIbnwQbj9cYrcBXiM2T82Dn9YCBb0SSzOyElSRm3WTp5h1ZgHhiB65lvo39rvv3bQOXZ eNwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aBXsGfYb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f12si5360332edx.535.2020.08.07.06.30.52; Fri, 07 Aug 2020 06:31:15 -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=aBXsGfYb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726030AbgHGN14 (ORCPT + 99 others); Fri, 7 Aug 2020 09:27:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:50598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbgHGN1r (ORCPT ); Fri, 7 Aug 2020 09:27:47 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (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 771D12086A; Fri, 7 Aug 2020 13:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596806867; bh=cauRTF3cdR/PFgrsmHkzjr279ml8ZN/267S96A1D070=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aBXsGfYbdXLESB4THwag+WPAVnL5mwYabZopJFRadh5IwTbV4OJ5YuQUZpprZ3CC6 bp5X4FM9FzAK5ruMBje7aHEMQRi4UGr1Zwrdl/k+wEInPd2Z6/7BUoIJLBqrLxbuZb S3wmrfHiLijtUeSy2UjsqgR4FyGcBNUjf5tSXAVA= Date: Fri, 7 Aug 2020 14:27:22 +0100 From: Mark Brown To: Alain Volmat Cc: amelie.delaunay@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@st.com Subject: Re: [PATCH 2/5] spi: stm32: fix fifo threshold level in case of short transfer Message-ID: <20200807132722.GJ5435@sirena.org.uk> References: <1596806485-3810-1-git-send-email-alain.volmat@st.com> <1596806485-3810-3-git-send-email-alain.volmat@st.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AXxEqdD4tcVTjWte" Content-Disposition: inline In-Reply-To: <1596806485-3810-3-git-send-email-alain.volmat@st.com> X-Cookie: Disposable, use only once. 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 --AXxEqdD4tcVTjWte Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Aug 07, 2020 at 03:21:22PM +0200, Alain Volmat wrote: > + /* data_packet should not exceed transfer length */ > + packet = (half_fifo > xfer_len) ? xfer_len : half_fifo; Please write normal conditional statements to improve legibility. --AXxEqdD4tcVTjWte Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl8tVrkACgkQJNaLcl1U h9AKZQf/a+Ru7h5ixAXVScXCOGiC+r341yYUTHK9LElaCpXw4iTXlGHMRiJkJOsr adMT9NNEs2Ka5PQ7wiKIw558VLZ5WbCQ2paWcKN4vElYOhulMCRn3X7Lcs6VYzW1 scWxT07YTt15Tvxi7uBpRedIgOYUO/1sey+1skdwaqQbQYykoV/XUvRYehzyeZ7G tFJMFskTaBJ8T2I910IItEFasKttZUrLa1X3xtn97WiM2wnX+YCu+BDPwsKv5x0V 63H0dHkTGwEnNiByRU4O3rL8Bx0XnopWzYJlfSY+ayH0QYmh5raD0Fgn/86cW4e4 BVP46YZ6w0ZmTKL/prjveFSWY6zLyQ== =v0uW -----END PGP SIGNATURE----- --AXxEqdD4tcVTjWte--