linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shijie8@gmail.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/3] mtd: nand: gpmi: add gpmi_move_bits function
Date: Sun, 30 Nov 2014 23:39:26 +0800	[thread overview]
Message-ID: <20141130153918.GA14834@localhost.localdomain> (raw)
In-Reply-To: <20141130095500.16f75e05@bbrezillon>

On Sun, Nov 30, 2014 at 09:55:00AM +0100, Boris Brezillon wrote:
> Hi Brian,
> 
> On Sun, 30 Nov 2014 00:11:10 -0800
> Brian Norris <computersforpeace@gmail.com> wrote:
> 
> > On Wed, Nov 26, 2014 at 05:57:08PM +0100, Boris Brezillon wrote:
> > > On Wed, 26 Nov 2014 17:53:11 +0100 Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
> > > > +/**
> > > > + * gpmi_move_bits - move bits from one memory region to another
> > > > + * @dst: destination buffer
> > > > + * @dst_bit_off: bit offset we're starting to write at
> > > > + * @src: source buffer
> > > > + * @src_bit_off: bit offset we're starting to read from
> > > > + * @nbits: number of bits to copy
> > > > + *
> > > > + * This functions copies bits from one memory region to another, and is used by
> > > > + * the GPMI driver to copy ECC sections which are not guaranteed to be byte
> > > > + * aligned.
> > > 
> > > I forgot to add that src and dst should not overlap, otherwise it won't
> > > work...
> > 
> > Hmm, normally that's implied for copy-like operations. But since you
> > named this function "move" (rather than "copy" or "cpy"), that's a
> > little less clear.
> 
> Indeed, that's a good point.
> 
> > 
> > Did you have a good reason for the "move" name? If not, maybe it's worth
> > changing.
> 
> No, I don't, and I'd prefer changing the name than implementing a non
> destructive move function.
> 
> I'll send a new version with this change.
Please add my tested-by.

Tested-by: Huang Shijie <shijie8@gmail.com>

  reply	other threads:[~2014-11-30 15:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 16:53 [PATCH v5 0/3] mtd: nand: gpmi: add proper raw access support Boris Brezillon
2014-11-26 16:53 ` [PATCH v5 1/3] mtd: nand: gpmi: add gpmi_move_bits function Boris Brezillon
2014-11-26 16:57   ` Boris Brezillon
2014-11-30  8:11     ` Brian Norris
2014-11-30  8:55       ` Boris Brezillon
2014-11-30 15:39         ` Huang Shijie [this message]
2014-11-26 16:53 ` [PATCH v5 2/3] mtd: nand: gpmi: add proper raw access support Boris Brezillon
2014-11-26 16:53 ` [PATCH v5 3/3] mtd: nand: gpmi: add raw oob access functions Boris Brezillon
2014-11-30  8:46 ` [PATCH v5 0/3] mtd: nand: gpmi: add proper raw access support Brian Norris

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=20141130153918.GA14834@localhost.localdomain \
    --to=shijie8@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).