From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 09/13] ARM: tegra: use clrsetbits_le32 in pinmux driver
Date: Tue, 25 Mar 2014 16:04:35 -0400 [thread overview]
Message-ID: <20140325200435.GV16360@bill-the-cat> (raw)
In-Reply-To: <1395764855-23377-1-git-send-email-swarren@wwwdotorg.org>
On Tue, Mar 25, 2014 at 10:27:35AM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> This removes a bunch of open-coded register IO, masking, and shifting.
> I would have squashed this into "ARM: tegra: pinctrl: remove duplication"
> except that keeping it a separate commit allows easier bisection of any
> issues that are introduced by this patch. I also wrote this patch on top
> of the series, and pushing it any lower in the series results in some
> conflicts I didn't feel like fixing.
Since things got a bit heated here while I was reading some other
stuff...
[snip]
> +static inline void update_reg_mask_shift_val(u32 *reg, u32 mask, u32 shift,
> + u32 val)
> +{
> + clrsetbits_le32(reg, mask << shift, val << shift);
> +}
So, lack of comments bad. Intention, good. We have a bitfield of size
M (that's all cleared in the mask) and value that may be less than M
bits wide. The name is a mouthful (but I see where Simon was coming
from, had I caught in time I might have suggested a comment instead.
But as Wolfgang's v4 shows, it's also not hard to just call
clrsetbits_le32 directly. Arguably the cases where mask==1 we should
just call setbits_le32 but that's not a big deal.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140325/f5fbda1d/attachment.pgp>
next prev parent reply other threads:[~2014-03-25 20:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 16:27 [U-Boot] [PATCH V3 09/13] ARM: tegra: use clrsetbits_le32 in pinmux driver Stephen Warren
2014-03-25 16:54 ` Wolfgang Denk
2014-03-25 16:56 ` Stephen Warren
2014-03-25 17:06 ` Wolfgang Denk
2014-03-25 20:04 ` Tom Rini
2014-03-25 22:19 ` Wolfgang Denk
2014-03-25 19:09 ` [U-Boot] [PATCH V4 " Wolfgang Denk
2014-03-25 20:00 ` Stephen Warren
2014-03-25 20:04 ` Tom Rini [this message]
2014-03-25 22:26 ` [U-Boot] [PATCH V3 " Wolfgang Denk
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=20140325200435.GV16360@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.