devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Cao Minh Hiep <cm-hiep@jinso.co.jp>,
	Mark Brown <broonie@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Subject: Re: [RFC] spi: Using Trigger number to transmit/receive data
Date: Tue, 18 Mar 2014 18:17:33 -0700 (PDT)	[thread overview]
Message-ID: <8738ifng0l.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <CAMuHMdUpm_4f7LynObRA+NDn4vqeUc0a2XZW-E=4LKL_Ro3XZw@mail.gmail.com>


Hi Geert, Hiep

> > +static void qspi_update(const struct rspi_data *rspi, u8 mask, u8 val, u8 reg)
> > +{
> > +       u8 data;
> > +
> > +       data = rspi_read8(rspi, reg);
> > +       data &= ~mask;
> > +       data |= (val & mask);
> 
> I think this "& mask" is superfluous.

This "& mask" protects data from un-anticipative overwrite IMO.
Other driver is using same style.
ex) snd_soc_update_bits()


  parent reply	other threads:[~2014-03-19  1:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  8:29 [RFC] spi: Using Trigger number to transmit/receive data Cao Minh Hiep
2014-03-13  8:29 ` Cao Minh Hiep
2014-03-13  9:23   ` Geert Uytterhoeven
2014-03-17  1:11     ` カオ ミン ヒェップ
2014-03-17  7:54       ` Geert Uytterhoeven
2014-03-17 12:01         ` カオ ミン ヒェップ
2014-03-17 19:48           ` Geert Uytterhoeven
2014-03-17 20:32             ` Mark Brown
2014-03-19  0:50             ` カオ ミン ヒェップ
2014-03-19  1:17     ` Kuninori Morimoto [this message]
2014-03-13  9:27   ` Kuninori Morimoto
2014-03-17  1:15     ` カオ ミン ヒェップ
2014-03-13 14:17 ` Mark Brown
2014-03-17  1:16   ` カオ ミン ヒェップ

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=8738ifng0l.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cm-hiep@jinso.co.jp \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sh@vger.kernel.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).