Thread (4 messages) 4 messages, 2 authors, 2016-03-04

[rtc-linux] Re: [PATCH 4/6] rtc-rv3029: Add i2c register update-bits helper

From: Michael Büsch <m@bues.ch>
Date: 2016-03-04 19:47:11

On Fri, 4 Mar 2016 20:42:23 +0100
Alexandre Belloni [off-list ref] wrote:
quoted
+	buf &= mask;
+	buf |= set;  
Well, this is not exactly what is expected from an update_bits function,
it should be:

	buf &= ~mask;
	buf |= set & mask;

What you pass to the function is the mask of bits you want to set.
Meh, ok. Everybody does seem to feel differently on that issue.
I did it exactly like this with ~mask in the b43 driver and received a
lot of bashing for it. :)

But well, to me either way is fine. So I'll change this to do it with
~mask too.

-- 
Michael

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachments

  • (unnamed) [application/pgp-signature] 819 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help