All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
To: Jimmy Assarsson <extja@kvaser.com>
Cc: linux-can@vger.kernel.org, Jimmy Assarsson <jimmyassarsson@gmail.com>
Subject: Re: [PATCH v1 4/5] can: kvaser_usb: Use CAN_MHZ define in assignment of frequency
Date: Sat, 20 Nov 2021 00:42:40 +0900	[thread overview]
Message-ID: <CAMZ6Rq+gMAypGxVQEy0KKMMcb0n7hHNjefXUB-csAg3NgT_=FA@mail.gmail.com> (raw)
In-Reply-To: <90d2eddf-fcfb-0abf-2807-413b12480e8d@kvaser.com>

On Fri. 19 Nov 2021 at 22:30, Jimmy Assarsson <extja@kvaser.com> wrote:
>
> On 2021-11-19 14:19, Jimmy Assarsson wrote:
> > Use the CAN_MHZ define when assigning frequencies.
>
> Maybe we should use the HZ_PER_MHZ define introduced in kernel 5.15 in
> linux/units.h. It also got defines for KILO and MEGA, which we also got
> in linux/can/bittiming.h.
>
> What do you think?

With the recent changes in linux/units.h, I am perfectly fine to
remove the CAN_MHZ, CAN_KBPS and CAN_MBPS macros from
linux/can/bittiming.h.

I am just bothered by the name of the macro HZ_PER_MHZ. Hertz per Mega
Hertz is a ratio without a unit. The clock speed is expressed in
hertz. So:

.frep = 80 * MEGA,

  reply	other threads:[~2021-11-19 15:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 13:19 [PATCH v1 0/5] kvaser_{pciefd,usb} fixes Jimmy Assarsson
2021-11-19 13:19 ` [PATCH v1 1/5] can: kvaser_pciefd: Do not increase stats->rx_{packets,bytes} for error frames Jimmy Assarsson
2021-11-20  3:06   ` Vincent Mailhol
2021-11-23  7:44     ` Jimmy Assarsson
2021-11-19 13:19 ` [PATCH v1 2/5] can: kvaser_pciefd: Increase correct stats->{rx,tx}_errors counter Jimmy Assarsson
2021-11-19 13:19 ` [PATCH v1 3/5] can: kvaser_usb: Do not increase stats->rx_{packets,bytes} for error frames Jimmy Assarsson
2021-11-19 13:19 ` [PATCH v1 4/5] can: kvaser_usb: Use CAN_MHZ define in assignment of frequency Jimmy Assarsson
2021-11-19 13:30   ` Jimmy Assarsson
2021-11-19 15:42     ` Vincent MAILHOL [this message]
2021-11-19 15:48       ` Vincent MAILHOL
2021-11-19 13:19 ` [PATCH v1 5/5] can: kvaser_usb: Get CAN clock frequency from device Jimmy Assarsson
2021-12-08  9:27 ` [PATCH v1 0/5] kvaser_{pciefd,usb} fixes Marc Kleine-Budde
2021-12-08 11:13   ` Jimmy Assarsson

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='CAMZ6Rq+gMAypGxVQEy0KKMMcb0n7hHNjefXUB-csAg3NgT_=FA@mail.gmail.com' \
    --to=mailhol.vincent@wanadoo.fr \
    --cc=extja@kvaser.com \
    --cc=jimmyassarsson@gmail.com \
    --cc=linux-can@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.