From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 184D5CDB47E for ; Wed, 18 Oct 2023 08:33:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344711AbjJRIdH (ORCPT ); Wed, 18 Oct 2023 04:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344717AbjJRIdF (ORCPT ); Wed, 18 Oct 2023 04:33:05 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F20F10C for ; Wed, 18 Oct 2023 01:33:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A7A8C433C9; Wed, 18 Oct 2023 08:33:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697617984; bh=JCobLY4PQbNo/OadzXHobT7yufD2DypNJuvfESqM2HM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J+dUmYUxHYcwx3NNrG2uKOdo1olAr6xgCpPcdKOL/beEZge9lydlU4VBrkap+yii5 VDfsf1N+PoStk3ZXbFPhz5LRRS/KVeavE/C8J5YAUYxEodclmgJe7YsPN34J4+gkai Axmnddc2WTDolL9azg+IbfS7UO9rbbfmpEMQBqm0= Date: Wed, 18 Oct 2023 10:33:00 +0200 From: Greg Kroah-Hartman To: Saeed Mahameed Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Leon Romanovsky , Jason Gunthorpe , Jiri Pirko , Saeed Mahameed Subject: Re: [PATCH 5/5] misc: mlx5ctl: Add umem reg/unreg ioctl Message-ID: <2023101841-wow-stardust-3c09@gregkh> References: <20231018081941.475277-1-saeed@kernel.org> <20231018081941.475277-6-saeed@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018081941.475277-6-saeed@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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