Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1654621lqt; Wed, 20 Mar 2024 10:02:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYVDcj5g6C5ufu7H1v9dTHM+cJey44lzaOJnsMWt/AUWQ9Pj77qhn7eCQu4smvJo6CRlmKUkDbArjl/3H6UmwihMJb0NMVPhsEYQqSvQ== X-Google-Smtp-Source: AGHT+IFe31ESyoET6BSvq1q9FGsPVP0X+8aN9+HU52IzRP4YSqL3sG4/4GSq2bSJzrFMEIxZiPgR X-Received: by 2002:a05:6a20:6f96:b0:1a3:3cc3:b251 with SMTP id gv22-20020a056a206f9600b001a33cc3b251mr21360576pzb.26.1710954130823; Wed, 20 Mar 2024 10:02:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710954130; cv=pass; d=google.com; s=arc-20160816; b=YI9t8UzzU0gWqzYUHYDu+hqxGqkvTIj/Y4c8wDaxSCRHvV1g+GcPg5c5C+6rmDnnbY SmT8plPnPK7v23GvzDq0Ov4rx0m/UTxxpa0bHTTAeDPlNKcAeXX4pTIXTZy88bJ4oegB SL9FmW1wlHvyO7pTY/f8SdgOqZTvAdnKOzvPUKDH0IEGGKWy+K08KXUbUnPCqzDow3dS HIKoKowU9Lg1vAQcw3D7sMSA3hArm4ebMbxzu5B1d5Li8sc7M+OW2/wzjNNo4vRZDdfB LX0G/9clQRJKgQ4nqwpH8qq5zLAAObRPsu4K41SfuIT1PJM36taZoKwp9TxUmFyXkgbx V9mw== 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; bh=wEfzL/x+HvKfKexpvwPECfkK5QWCbVSUpN9Cn9FEYTo=; fh=WLyDOYUwt6VOCeCW+IJQOQbx4SK/OQ3J4mA1c3xpofs=; b=A3rwcDPQ9viMdr9DWLWI09cTD+VPMB62CqPEq5KKaIrjh3FfWknNYDVaCkDS3H52Xb P9/QtqD65an+YRwp29Rvkpdqnj+8ysGMNxXbzMxjjdVeCMMsr5XjdTvbjjau4MLAgzPy GeE7tvTbyRkPeUkEaTi2N/0CO2WRu1rPszU4ETzJznQwWsVZFiQgSunGTzBN7PWAOnha OyESWGDQDxm9sxJ9F5QYKsNP8QJNluV7XtwAu6pOMLYscZRaO56uE2355lktJmn974ck BFCRkWxBXZRTkvdeXzKsICz1rZV5NGyX2T1mBmsG5JdSGViSFafgMrpz7c3+1bA1XHk4 Zjeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-4991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4991-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ca17-20020a056a02069100b005dc89de5d21si11566223pgb.776.2024.03.20.10.02.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 10:02:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-4991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4991-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 56113B23341 for ; Wed, 20 Mar 2024 17:02:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AAA0169DEA; Wed, 20 Mar 2024 17:01:59 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F23E54EB47; Wed, 20 Mar 2024 17:01:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710954119; cv=none; b=QMwYa6O4OXXE5GRVR8fRrFm+p53exSwYOjo0CRzVnwp99ifW8ybyGM8rvrN04LXo69wcWjzlWv9ochARhAHAAEcFeIhFrBacRiDN8DWNK84l9F6Z3f3gl0lv5chlZsEsR3+XmSIeXd8FoB/VGAE0IEZoue8w/5XWP5VDkJd6xnI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710954119; c=relaxed/simple; bh=riDnAYASVcYCRvsE9up4IqXSn5APJJQ9Ae+rukBzFQo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EzZJMxwdBHtR/LCGHVRzqp6iIFDkES/UzS70C5uTWVimqWNZ2b4rqgKhjHtSYxp19Vn7qlzn+2pAWvw1uu3ou+71IZVrzI/Y0M9i+UgeikB9kTrfRRXV/yEncZcMBmI3pF7s1OKewmB//8E0FPV0zAlo7bUxuuaoP0elpRdBpKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-513d3746950so104578e87.1; Wed, 20 Mar 2024 10:01:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710954116; x=1711558916; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wEfzL/x+HvKfKexpvwPECfkK5QWCbVSUpN9Cn9FEYTo=; b=Yrvjc//77d6YrXWuejx0beLNRi0W4B6PLrQN/QHyTUZyDGyhDUwpCBT/ZLHHEhfKfy 4Qe0BMINwJW2pQK/hT3Bw6swCcYCbi8Bgw2VsYE8/8rX2z3X/XC/1hIlCCAcqNWSs0W8 43J/VMBWWraix0t50UsaUceYVkYVkpC9iwkpfcKiw8zK10PZ2kR2OOpCrWoXmVrpryf+ nIRPVR/xlu/s1eGFpqZodNiEOV6abwW3Qqz9M87n84a0XP+5JIZ8/EXmBtWVOrkqyTRq Z5bau67UinQGOyxaM7LGXYd4pWKhSmsJTiyWhXsK4wL2C9yr+BXcVXGVAY2LHOrhYXYS 40NA== X-Forwarded-Encrypted: i=1; AJvYcCUJi30MyommHEx0q14Afow9l7trEN08hSyat91gebUKA/bjbMBL8MjbOmWaC+TbRP5DXuTkYHkkc8h4Ux9MOEv+oraKGAapn0dqlpAmPcY7q6Z5sSrSDDs+mQaCfgbI1qVjsNsnVibPquDLVLk= X-Gm-Message-State: AOJu0Yx1UUqKP58G2AqYvtZ8cWjbKA0HIWfj/0t87RN08Xjadw/ge982 m4vyRrL/fSF50SAUaqHqLrXKD8uLoIMOm1fcZj4nExuZBnmqAGQb X-Received: by 2002:a05:6512:3fa:b0:513:cf4e:941b with SMTP id n26-20020a05651203fa00b00513cf4e941bmr1681905lfq.19.1710954115798; Wed, 20 Mar 2024 10:01:55 -0700 (PDT) Received: from gmail.com (fwdproxy-lla-001.fbsv.net. [2a03:2880:30ff:1::face:b00c]) by smtp.gmail.com with ESMTPSA id n18-20020a05640205d200b00568b6d731e1sm5798016edx.4.2024.03.20.10.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 10:01:55 -0700 (PDT) Date: Wed, 20 Mar 2024 10:01:53 -0700 From: Breno Leitao To: Kalle Valo Cc: Jeff Johnson , Jeff Johnson , kuba@kernel.org, keescook@chromium.org, "open list:NETWORKING DRIVERS (WIRELESS)" , "open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER" , open list Subject: Re: [PATCH] ath10k: allocate dummy net_device dynamically Message-ID: References: <20240319104754.2535294-1-leitao@debian.org> <9fcdb857-da62-4832-ae11-043fe993e4ad@quicinc.com> <87wmpwaprz.fsf@kernel.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: <87wmpwaprz.fsf@kernel.org> On Wed, Mar 20, 2024 at 05:25:52PM +0200, Kalle Valo wrote: > Jeff Johnson writes: > > > On 3/19/2024 3:47 AM, 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 ath10k by converting it > >> into a pointer. Then use the leverage alloc_netdev() to allocate the > >> net_device object at ath10k_core_create(). The free of the device occurs > >> at ath10k_core_destroy(). > >> > >> [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ > >> > >> Signed-off-by: Breno Leitao > > > > NAK this based upon the ath11k patch results. > > > > As suggested there we should just use kmalloc/kfree to match the existing logic. > > BTW if the patch is not tested on a real device then it's good to > document that in the commit message with "Compile tested only" or > similar. Good to know. Thanks. I will add it to the next patches.