From: Andrew Lunn <andrew@lunn.ch>
To: Brian Norris <computersforpeace@gmail.com>
Cc: dwmw2@infradead.org, boris.brezillon@free-electrons.com,
zajec5@gmail.com, linux-mtd@lists.infradead.org
Subject: Re: [patchv4] mtd: mchp23k256: Add driver for this SPI SRAM device
Date: Thu, 11 May 2017 19:30:22 +0200 [thread overview]
Message-ID: <20170511173022.GD565@lunn.ch> (raw)
In-Reply-To: <20170511171551.GF70297@google.com>
> > diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
> > new file mode 100644
> > index 000000000000..ed3d1724e5de
> > --- /dev/null
> > +++ b/drivers/mtd/devices/mchp23k256.c
> > @@ -0,0 +1,182 @@
> > +/*
> > + * mchp23k256.c
> > + *
> > + * Driver for Microchip 23k256 SPI RAM chips
> > + *
> > + * Copyright © 20016 Andrew Lunn <andrew@lunn.ch>
>
> Whoa, you have a time machine, and you used it to write this driver??
> I'm in awe!
>
> I've deleted a zero from this :)
Great, thanks.
> > +static int mchp23k256_read(struct mtd_info *mtd, loff_t from, size_t len,
> > + size_t *retlen, unsigned char *buf)
> > +{
> > + struct mchp23k256_flash *flash = to_mchp23k256_flash(mtd);
> > + struct spi_transfer transfer[2] = {};
> > + struct spi_message message;
> > + unsigned char command[3];
> > +
> > + spi_message_init(&message);
> > +
> > + memset(&transfer, 0, sizeof(transfer));
>
> Isn't this memset redundant, since you're initialized the struct above?
>
> (I haven't touched this when applying.)
I think was getting compiler warnings somewhere. Used but not set. I
could of been too liberal spreading around the memset's.
Thanks
Andrew
prev parent reply other threads:[~2017-05-11 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 15:34 [patchv4] mtd: mchp23k256: Add driver for this SPI SRAM device Andrew Lunn
2017-04-14 12:52 ` Cyrille Pitchen
2017-05-11 17:15 ` Brian Norris
2017-05-11 17:30 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170511173022.GD565@lunn.ch \
--to=andrew@lunn.ch \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox