Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2000201ybp; Thu, 10 Oct 2019 00:22:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrAvF3rdbby2ZKIApRyYXOqVebIxeKE8XEfCWZ5ygn/UkEDbfJjGqcRWE+yChElqpcXCni X-Received: by 2002:a05:6402:1351:: with SMTP id y17mr6735967edw.294.1570692158655; Thu, 10 Oct 2019 00:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570692158; cv=none; d=google.com; s=arc-20160816; b=FxuzQDnPbxATfQQDKoeZ0hogA0w2MkorAShOugvZp4QLxgu/jw1RHc/5sCan2dNv+r 1qXONxEdkifhdCc/gAeiPIqFFDCCEl5ry6gP0G7xwOH06giUPqIsKcGX0MFCvM7nDLYO LceKgTDOpWOSRcMF2WD7mUUrvoFeCn7rCQywJJ1kow3enfMdF5sU84Hga/BE42oT0mRa 6iqRXjKE90vEzv+j/ZJ0MtVZ0jYrsyzpK4dqt6AqFS5SoaosYHjlY4DnkQuvpDO7oe2p 2PY3FfnIdZ9ZF1/0XWOgkEYrnVt4jnQSyWoRgpPDjDsvygqsj5EHirgLOaw3tAPcYLVi bgqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=XjCI0uQxfWq+CjcSRmnCON7uzEA9wfj6CD6tP++L8Ek=; b=vjHrVytd1rpSNNi/RwmSr7ZBoeNikVZPLrJ42W8nCxJqDqgazFQii2/lHE3xXhREhH ZZvxPLI0o7N3u2E/gHvgjlJUKJxyLKRAbyu2cTt1WnVbIdQ+KGXCn4dxBEMZdZuae+uX ci3t5EpU9JjRSXDGeZExmNlDirRfb2hHyu69Oc3zA8ZWZCd/LhlAhyXRtuhScqP3nJuJ QH0YqVPHW1O+6BGXcNxq027eH3caxiTiF5fiZtZity9QDo7pVKLZSzNZ5I53uYJncJkW 6MnK1C6nxP8LmCVBD8N57ecEqXWBMIkIFwK0t6djrQrSq8S4YwO+ADdKjasT8mNUsBe+ /alQ== ARC-Authentication-Results: i=1; mx.google.com; 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 27si2712369edz.186.2019.10.10.00.22.14; Thu, 10 Oct 2019 00:22:38 -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; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733062AbfJJHWI (ORCPT + 99 others); Thu, 10 Oct 2019 03:22:08 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44548 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733044AbfJJHQ7 (ORCPT ); Thu, 10 Oct 2019 03:16:59 -0400 Received: from dhcp-172-31-174-146.wireless.concordia.ca (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id AEEFF290694; Thu, 10 Oct 2019 08:16:57 +0100 (BST) Date: Thu, 10 Oct 2019 09:16:54 +0200 From: Boris Brezillon To: Cc: , , , , , linux-aspeed@lists.ozlabs.org, andrew@aj.id.au, richard@nod.at, linux-kernel@vger.kernel.org, vz@mleia.com, linux-mediatek@lists.infradead.org, joel@jms.id.au, miquel.raynal@bootlin.com, matthias.bgg@gmail.com, computersforpeace@gmail.com, dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 07/22] mtd: spi-nor: Rework read_cr() Message-ID: <20191010091648.10d9a993@dhcp-172-31-174-146.wireless.concordia.ca> In-Reply-To: <20190924074533.6618-8-tudor.ambarus@microchip.com> References: <20190924074533.6618-1-tudor.ambarus@microchip.com> <20190924074533.6618-8-tudor.ambarus@microchip.com> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Sep 2019 07:46:15 +0000 wrote: > From: Tudor Ambarus > > static int read_cr(struct spi_nor *nor) > becomes > static int spi_nor_read_cr(struct spi_nor *nor, u8 *cr) > > The new function returns 0 on success and -errno otherwise. > We let the callers pass the pointer to the buffer where the > value of the Configuration Register will be written. This way > we avoid the casts between int and u8, which can be confusing. > > Prepend spi_nor_ to the function name, all functions should begin > with that. > Same as for patch 5, this should be split in several patches. > Vendors are using both the "Configuration Register" and the > "Status Register 2" terminology when referring to the second byte > of the Status Register. Indicate in the description of the function > that we use the SPINOR_OP_RDCR (35h) command to interrogate the ^query > Configuration Register. >