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 C9CBEC61DA4 for ; Fri, 3 Feb 2023 10:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232554AbjBCKIZ (ORCPT ); Fri, 3 Feb 2023 05:08:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232424AbjBCKIY (ORCPT ); Fri, 3 Feb 2023 05:08:24 -0500 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4808BDE5; Fri, 3 Feb 2023 02:08:23 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 6756D28011B82; Fri, 3 Feb 2023 11:08:21 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 455342E9C9A; Fri, 3 Feb 2023 11:08:21 +0100 (CET) Date: Fri, 3 Feb 2023 11:08:21 +0100 From: Lukas Wunner To: "Li, Ming" Cc: Jonathan Cameron , Bjorn Helgaas , linux-pci@vger.kernel.org, Gregory Price , Ira Weiny , Dan Williams , Alison Schofield , Vishal Verma , Dave Jiang , Hillf Danton , Ben Widawsky , linuxarm@huawei.com, linux-cxl@vger.kernel.org Subject: Re: [PATCH v2 06/10] PCI/DOE: Allow mailbox creation without devres management Message-ID: <20230203100821.GB18459@wunner.de> References: <291131574c9e625195e9c34591abf5fa75cd1279.1674468099.git.lukas@wunner.de> <20230124121543.00002600@Huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Fri, Feb 03, 2023 at 05:06:21PM +0800, Li, Ming wrote: > On 1/24/2023 8:15 PM, Jonathan Cameron wrote: > > On Mon, 23 Jan 2023 11:16:00 +0100 Lukas Wunner wrote: > > > +/** > > > + * pci_doe_destroy_mb() - Destroy a DOE mailbox object > > > + * > > > + * @ptr: Pointer to DOE mailbox > > > + * > > > + * Destroy all internal data structures created for the DOE mailbox. > > > + */ > > > +static void pci_doe_destroy_mb(void *ptr) > > I don't get why uses "void *ptr" as the parameter of this function, > maybe I miss something. I guess we can use "struct pci_doe_mb *doe_mb" > as the parameter. It's a "void *ptr" argument so that pci_doe_destroy_mb() can serve as a callback for devm_add_action(). But as you've correctly noted, devm_add_action() is removed in a subsequent commit and then the argument is adjusted to "struct pci_doe_mb *doe_mb". Thanks, Lukas