From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 391987080D for ; Fri, 13 Mar 2026 20:31:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773433912; cv=none; b=TJNSBPwl+wavPL9E+fz9ZkojahIgY7ecri3taKdq5+6k3UdhHmOPXAwV0ECvQR+0j3tgNf+ieai0CJ6R8M7TYdky5Z7q7cjpEEKh5E+02dvx+oeY3WUjAHARqb/SduBy3CMeED30RgjE2qfMgvUVMjI6Uujkwlo8RjwvEsf6lRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773433912; c=relaxed/simple; bh=3nZ6M+FEfD8PlgZEwLClh8SYtEq7DwgwR9EVMrJ6e8E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FqNeHVu7lIUP2AOjvfKl/keKtVOGIIiupjpiAMjBHQCMNBbiAcRD0vIbn9KahlA2Pmatu72w0lp5DzoSzsctHauMxQT08sFasOIW0fT/WZoQqAsyNvgNqOCd/Vx9Uc63pURvT0Lenvdw7GD6Er/kEx7XTGClAOFzyz7CXGgAYuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to; spf=none smtp.mailfrom=dama.to; dkim=pass (2048-bit key) header.d=dama-to.20230601.gappssmtp.com header.i=@dama-to.20230601.gappssmtp.com header.b=nO8a2CeD; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=dama.to Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dama-to.20230601.gappssmtp.com header.i=@dama-to.20230601.gappssmtp.com header.b="nO8a2CeD" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-3590042fa8eso1737509a91.1 for ; Fri, 13 Mar 2026 13:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dama-to.20230601.gappssmtp.com; s=20230601; t=1773433910; x=1774038710; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=BRHJyuMSqu8nwmLN9Y4FORoeONmtNATza0VZdK2MFcA=; b=nO8a2CeDtb4DkiMGvGkPOw6I2dXrupmqCpzRVijONll7qV6xaZ7eG8FuDEP0texX1o p+P1KoXrBbyonv1A9+P7DegaeLsIFXyZpEA5jEe9RQJjqsEidiWWeQtQcAZCV8LGkfSJ kgQYd/+Q11GK9h8hfCUlbTCODjvrK2NTN7D61hM+ELTnAvOKT7JLZo63g61La7x0kWsP 3VhJ4S3PfPmmMJ0Wn+EIuOXflVXg27NyH13oyfBN0FofShL89yBeibFEIJ27GvHDND4J 21VyPAC7S9AqrQrYmFAhZ2SvupzkQOGvTnjP279EVA8qZetf2+FdAwc8Fwvmsduq7EgH +bcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773433910; x=1774038710; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BRHJyuMSqu8nwmLN9Y4FORoeONmtNATza0VZdK2MFcA=; b=KspSVZTfJEc9Res0A1mNoxG89Jqru1Bj5e1i+5ngCyUa1ZqE6rz7h5nf0YUPPjGZFE w5evzWSYle631ePdVd4msgmeI0E6XcRUm+SFL9dpVKaZuxb4P6hiDpIUdgL7VqD8gW2Z GMdfLv6b72//wchtq47vxk3yvxDDqqK5jU8G3kYwQtwznQu44lHUXIBVF+AD72KcQEm2 jpdjKfECPp+wc3kLPSHFQAIMDB7ZcZu6Nn6ZBCan7gbg0buG3zrZaWGC2YXwrKQXIcwa dxeqpALa2r9V0aOH3QCvr1MT3Dw5Fkxngzptd9HjqNvRPvt/IvWZVOJTWOSRQlcF81dT 0XNQ== X-Forwarded-Encrypted: i=1; AJvYcCXvtTca6Cb/XXDFwMFbWHDSVi4eUTg10tVuOsWwqKnSwtRnJVxuWLGSZZ68MThrl5+PL+wxU6cL8j3Hy6I=@vger.kernel.org X-Gm-Message-State: AOJu0YztzTrIVoWNQEofiBSwT2Nacaqal/TT+0TYVuWs+d/BJLMk0L7V 0v9Y+2n0sxHVT8rqU1UeIt1Bo/LfYOupvanTkCWO7sFvRGnEsp3biynp8Gh0uRUwLpo= X-Gm-Gg: ATEYQzzLkYRBn+On12yAbGkNjDcf/HFdb+Ur+fDYyHHbU3mqLjRK6qPaGHrXs0/QfTP OxUUxux+g0QizoI0w/RRdV69kwXl5Kx/UxDEPpWNnuEBKwX9RewMcYdRmuOiVSwN1Wb2BKShGhR nlkOGpEiP7hemHsqvLjzhS5FFtZUcfMDYzZHGqPn96Qmm8kiu04XAfaudvbGz4/s6Z/DycHMkHT uYzO5u3+zrSNrQwFXCReVEn81FX0SWdN5VvpVAKH1n5xHNY32YfjsF6IkJyekfuYcjD67pDSr98 p+P+QVKTeYmxUZJHwe7+QU1nEyBnCIDfIvy00OmodXtdQYr81OP+vjzgozKVWftVpEwR3a8qDFf ZZ78Unh9zXp0GWQPnT0oUKiZVVxbppecR6aEbk/yFnFLNMWJaidgwV5EYhz46CFPxKI+pZL2Yqe JuwUMjTP4aqh4= X-Received: by 2002:a17:90b:4ace:b0:359:9bad:13d9 with SMTP id 98e67ed59e1d1-35a21eb1b9dmr4226225a91.15.1773433910565; Fri, 13 Mar 2026 13:31:50 -0700 (PDT) Received: from localhost ([2a03:2880:2ff::]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35a0bc58b44sm7670770a91.3.2026.03.13.13.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 13:31:50 -0700 (PDT) Date: Fri, 13 Mar 2026 13:31:49 -0700 From: Joe Damato To: Rosen Penev Cc: netdev@vger.kernel.org, Sunil Goutham , Linu Cherian , Geetha sowjanya , hariprasad , Subbaraya Sundeep , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , open list Subject: Re: [PATCH net-next] octeontx2-af: CGX: use kzalloc_flex for name Message-ID: Mail-Followup-To: Joe Damato , Rosen Penev , netdev@vger.kernel.org, Sunil Goutham , Linu Cherian , Geetha sowjanya , hariprasad , Subbaraya Sundeep , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , open list References: <20260313003240.123975-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260313003240.123975-1-rosenp@gmail.com> On Thu, Mar 12, 2026 at 05:32:40PM -0700, Rosen Penev wrote: > Don't bother allocating separately. There's no good reason to do so for > a small string like this. > > Remove name kfrees as a result. > > Signed-off-by: Rosen Penev > --- > drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 13 +++---------- > .../net/ethernet/marvell/octeontx2/af/lmac_common.h | 2 +- > 2 files changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > index 4f33a816bc7a..0750fb696c90 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > @@ -1725,14 +1725,10 @@ static int cgx_lmac_init(struct cgx *cgx) > cgx->lmac_count = cgx->max_lmac_per_mac; > > for (i = 0; i < cgx->lmac_count; i++) { > - lmac = kzalloc_obj(struct lmac); > + lmac = kzalloc_flex(struct lmac, name, sizeof("cgx_fwi_xxx_yyy")); Seems fine overall, I guess a minor nit is that I thought the typical style of kzalloc_flex usage would be kzalloc_flex(*lmac, .... idk if it's really worth a respin just for that, so: Reviewed-by: Joe Damato