Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936496AbcJTP47 (ORCPT ); Thu, 20 Oct 2016 11:56:59 -0400 Received: from up.free-electrons.com ([163.172.77.33]:60231 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751503AbcJTP45 (ORCPT ); Thu, 20 Oct 2016 11:56:57 -0400 Date: Thu, 20 Oct 2016 17:56:41 +0200 From: Maxime Ripard To: Milo Kim Cc: Mark Brown , Chen-Yu Tsai , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] spi: sun6i: Use the driver data to get the buffer size Message-ID: <20161020155641.b3erji5vrkk3wvia@lukather> References: <20161019140234.13518-1-woogyom.kim@gmail.com> <20161019140234.13518-4-woogyom.kim@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="el7xfeozdi25ollc" Content-Disposition: inline In-Reply-To: <20161019140234.13518-4-woogyom.kim@gmail.com> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2341 Lines: 68 --el7xfeozdi25ollc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 19, 2016 at 11:02:34PM +0900, Milo Kim wrote: > The argument can be removed because the driver private data has it. >=20 > Cc: Mark Brown > Cc: Maxime Ripard > Cc: Chen-Yu Tsai > Signed-off-by: Milo Kim > --- > drivers/spi/spi-sun6i.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c > index 91235b2..c638f5d 100644 > --- a/drivers/spi/spi-sun6i.c > +++ b/drivers/spi/spi-sun6i.c > @@ -105,8 +105,9 @@ static inline void sun6i_spi_write(struct sun6i_spi *= sspi, u32 reg, u32 value) > writel(value, sspi->base_addr + reg); > } > =20 > -static inline void sun6i_spi_drain_fifo(struct sun6i_spi *sspi, int len) > +static inline void sun6i_spi_drain_fifo(struct sun6i_spi *sspi) > { > + int len =3D sspi->fifo_depth; > u32 reg, cnt; > u8 byte; I'm not so sure about this one. This function was initially to drain any given number of bytes, which might be of interest at some point. Removing that argument also remove that ability... Any particular reason you want to change it? Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --el7xfeozdi25ollc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYCOksAAoJEBx+YmzsjxAg/r0QAKB5XgWBrr724ofCDbdCExvQ qZFqJqN/NxLFt1EXkbGDvmVR92GOrn/r/eNtbI30K2z/EoElW3lnARRFehmX9A+4 baLlKOI0ex5O6L+XfQVtGJUECQEdzRBHKoM3vwJ7qUH+eY0F2LRaXCh5sMBpxOit zDvs6vbd8Rpz1ZlZ4mYB4sxUbBq0GviJJW9qiP73J4pP4cc6FnNYkXhf8MOBFEsP CuxaufuRGHMt8tw3vQ7B9D3PvvWqGH5IzfnjmsSxDRdgRUGNzn8m9cmwZFZt5LoM xeI7FlA/Y+lx9wETxD1TQxlLf4CaaDqX0ghAsR6NJlyMKGIPZXtD0WRU9wCUaTW8 0ZwmYy3Ez95Y8HSL9aH0dYW2uqVbmBBdggDoa+0GXEs0+021z/kVwD8h2K+5sNbz IfY8hy/mR4GFNKj+i9TR9IL6L71Kki2AVvTUTXxNmRVSyoz+4hwrFtaIUoaZZpK4 V559/fgXluajTJr6SC48KIkcLmETYK/Grx0rdgadcL1ZVc1WfVlU9usKdYHYB3dg SMI5sLmAXHMug8hmAsmuOeGx3vVVob9/P+0MzaFrTci2rKZ7aOlOD93+w687LyAF Tkx3COHe+9fiiK48A6tcbieUAx6JtclqGlusN3Inoh5Az8upgXUNFlOyDFr/pAn/ +meR4IYdubHr3yvRqrj/ =8DzZ -----END PGP SIGNATURE----- --el7xfeozdi25ollc--