Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp565673lqo; Wed, 8 May 2024 08:12:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNqA552gbHgtRv1IAJRUMrAHedPqZ8L66wo3YhHmJ6wzjeCSGQhMNxoANaF7JKOSKc+wXXHC92jysIpWT87A33arcmmug+nacn7Exq8Q== X-Google-Smtp-Source: AGHT+IE68b5oU+aXd/Q/TePoB1LILXJF4WqtcI6Mxu/WpUQBWq+0wrK6sJmZ897VjUSOZ/pZyXqn X-Received: by 2002:a05:6a20:6f03:b0:1af:a472:9596 with SMTP id adf61e73a8af0-1afc8d96d69mr3357213637.38.1715181152299; Wed, 08 May 2024 08:12:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715181152; cv=pass; d=google.com; s=arc-20160816; b=yBHBH5GpO73MdeHewl04xtBwinlqc/k0kre70e9VGgFowCXJaN7ISkY6y3kHQv/KfP McfMHq4shzEk2C2FRJKA20t/H/yn15CzKezgy+yk4mu9an3BM5+c3hqG23T1Ql0j9ZoJ /77tSV0ULX8oQzE6UXh5H3OK00pD+dzzDnIyXpJffRZ67sA0mkQNkrxP/QCx/cJNolNP FArS1w8FiE10vIxpguo5fz2FqsA/YqXI8nwjIs9C8dgmBKxESj6COOMz/oRRxTE2bqPK YTx7zE0JlLHh9xBu7wPvadE4yZjNwRRVe309BVtbHeOv8tA7gD57PIVrPgRBNbnnvoKI sPjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Aq4wnW0UkvLT8skf34Tyw1i//9g3vjp4GrRh900Yz7c=; fh=T672zN7BiRUFVHJNJNOVUNWoZtvMsSbU61GZjIFlmoE=; b=B6cp1AtP7tpjdvJ4Eam3JVDWThEcHP5npJsO9rS6y6cOLhzS0fS0b8LS43xiU6t/gr d6cNfWPOaIVm57Eku/ObQfM0iYNVot3KrZ85T2b4MZeiifEL7I8x1k5zpvPpryYdyuqk zZyqieHeS028vtnP99hXJ/uVPB887WqVkq0/IZIlYWjS+ZH/cAf1m9XAhQECYoJGycyI Moa77FWmSmZv90w8ul3S4y3Wo1ECLhexOipxwDn8pay3dST+bQAy8oGRb0w9MgpSZ4fA 5BtiVUjPhlQzc+yRw4bagNVZ7ro40ET/OFP3bK9KqVjXfBY6npuPLOsOoJ2iNzBKZIL7 aQzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TyK/6sxK"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-7343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q11-20020a63e20b000000b0061a13c6902bsi12687655pgh.446.2024.05.08.08.12.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TyK/6sxK"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-7343-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B72A281A52 for ; Wed, 8 May 2024 15:12:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87486126F1F; Wed, 8 May 2024 15:11:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TyK/6sxK" X-Original-To: linux-wireless@vger.kernel.org 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 5C4DC126F07; Wed, 8 May 2024 15:11:49 +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=1715181110; cv=none; b=KawXHMuz+VSDjzOaW1IXj5mZi6j2xDsYx+S7Jjjfq270lur4v2vUa4x+XMU4GMGF0E+QjYfLM90xHqEmBzCBuN9Xwi3R7tJM2Eu+B8bmZc4J8S7fEc9qGmPIw+yHm9629vinwrtk8HY3d617Ee1D1L1htiVwDMudxJqFduykfmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715181110; c=relaxed/simple; bh=vikwuTwMkABdES9wzg7+bp3LS1APlhsRz9rgvZ9XVt0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N5CBshEVq3CumAhlIf0uMstKNq21Rck2JeP241tQbfEm/M32AwG0lOD5UZrq1YI/Z/65bhtqu2IMMBH+6iu1dVMU3DDdOnoR3yuW9H1ihDF9ewwhQ4x2HMCv1vdQriEtEXUblr2wirEJmohsdmcA1QLL2j9xZgY15mG0PZPp80w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TyK/6sxK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55DA4C2BD10; Wed, 8 May 2024 15:11:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715181109; bh=vikwuTwMkABdES9wzg7+bp3LS1APlhsRz9rgvZ9XVt0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TyK/6sxK5ZGUQqv0U91OuTojVQ4jqgAwXQLfi20bKBNBNBnsfqp7sU2GT1PTQFU0o 0OgCBSGbvRfZkT6KcIJdWyDdxWM9eJxmTuN6Tz9JeK4YHnc/e7Z6mQ9i5ll5uMxtCr W1XM0f6tchzFPrnxAJQzx4qG5fovQD2PhGsqzKWB/c5ZnuMJ6MbordKrRQglmJSnAb 3VvqZ+Pq7fJ3uuVsY+mN+kdKyytNNtbZnpj/H/NI6Xji6mMaxdtUJb/Dl5bsLEUS0u 3j0kbZRrTUBpVIxhMzmyvS7hj5j1EnB11y8gJRjTKvyClwHr2xm9QkfcFd3DENaeWt kuGHSQt6WLuWQ== Date: Wed, 8 May 2024 16:11:45 +0100 From: Simon Horman To: Breno Leitao Cc: Kalle Valo , Jeff Johnson , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH wireless-next v2] wifi: ath12k: allocate dummy net_device dynamically Message-ID: <20240508151145.GG1736038@kernel.org> References: <20240508095410.1923198-1-leitao@debian.org> Precedence: bulk X-Mailing-List: linux-wireless@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: <20240508095410.1923198-1-leitao@debian.org> On Wed, May 08, 2024 at 02:54:09AM -0700, Breno Leitao wrote: > Embedding net_device into structures prohibits the usage of flexible > arrays in the net_device structure. For more details, see the discussion > at [1]. > > Un-embed the net_device from struct ath12k_ext_irq_grp by converting it > into a pointer. Then use the leverage alloc_netdev_dummy() to allocate > the net_device object at ath12k_pci_ext_irq_config(). > > The free of the device occurs at ath12k_pci_free_ext_irq(). > > [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ > > Signed-off-by: Breno Leitao > --- > Changelog: > v2: > * Free all the allocated dummy devices if one of them fails to > be allocated (in ath12k_pci_ext_irq_config()), as > pointed by by Simon Horman. Thanks for the update. Reviewed-by: Simon Horman