lkml.org 
[lkml]   [2010]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: Fix build warnings
Date
On Friday, November 12, 2010 8:45 PM, Wolfgang Grandegger wrote:

> >> This is an enumeration:
> >>
> >> enum {
> >> PCH_STUF_ERR = 1,
> >> PCH_FORM_ERR,
> >> PCH_ACK_ERR,
> >> PCH_BIT1_ERR;
> >> PCH_BIT0_ERR,
> >> PCH_CRC_ERR,
> >> PCH_LEC_ALL;
> >> }
> >
> > No,
> > LEC is for bit assignment.
> > Thus, "enum" can't be used.
>
> Why? For me it's a classical enum because the value matters, and *not*
> the individual bit. Do you agree?

Sorry, at last, I understand your saying.
I agree.



> >> Also, could you please add the TEC and REC:
> >>
> >> cf->data[6] = ioread32(&priv->regs->errc) & CAN_TEC;
> >> cf->data[7] = (ioread32(&priv->regs->errc) & CAN_REC) >> 8;
> >
> > I will add.
>
> BTW: it could be done with one I/O call:
>
> errc = ioread32(&priv->regs->errc);
> cf->data[6] = errc & CAN_TEC;
> cf->data[7] = (errc & CAN_REC) >> 8;
>
> > But I couldn't find
>
> Don't understand? It's also implemented for the SJA1000 driver:

Sorry, the above my line is fogotten to delete.
I can uderstand your saying.

---
Thanks,

Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.


\
 
 \ /
  Last update: 2010-11-15 08:43    [W:0.717 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site