From: Markus Elfring <Markus.Elfring@web.de>
To: Xichao Zhao <zhao.xichao@vivo.com>, linux-can@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Chandrasekar Ramakrishnan <rcsekar@samsung.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Subject: Re: [PATCH v2] can: m_can: use us_to_ktime() in m_can_set_coalesce()
Date: Tue, 26 Aug 2025 07:43:33 +0200 [thread overview]
Message-ID: <735d62ba-51b5-4dc2-a8e4-0701ffb01f9a@web.de> (raw)
In-Reply-To: <20250826025131.112900-1-zhao.xichao@vivo.com>
> Replace the if-else statement with a ternary operator to
> set cdev->irq_timer_wait. Use us_to_ktime() instead of
> ns_to_ktime() with NSEC_PER_USEC multiplication. Simplify
…
You should occasionally use more than 57 characters in text lines
of such a change description.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc3#n638
Will an enumeration become helpful here?
…> +++ b/drivers/net/can/m_can/m_can.c
> @@ -2211,13 +2211,9 @@ static int m_can_set_coalesce(struct net_device *dev,
…> + cdev->irq_timer_wait = us_to_ktime(cdev->rx_coalesce_usecs_irq ?
> + cdev->rx_coalesce_usecs_irq :
> + cdev->tx_coalesce_usecs_irq);
…
I am curious how coding style preferences will evolve further also for
the usage of the conditional operator at such a place.
Regards,
Markus
next prev parent reply other threads:[~2025-08-26 5:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 2:51 Xichao Zhao
2025-08-26 5:43 ` Markus Elfring [this message]
2025-08-26 8:38 ` Vincent Mailhol
2025-08-26 8:44 ` Marc Kleine-Budde
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=735d62ba-51b5-4dc2-a8e4-0701ffb01f9a@web.de \
--to=markus.elfring@web.de \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
--cc=rcsekar@samsung.com \
--cc=zhao.xichao@vivo.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
all inboxes | Powered by JetHome®