Thread (44 messages) 44 messages, 3 authors, 2019-10-25

Re: [PATCH v2 06/22] mtd: spi-nor: Rework read_fsr()

From: Boris Brezillon <boris.brezillon@collabora.com>
Date: 2019-10-10 07:16:50
Also in: linux-aspeed, linux-mediatek, lkml

On Tue, 24 Sep 2019 07:46:12 +0000
[off-list ref] wrote:
From: Tudor Ambarus <redacted>

static int read_fsr(struct spi_nor *nor)
becomes
static int spi_nor_read_fsr(struct spi_nor *nor, u8 *fsr)

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 Flag Status 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.

S/pr_err/dev_err and drop duplicated dev_err in callers, in case the
function returns error.
Same comments as for patch 5.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help