Subject: Re: [PATCH net-next-2.6 v2] can: Topcliff: PCH_CAN driver: Fix build warnings

From: "Tomoya MORINAGA" <tomoya-linux-ECg8zkTtlr0C6LszWs/[email-masked]>
Date: Mon, 15 Nov 2010 16:39:28 +0900

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.