lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <735d62ba-51b5-4dc2-a8e4-0701ffb01f9a@web.de>
Date: Tue, 26 Aug 2025 07:43:33 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Xichao Zhao <zhao.xichao@...o.com>, linux-can@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
 Chandrasekar Ramakrishnan <rcsekar@...sung.com>,
 Marc Kleine-Budde <mkl@...gutronix.de>,
 Vincent Mailhol <mailhol.vincent@...adoo.fr>
Subject: Re: [PATCH v2] can: m_can: use us_to_ktime() in m_can_set_coalesce()

> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ