Message ID | 20200427082028.394719-16-boris.brezillon@collabora.com |
---|---|
State | Changes Requested |
Delegated to: | Miquel Raynal |
Headers | show |
Series | mtd: rawnand: cafe: Convert to exec_op() (and more) | expand |
Hi Boris, Boris Brezillon <boris.brezillon@collabora.com> wrote on Mon, 27 Apr 2020 10:20:25 +0200: > Replace the uint8_t pointer by a void pointer and make the length > unsigned so it matches what's passed through the nand instructions. > Nit: I prefer NAND than nand in plain English. > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> But whatever, Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> > --- > drivers/mtd/nand/raw/cafe_nand.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c > index 5b38d496d923..26495085f285 100644 > --- a/drivers/mtd/nand/raw/cafe_nand.c > +++ b/drivers/mtd/nand/raw/cafe_nand.c > @@ -179,7 +179,8 @@ static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; > #define cafe_readl(cafe, addr) readl((cafe)->mmio + CAFE_##addr) > #define cafe_writel(cafe, datum, addr) writel(datum, (cafe)->mmio + CAFE_##addr) > > -static void cafe_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) > +static void cafe_write_buf(struct nand_chip *chip, const void *buf, > + unsigned int len) > { > struct cafe_priv *cafe = nand_get_controller_data(chip); > > @@ -191,7 +192,7 @@ static void cafe_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) > dev_dbg(&cafe->pdev->dev, "Copy 0x%x bytes to write buffer.\n", len); > } > > -static void cafe_read_buf(struct nand_chip *chip, uint8_t *buf, int len) > +static void cafe_read_buf(struct nand_chip *chip, void *buf, unsigned int len) > { > struct cafe_priv *cafe = nand_get_controller_data(chip); > Thanks, Miquèl
On Mon, 27 Apr 2020 22:00:55 +0200 Miquel Raynal <miquel.raynal@bootlin.com> wrote: > Hi Boris, > > Boris Brezillon <boris.brezillon@collabora.com> wrote on Mon, 27 Apr > 2020 10:20:25 +0200: > > > Replace the uint8_t pointer by a void pointer and make the length > > unsigned so it matches what's passed through the nand instructions. > > > > Nit: I prefer NAND than nand in plain English. Will fix that.
diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c index 5b38d496d923..26495085f285 100644 --- a/drivers/mtd/nand/raw/cafe_nand.c +++ b/drivers/mtd/nand/raw/cafe_nand.c @@ -179,7 +179,8 @@ static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; #define cafe_readl(cafe, addr) readl((cafe)->mmio + CAFE_##addr) #define cafe_writel(cafe, datum, addr) writel(datum, (cafe)->mmio + CAFE_##addr) -static void cafe_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) +static void cafe_write_buf(struct nand_chip *chip, const void *buf, + unsigned int len) { struct cafe_priv *cafe = nand_get_controller_data(chip); @@ -191,7 +192,7 @@ static void cafe_write_buf(struct nand_chip *chip, const uint8_t *buf, int len) dev_dbg(&cafe->pdev->dev, "Copy 0x%x bytes to write buffer.\n", len); } -static void cafe_read_buf(struct nand_chip *chip, uint8_t *buf, int len) +static void cafe_read_buf(struct nand_chip *chip, void *buf, unsigned int len) { struct cafe_priv *cafe = nand_get_controller_data(chip);
Replace the uint8_t pointer by a void pointer and make the length unsigned so it matches what's passed through the nand instructions. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> --- drivers/mtd/nand/raw/cafe_nand.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)