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

From: Tomoya MORINAGA
Date: Mon Nov 15 2010 - 02:39:45 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/