Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4091911imm; Mon, 30 Jul 2018 08:31:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfG82Fy/cq8AZYVoHRgN6szKPuomcoSnmbT9SYc/D1DYL2syff7n27jWkAZyYNUCrdHPiNl X-Received: by 2002:a63:8449:: with SMTP id k70-v6mr16939540pgd.309.1532964715689; Mon, 30 Jul 2018 08:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532964715; cv=none; d=google.com; s=arc-20160816; b=R10JNnUk+q9CMxvbxF72B77SQCg5Q1zQs8OS9CttccU5PmuNL5TbkoSA3Ap6L0PCrr tJT/EB5GXxVAGD3hPY6v9o7ywfp0FOyPPjJYuckPSms3Phfm1Hs9Gw4onpKUkuR86Tvu gKbplA8gzQE+CHuI6dORK4AP+9qy/PusMy7Opf0tSdgbC/xkfGywyAL+3AyT9oQFfSzq uD7mEN7dZYknTlYJfYB7bxxNV6z6yTfMr14PYgg4uUrUnzdVGlBlKqqBH3//qHg7cKOB C7zC5Nh8HN4HWis0C4zxaSMgGhfOzUSodC/qSiGGX1+39B+/uc0K/MN3eh6EySexlOYf uOAg== 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:arc-authentication-results; bh=q7ZOYiuQcI/LUrXaZxxC5+oowpzSk6W5ncn5RlliZjE=; b=D09eSddzFAQWdk0/hLuGJOi3JlucVKoBfyDLJ57VlFL6Hleny8yNlNuEUdzrJ5ufaE 1L33tcMVE+GMguwWU1kR00NS2pwpvXAIUiRS3o7uKsX/EaZhQSNoKjzAWKpEDD6LLKNF mygf0iIzic4uk/mUPwigMporKKpULueff4rWIrTX4qb086nt/DAP9Q3SmQXQ/7DETTij tpNDjsRYxkaFARPaj3ywLsfLa1GIP1DwIlq37qgFQmUZn5d9XnqFt+cYrP4o/vjqxT+1 BOiGEQYiHrtVF9Xeiug0AcoXLV0mAZrVzxa51s62vVPvrMUC3kgDW4YDKmEpPuoPkdGS m+2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Ev9QSJAw; 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 h34-v6si10761675pld.355.2018.07.30.08.31.41; Mon, 30 Jul 2018 08:31:55 -0700 (PDT) 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=Ev9QSJAw; 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 S1726962AbeG3RGL (ORCPT + 99 others); Mon, 30 Jul 2018 13:06:11 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:47456 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726762AbeG3RGL (ORCPT ); Mon, 30 Jul 2018 13:06:11 -0400 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=q7ZOYiuQcI/LUrXaZxxC5+oowpzSk6W5ncn5RlliZjE=; b=Ev9QSJAwgWCEfz7b1vnOdZQe9 w7QI/n96U1q5ClZ04ukRnhYkWbmvq0MkiRtB4IDgu/B1PSBoyWaVRP8iLtQsKewPEY7pCavX6RH9b MmMttiy/wleEwdYayN8xkyN62LpevA6VuR81P1SYMZIRne3mYa2VcZ6bdjQ1jsNzNNypQ=; 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 1fkA83-0005Wt-18; Mon, 30 Jul 2018 15:30:35 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 9FC8C1124216; Mon, 30 Jul 2018 16:30:34 +0100 (BST) Date: Mon, 30 Jul 2018 16:30:34 +0100 From: Mark Brown To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: linux-mips@linux-mips.org, Ralf Baechle , Paul Burton , James Hogan , linux-kernel@vger.kernel.org, Ionela Voinescu , Ezequiel Garcia , linux-spi@vger.kernel.org Subject: Re: [PATCH 10/15] spi: img-spfi: Implement dual and quad mode Message-ID: <20180730153034.GM5789@sirena.org.uk> References: <20180722212010.3979-1-afaerber@suse.de> <20180722212010.3979-11-afaerber@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="um2V5WpqCyd73IVb" Content-Disposition: inline In-Reply-To: <20180722212010.3979-11-afaerber@suse.de> X-Cookie: But they went to MARS around 1953!! User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --um2V5WpqCyd73IVb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 22, 2018 at 11:20:05PM +0200, Andreas F=E4rber wrote: > #define SPFI_CONTROL_GET_DMA BIT(9) > -#define SPFI_CONTROL_SE BIT(8) > +#define SPFI_CONTROL_SE BIT(8) > +#define SPFI_CONTROL_TX_RX BIT(1) Random reindent of _SE there? > + /* > + * Disable SPFI for it not to interfere with > + * pending transactions > + */ > + spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL) > + & ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL); > return 0; The indentation on the second line of the write is very confusing, it should be indented relative to the first line. > + if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) && > + /* > + * For duplex mode (both the tx and rx buffers are !NULL) the > + * CMD, ADDR, and DUMMY byte parts of the transaction register > + * should always be 0 and therefore the pending transfer > + * technique cannot be used. > + */ > + (xfer->tx_buf) && (!xfer->rx_buf) && > + (xfer->len <=3D SPFI_DATA_REQUEST_MAX_SIZE) && !is_pending) { > + transact =3D (1 & SPFI_TRANSACTION_CMD_MASK) << This is again *really* hard to read - having the comment in the middle of the condidional for the if statement, then indenting the code within the if statement to the same depth is just super confusing. =20 --um2V5WpqCyd73IVb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltfLxkACgkQJNaLcl1U h9CRZAf+LLcEEOfRSAY1EH5vz7zDOEnw4gK30aibUvhN9OgRdg3m5MfBShffYGNq M7zScjBY9bHhcsyEYdyU8NCPHYEq/VvmpLf+59mekYYcxZ/LxUs92fKF8XV+yMZ2 b4F0Mczv2DL08wsoeYGoTWioZ+of4nuDgiCm4KAUTHcrZqtUIvj1l5YDDJuyMPQb kObK5Ek6i+FZRkq+71IT82fHZbHt01BhGca7CfQWIgxuHvbyCudAyYjMMpPLmcxs JVebbmM9Bas6Eqp3FtVLVu5d3Oy1Ut/sq7OqDgWv0QmLMirZ9e31Wkzcl5cfoUQl Z65uarkrVQVcxYQt2IHLluaik6StCQ== =o2Zn -----END PGP SIGNATURE----- --um2V5WpqCyd73IVb--