Subject: Re: [PATCH V2 2/4] net: can: ifi: Fix TX DLC configuration

From: Oliver Hartkopp <[email-masked]>
Date: Wed, 2 Mar 2016 19:46:51 +0100

Hi Marek,

sorry for picking this patch up again.

After looking around in the original source I have one more comment:

On 03/02/2016 11:42 AM, Marek Vasut wrote:

> -	if (priv->can.ctrlmode & (CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO)) {
> -		if (can_is_canfd_skb(skb)) {
> -			txdlc |= IFI_CANFD_TXFIFO_DLC_EDL;
> -			if (cf->flags & CANFD_BRS)
> -				txdlc |= IFI_CANFD_TXFIFO_DLC_BRS;
> -		}
> +	txdlc |= can_len2dlc(cf->len);

At the top of the function you defined

	u32 txst, txid;
	u32 txdlc = 0;

and here you use 'txdlc |= ...'.

That's weird style IMO.

Please change it to

	u32 txst, txid, txdlc;

and

	txdlc = can_len2dlc(cf->len);

Thanks,
Oliver