On 2009/08/17 15:08, Thomas Pfaff wrote:
> On Mon, 17 Aug 2009 14:26:08 +0200
> Claudio Jeker wrote:
> > >
> > > Seems a bit overkill to mark personal preference with XXX magic, but
> > > alright. I'll go with that explanation ;-)
> >
> > The magic is for the value 1 (it does not matter if writ
On Mon, 17 Aug 2009 14:26:08 +0200
Claudio Jeker wrote:
> >
> > Seems a bit overkill to mark personal preference with XXX magic, but
> > alright. I'll go with that explanation ;-)
>
> The magic is for the value 1 (it does not matter if written 1 or 0x1) it
> seems that for some magic reason tha
On Mon, Aug 17, 2009 at 02:17:17PM +0200, Thomas Pfaff wrote:
> [...]
> > > However, my question was not why not use the macro but why
> > > specify 0x1 rather than just 1.
> > >
> > > AFAIK there's no difference but the /* XXX magic 0x1 */ comment
> > > seem to indicate otherwise and it got me cur
[...]
> > However, my question was not why not use the macro but why
> > specify 0x1 rather than just 1.
> >
> > AFAIK there's no difference but the /* XXX magic 0x1 */ comment
> > seem to indicate otherwise and it got me curious, though no big
> > deal.
>
> There is no diffrence. However sometime
reflum,
On Mon, 2009-08-17 at 13:57 +0200, Thomas Pfaff wrote:
> On Mon, 17 Aug 2009 12:44:59 +0200
> Jonathan Gray wrote:
>
> > On Mon, Aug 17, 2009 at 12:09:17PM +0200, Thomas Pfaff wrote:
> > > On Mon, 17 Aug 2009 01:00:23 +0200
> > > Jonathan Gray wrote:
> > >
> > > > /* XXX magic 0x
On Mon, 17 Aug 2009 12:44:59 +0200
Jonathan Gray wrote:
> On Mon, Aug 17, 2009 at 12:09:17PM +0200, Thomas Pfaff wrote:
> > On Mon, 17 Aug 2009 01:00:23 +0200
> > Jonathan Gray wrote:
> >
> > > /* XXX magic 0x1 */
> > > - test1 |= LSHIFT(0x1, ATW_TEST1_DBGREAD_MASK) | ATW_TEST1_CONTROL;
> > >
On Mon, Aug 17, 2009 at 12:09:17PM +0200, Thomas Pfaff wrote:
> On Mon, 17 Aug 2009 01:00:23 +0200
> Jonathan Gray wrote:
>
> > /* XXX magic 0x1 */
> > - test1 |= LSHIFT(0x1, ATW_TEST1_DBGREAD_MASK) | ATW_TEST1_CONTROL;
> > + test1 |= (0x1 << ATW_TEST1_DBGREAD_SHIFT) | ATW_TEST1_CONTROL;
>
On Mon, 17 Aug 2009 01:00:23 +0200
Jonathan Gray wrote:
> /* XXX magic 0x1 */
> - test1 |= LSHIFT(0x1, ATW_TEST1_DBGREAD_MASK) | ATW_TEST1_CONTROL;
> + test1 |= (0x1 << ATW_TEST1_DBGREAD_SHIFT) | ATW_TEST1_CONTROL;
I'm curious, what is the difference between 1 << N and 0x1 << N ?
This is part of an effort to curb the macro abuse
in atw. Please test.
Index: atw.c
===
RCS file: /cvs/src/sys/dev/ic/atw.c,v
retrieving revision 1.69
diff -u -p -r1.69 atw.c
--- atw.c 16 Aug 2009 18:03:48 - 1.69
+++ a