From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Marek Vasut <marex@denx.de>, 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, 2 Mar 2016 19:46:51 +0100 [thread overview]
Message-ID: <56D7351B.1060403@hartkopp.net> (raw)
In-Reply-To: <1456915359-6775-3-git-send-email-marex@denx.de>
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
next prev parent reply other threads:[~2016-03-02 18:46 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 [this message]
2016-03-02 20:14 ` Marek Vasut
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=56D7351B.1060403@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=marex@denx.de \
--cc=mark.rutland@arm.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--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).