[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023101841-wow-stardust-3c09@gregkh>
Date: Wed, 18 Oct 2023 10:33:00 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Saeed Mahameed <saeed@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
Leon Romanovsky <leonro@...dia.com>,
Jason Gunthorpe <jgg@...dia.com>, Jiri Pirko <jiri@...dia.com>,
Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [PATCH 5/5] misc: mlx5ctl: Add umem reg/unreg ioctl
On Wed, Oct 18, 2023 at 01:19:41AM -0700, Saeed Mahameed wrote:
> +#define umem_dbg(__mdev, fmt, ...) \
> + dev_dbg((__mdev)->device, "mlx5ctl_umem: " fmt, ##__VA_ARGS__)
That's really really odd, and should not be needed for dev_dbg() because
you already have the driver name and file name and line information in
that message. Why add yet-another-prefix? Please just use normal
dev_dbg() lines.
> +#define MLX5CTL_UMEM_MAX_MB 64
> +
> +static size_t umem_num_pages(u64 addr, size_t len)
> +{
> + return (size_t)((ALIGN(addr + len, PAGE_SIZE) -
> + ALIGN_DOWN(addr, PAGE_SIZE))) /
> + PAGE_SIZE;
> +}
We don't have a function or macro for this already?
thanks,
greg k-h
Powered by blists - more mailing lists