linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
	Mark Rutland <mark.rutland@arm.com>,
	Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [PATCH V2 2/4] net: can: ifi: Fix TX DLC configuration
Date: Wed, 02 Mar 2016 21:14:13 +0100	[thread overview]
Message-ID: <56D74995.8010907@denx.de> (raw)
In-Reply-To: <56D7351B.1060403@hartkopp.net>

On 03/02/2016 07:46 PM, Oliver Hartkopp wrote:
> Hi Marek,

Hi!

> sorry for picking this patch up again.

nothing to be sorry about, thanks for the input :)

> 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);

I'll send a V3 shortly.

btw. I forgot to add V2 to the 3/4 and 4/4 patches, sigh.


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-03-02 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 10:42 [PATCH V2 0/4] Synchronise IFI CANFD driver with real world Marek Vasut
2016-03-02 10:42 ` [PATCH 1/4] net: can: ifi: Fix clock generator configuration Marek Vasut
2016-03-02 10:42 ` [PATCH V2 2/4] net: can: ifi: Fix TX DLC configuration Marek Vasut
2016-03-02 18:46   ` Oliver Hartkopp
2016-03-02 20:14     ` Marek Vasut [this message]
2016-03-02 10:42 ` [PATCH 3/4] net: can: ifi: Fix RX and TX ID mask Marek Vasut
2016-03-02 10:42 ` [PATCH 4/4] net: can: ifi: Add obscure bit swap for EFF frame IDs Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D74995.8010907@denx.de \
    --to=marex@denx.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).