linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Greg KH <gregkh@linuxfoundation.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	MTD Maling List <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 1/3] eeprom: at25: Drop obsolete cast in at25_ee_write()
Date: Wed, 10 Oct 2018 16:42:06 +0200	[thread overview]
Message-ID: <CAMuHMdVs7CTqeyxM_dZ2aLZOc_Deo3cOWocwFBCGCY8xcyJo0g@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a1vSqKk4jRoz-YOnLKP6uL7sPRLj9=BVz92mnjNjbJ3Tg@mail.gmail.com>

Hi Arnd,

On Wed, Oct 10, 2018 at 4:01 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On 10/10/18, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> > Since commit 01973a01f9ec34b7 ("eeprom: at25: remove nvmem regmap
> > dependency") changed the type of "off" from "loff_t" to "unsigned int",
> > there is no longer a need to cast it to "unsigned".
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> >  drivers/misc/eeprom/at25.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
> > index 840afb398f9e4c88..7707d3fb49b526d9 100644
> > --- a/drivers/misc/eeprom/at25.c
> > +++ b/drivers/misc/eeprom/at25.c
> > @@ -160,7 +160,7 @@ static int at25_ee_write(void *priv, unsigned int off,
> > void *val, size_t count)
> >       do {
> >               unsigned long   timeout, retries;
> >               unsigned        segment;
> > -             unsigned        offset = (unsigned) off;
> > +             unsigned        offset = off;
> >               u8              *cp = bounce;
> >               int             sr;
> >               u8              instr;
> > --
>
> This looks correct, but why not remove the extra variable completely
> and rename 'off' to 'offset'?

Thanks, good point. Will do.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-10-10 14:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 13:40 [PATCH 0/3] eeprom: at25: SPI transfer improvements Geert Uytterhoeven
2018-10-10 13:40 ` [PATCH 1/3] eeprom: at25: Drop obsolete cast in at25_ee_write() Geert Uytterhoeven
2018-10-10 13:40 ` [PATCH 2/3] eeprom: at25: Use spi_message_init_with_transfers() instead of open coding Geert Uytterhoeven
2018-10-10 13:40 ` [PATCH 3/3] eeprom: at25: Split writes in two SPI transfers to optimize DMA Geert Uytterhoeven
2018-10-10 21:47   ` Trent Piepho
2018-10-11  6:59     ` Geert Uytterhoeven
2018-10-10 13:43 ` [PATCH 0/3] eeprom: at25: SPI transfer improvements Geert Uytterhoeven
2018-10-10 13:43   ` [PATCH 1/3] eeprom: at25: Drop obsolete cast in at25_ee_write() Geert Uytterhoeven
2018-10-10 14:01     ` Arnd Bergmann
2018-10-10 14:42       ` Geert Uytterhoeven [this message]
2018-10-10 13:43   ` [PATCH 2/3] eeprom: at25: Use spi_message_init_with_transfers() instead of open coding Geert Uytterhoeven
2018-10-10 14:02     ` Arnd Bergmann
2018-10-10 13:43   ` [PATCH 3/3] eeprom: at25: Split writes in two SPI transfers to optimize DMA Geert Uytterhoeven
2018-10-10 14:03     ` Arnd Bergmann

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=CAMuHMdVs7CTqeyxM_dZ2aLZOc_Deo3cOWocwFBCGCY8xcyJo0g@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).