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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D097C369D5 for ; Mon, 28 Apr 2025 16:57:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 200D560B57; Mon, 28 Apr 2025 16:57:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id w5PNYwqgihXB; Mon, 28 Apr 2025 16:57:09 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9539960BB2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1745859429; bh=Jp77ggnfBxCRkbuxBrXgEU+2BKtBt4rw8EnF8Qkf3bM=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=1DzWRaq2BJIiagjgD5F62C1E3wJDI3+3YNqZWhy7O690BGOf+43fSHELKq9WzW9tU U+ppCZ2ywShKQwU/tv/9Ke4GdyDc3YFjPnFIN7CtAdO5zTT3R4QSFXCoj8up3N+gD3 oNBdUvhabyUS4iRG1cOl0bBMxmkRxV3idKlqyykdV5DIl4Knq8JsEcZFsMYb2QEi8H SG6s8cp7BowZKhgKnYjiuwavCAofEh+eQcaCGEEKJ+8EajIIG4OJGv33B/A6bhxkKv Nr8O5vMOsdt0Sep2nXVN3H9DFU3heGhDIEvXyfmBJnR+zullQq36W53HO7lRam6ijx ZRdKMhtdRZsxg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 9539960BB2; Mon, 28 Apr 2025 16:57:09 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 1923231 for ; Mon, 28 Apr 2025 16:57:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0B1F340193 for ; Mon, 28 Apr 2025 16:57:08 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id YobOG4ep30_o for ; Mon, 28 Apr 2025 16:57:07 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 42BE040FCE DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 42BE040FCE Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp2.osuosl.org (Postfix) with ESMTPS id 42BE040FCE for ; Mon, 28 Apr 2025 16:57:07 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 9F8D161165; Mon, 28 Apr 2025 16:56:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8016C4CEE4; Mon, 28 Apr 2025 16:56:59 +0000 (UTC) Date: Mon, 28 Apr 2025 17:56:57 +0100 From: Simon Horman To: Larysa Zaremba Cc: intel-wired-lan@lists.osuosl.org, Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Przemek Kitszel , Jiri Pirko , Tatyana Nikolova , Andrew Lunn , Alexander Lobakin , Michael Ellerman , Maciej Fijalkowski , Lee Trager , Madhavan Srinivasan , Sridhar Samudrala , Jacob Keller , Michal Swiatkowski , Mateusz Polchlopek , Ahmed Zaki , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Karlsson, Magnus" , Emil Tantilov , Madhu Chittim , Josh Hay , Milena Olech , pavan.kumar.linga@intel.com, "Singhai, Anjali" , Phani R Burra Message-ID: <20250428165657.GE3339421@horms.kernel.org> References: <20250424113241.10061-1-larysa.zaremba@intel.com> <20250424113241.10061-4-larysa.zaremba@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250424113241.10061-4-larysa.zaremba@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745859425; bh=ZVz/phxXgV/uhXfx52GtvXgEsnsHvFfAcq8ln7+IPzY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ME35vYQ/VH0HQptcDvrpE5BVTSCvw+KZks+EMhweVEEGIR1r0Tk1DP1ZV3cw8N9mt EpiCGCFNCTVbHLiwxmsXneao9mB2mpkc0BHHj9dQqu+2bgcA9EPEucL+UeuNx16TfE v8/fFCEmQv9z1nE3t1srwRIxY4x0xBx6fYbE2P38P5Wx1RLCQszj9yM7hGsxCp+Y8X 9nfqGizpRaEp/Ozg3P2UOtl9YfOMFjoT3ibjjJQEnPZTGftRP9P8rzWwTY1Cp02UW/ IaqfKADAPkkKkFJDHCqzcAXRFCxXp7Yfb7el6rHaBRFV9Lf1Z/Nt+9sM5qTLmzvLJC HBlO8v32Kit5Q== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ME35vYQ/ Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 03/14] libie: add PCI device initialization helpers to libie X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, Apr 24, 2025 at 01:32:26PM +0200, Larysa Zaremba wrote: > From: Phani R Burra > > Add memory related support functions for drivers to access MMIO space and > allocate/free dma buffers. > > Reviewed-by: Maciej Fijalkowski > Signed-off-by: Phani R Burra > Co-developed-by: Victor Raj > Signed-off-by: Victor Raj > Co-developed-by: Sridhar Samudrala > Signed-off-by: Sridhar Samudrala > Co-developed-by: Pavan Kumar Linga > Signed-off-by: Pavan Kumar Linga > Co-developed-by: Larysa Zaremba > Signed-off-by: Larysa Zaremba ... > diff --git a/include/linux/intel/libie/pci.h b/include/linux/intel/libie/pci.h ... > +#define libie_pci_map_mmio_region(mmio_info, offset, size, ...) \ > + __libie_pci_map_mmio_region(mmio_info, offset, size, \ > + COUNT_ARGS(__VA_ARGS__), ##__VA_ARGS__) > + > +#define libie_pci_get_mmio_addr(mmio_info, offset, ...) \ > + __libie_pci_get_mmio_addr(mmio_info, offset, \ > + COUNT_ARGS(__VA_ARGS__), ##__VA_ARGS__) Perhaps I'm missing something terribly obvious. But it seems to me that both libie_pci_map_mmio_region() and libie_pci_get_mmio_addr() are always called with the same number of arguments in this patchset. And if so, perhaps the va_args handling would be best dropped. > + > +bool __libie_pci_map_mmio_region(struct libie_mmio_info *mmio_info, > + resource_size_t offset, resource_size_t size, > + int num_args, ...); > +void __iomem *__libie_pci_get_mmio_addr(struct libie_mmio_info *mmio_info, > + resource_size_t region_offset, > + int num_args, ...); > +void libie_pci_unmap_all_mmio_regions(struct libie_mmio_info *mmio_info); > +int libie_pci_init_dev(struct pci_dev *pdev); > +void libie_pci_deinit_dev(struct pci_dev *pdev); > + > +#endif /* __LIBIE_PCI_H */ > -- > 2.47.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC38A27FD7E; Mon, 28 Apr 2025 16:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745859426; cv=none; b=uXQFJ9D+ABfLNngGmud6xFyBkPsd/flFZpZc4kI5haK7Jx2eM+97Ei+MeUX3gf3jyb/M5iY3dLi55hLdgBXs2DcxuN6TUOZ4HswpUbx78WN6t9V1SmvLykDcQOEvLFVc0e5y4C6ZEI+cz+l0XtjPeC6tfIMH7s/19mXsoldYpNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745859426; c=relaxed/simple; bh=ZVz/phxXgV/uhXfx52GtvXgEsnsHvFfAcq8ln7+IPzY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FfXceUkQInGlwTqsFRwyKFvbpPpJUxfHCZOT6+HxIxy/BYavCDNF/2BuarVae+uLXMmA4OaWn/J9Yu9Bb5kyqS+5SAvosDzxMvywqeN7HGZIka2+M1ufO1hXP8PC7gNFedZds1FwbegysYUo2jjiGDJtSYJZKDT6MVShCZX7DkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ME35vYQ/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ME35vYQ/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8016C4CEE4; Mon, 28 Apr 2025 16:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745859425; bh=ZVz/phxXgV/uhXfx52GtvXgEsnsHvFfAcq8ln7+IPzY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ME35vYQ/VH0HQptcDvrpE5BVTSCvw+KZks+EMhweVEEGIR1r0Tk1DP1ZV3cw8N9mt EpiCGCFNCTVbHLiwxmsXneao9mB2mpkc0BHHj9dQqu+2bgcA9EPEucL+UeuNx16TfE v8/fFCEmQv9z1nE3t1srwRIxY4x0xBx6fYbE2P38P5Wx1RLCQszj9yM7hGsxCp+Y8X 9nfqGizpRaEp/Ozg3P2UOtl9YfOMFjoT3ibjjJQEnPZTGftRP9P8rzWwTY1Cp02UW/ IaqfKADAPkkKkFJDHCqzcAXRFCxXp7Yfb7el6rHaBRFV9Lf1Z/Nt+9sM5qTLmzvLJC HBlO8v32Kit5Q== Date: Mon, 28 Apr 2025 17:56:57 +0100 From: Simon Horman To: Larysa Zaremba Cc: intel-wired-lan@lists.osuosl.org, Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Przemek Kitszel , Jiri Pirko , Tatyana Nikolova , Andrew Lunn , Alexander Lobakin , Michael Ellerman , Maciej Fijalkowski , Lee Trager , Madhavan Srinivasan , Sridhar Samudrala , Jacob Keller , Michal Swiatkowski , Mateusz Polchlopek , Ahmed Zaki , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Karlsson, Magnus" , Emil Tantilov , Madhu Chittim , Josh Hay , Milena Olech , pavan.kumar.linga@intel.com, "Singhai, Anjali" , Phani R Burra Subject: Re: [PATCH iwl-next v2 03/14] libie: add PCI device initialization helpers to libie Message-ID: <20250428165657.GE3339421@horms.kernel.org> References: <20250424113241.10061-1-larysa.zaremba@intel.com> <20250424113241.10061-4-larysa.zaremba@intel.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250424113241.10061-4-larysa.zaremba@intel.com> On Thu, Apr 24, 2025 at 01:32:26PM +0200, Larysa Zaremba wrote: > From: Phani R Burra > > Add memory related support functions for drivers to access MMIO space and > allocate/free dma buffers. > > Reviewed-by: Maciej Fijalkowski > Signed-off-by: Phani R Burra > Co-developed-by: Victor Raj > Signed-off-by: Victor Raj > Co-developed-by: Sridhar Samudrala > Signed-off-by: Sridhar Samudrala > Co-developed-by: Pavan Kumar Linga > Signed-off-by: Pavan Kumar Linga > Co-developed-by: Larysa Zaremba > Signed-off-by: Larysa Zaremba ... > diff --git a/include/linux/intel/libie/pci.h b/include/linux/intel/libie/pci.h ... > +#define libie_pci_map_mmio_region(mmio_info, offset, size, ...) \ > + __libie_pci_map_mmio_region(mmio_info, offset, size, \ > + COUNT_ARGS(__VA_ARGS__), ##__VA_ARGS__) > + > +#define libie_pci_get_mmio_addr(mmio_info, offset, ...) \ > + __libie_pci_get_mmio_addr(mmio_info, offset, \ > + COUNT_ARGS(__VA_ARGS__), ##__VA_ARGS__) Perhaps I'm missing something terribly obvious. But it seems to me that both libie_pci_map_mmio_region() and libie_pci_get_mmio_addr() are always called with the same number of arguments in this patchset. And if so, perhaps the va_args handling would be best dropped. > + > +bool __libie_pci_map_mmio_region(struct libie_mmio_info *mmio_info, > + resource_size_t offset, resource_size_t size, > + int num_args, ...); > +void __iomem *__libie_pci_get_mmio_addr(struct libie_mmio_info *mmio_info, > + resource_size_t region_offset, > + int num_args, ...); > +void libie_pci_unmap_all_mmio_regions(struct libie_mmio_info *mmio_info); > +int libie_pci_init_dev(struct pci_dev *pdev); > +void libie_pci_deinit_dev(struct pci_dev *pdev); > + > +#endif /* __LIBIE_PCI_H */ > -- > 2.47.0 >