Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp566060rdh; Wed, 7 Feb 2024 13:01:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVpKr0grNgmUx8fnLAc4fbXNmOC339aM9xX4WU8ByAm9YIx3KUXHB8SOdHvshl3RbQddbVCIJ2WGau3UWYtmMBL76gtNTAwj1I1gpqIRg== X-Google-Smtp-Source: AGHT+IEfxdJ6Xu92lEKrdhwNVh9kHpNHD8q+ud+YydXxAkuBshBbuEivqiVbHyFkSBJ9pAl+s9ID X-Received: by 2002:a05:620a:5681:b0:783:f890:8aac with SMTP id wg1-20020a05620a568100b00783f8908aacmr6506073qkn.24.1707339675048; Wed, 07 Feb 2024 13:01:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707339675; cv=pass; d=google.com; s=arc-20160816; b=fl2y1DNgkfHWhaGQYpk5Km8BdXJkcERLr8xYR2rstphjjOGabJxqqPcy0dTtGA7vyR AHJOEkxmmeFkXDDki+pP8YXT35rTaW3/UMI/GM1eP5jErtcZgpPYKBicKp/ZdeOXeD7h Gxq2lJPYkkTubo7fcHlSVdfdBQOE/q9WkJ+7e2/FISg68P0mvg0dBNOb7ULoE+UdkkP1 Fz7iNsM7ozOO1VyT666+/C1OKnsvNfUS9CeQdHUrp0fhqwRk5Jn1tLv1VQ+xIilFPvb/ Crzq50yUCvkuurEzzUcmB5iCF6v6vZcoY+nyRI06jZmzIINThf4JjpyQHraxdETh+PD8 24/Q== 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=gAxXvevnlaB4UDAW2SZx89LT/IdlHZYCYGVlnCNmOU8=; fh=Y9t3Vl3fn25BgwjAaFkdpdOvBFaM7sLbuvtdfnwU3mg=; b=lPz7AON1JYVbAva5YLiopKHOD+zuuo/bws6PL/QnvfgW47fbY4ZfjBNhU6iUjtgQAd 8tUHIsvDMRAt9ynNht4KJsVq2EURlwp72WEJL8u5KdvhCQe/0HZAqcf6vgoCR5zW/Q9K 3JnsaoAWJkYYZ01ofWk0XIz+gn0SGILe/61ykJUGClIyb3yfIgroeINvyB2+3evIgTYm FhxsW3g0nC0KrnLZLhJSlZAewqFnV8bUisy6w/FaKx1ud9831ElA+BUMmmAO009qDJ/l 0iHJqgFtG0tcXL9izUVQP+wD5hLBfKmB34u+J4j5UVPIlNhD451lEVD/l6gn1cE/fmmq YCwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=esx+Yz0c; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57053-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXISwldvwj4MZXr2AOJnzTQnNLzQjewSEqqR+1yUoWnjn0icv3aHw7bJ4z0dHGS46K93+oLUQotyorEkPAGRu70D7iZdtac9Mi04Vg09w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q1-20020a05620a038100b0078591341b79si1766431qkm.734.2024.02.07.13.01.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 13:01:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=esx+Yz0c; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-57053-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57053-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C60A61C21094 for ; Wed, 7 Feb 2024 21:01:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F406127B4E; Wed, 7 Feb 2024 21:01:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="esx+Yz0c" 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 9078585C58; Wed, 7 Feb 2024 21:01:03 +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=1707339663; cv=none; b=GRhviug1hvprdf43CnJm+128hX+sxboUTen4ge+cjd260P+xJGGkFpiatGyLc3Qer9fy4ZWImKd/cl65qJn+m4YQ2GJDpkRg2rlq8bvqlcogIxgqfrxr6nqVZpBdm/sHK+wbf7daUTGYDaXksNmTDFGhiVf2Pmz55XiKUJ/r92E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707339663; c=relaxed/simple; bh=OfD7wr9LWAP6WJGGaRebhD936Sr/G+hRcry7kQ+lhXw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h6bnBabYwhVPFhVgzaJWr4eQRrLgMyitbG6MJPbfaMMSJDw0oK/PQuxy4gu7IjwsF6Ww8qy0HXhrE2PDDk+j+M7MR8m8HkZnsFzDpWSIZpefFXJjw5kiCLYbgOi806zE3nxpHU+8yQj+MDsvvllFOSzbIQsdCocJRr1nlTWj8js= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=esx+Yz0c; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7005EC433C7; Wed, 7 Feb 2024 21:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707339663; bh=OfD7wr9LWAP6WJGGaRebhD936Sr/G+hRcry7kQ+lhXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=esx+Yz0cKI5KUPIQweG+DjlJwTRzWwX1gkgVfWTEtiYPGzZ3ZvpV4SXLevxbcAlM1 n9PI5UkRt2blaGRYDf2Tt9hiqOz8TYPHa0vf0WxDFcJV5dkePBse8PfQLmcTNWW2Mx P68JdsN6im8SYBjIbtxim12nJEgYf5o5foNzzcmP9kuzltZGYC/6CNpKocM9J5UTEH CbkUOuUzTUVu3A19XPhzZB7nLNiAT2Y7MHJQGQZnr7YO+QCo3l5XDH0oAgAC5QLbN+ mv8Z7z67WqM+5BAPPFyntBRN5GKzaKiDD4V/i4K0nOrHO81M2MW+eYUJXZ4C5akYdd W4Zphet/u6hSw== Date: Wed, 7 Feb 2024 20:59:26 +0000 From: Simon Horman To: Ratheesh Kannoth Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sgoutham@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, bcreeley@amd.com, sbhatta@marvell.com, gakula@marvell.com, hkelam@marvell.com, sumang@marvell.com Subject: Re: [PATCH net v4] octeontx2-af: Initialize maps. Message-ID: <20240207205926.GO1297511@kernel.org> References: <20240206024000.1070260-1-rkannoth@marvell.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: <20240206024000.1070260-1-rkannoth@marvell.com> On Tue, Feb 06, 2024 at 08:10:00AM +0530, Ratheesh Kannoth wrote: > kmalloc_array() without __GFP_ZERO flag does not initialize > memory to zero. This causes issues. Use kcalloc() for maps and > bitmap_zalloc() for bitmaps. > > Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") > Signed-off-by: Ratheesh Kannoth > Reviewed-by: Brett Creeley > --- > > ChangeLogs: > v3 -> v4: Used kcalloc() for normal maps > v2 -> v3: Used GFP_ZERO for normal map arrays > v1 -> v2: Used bitmap_zalloc() API. > v0 -> v1: Removed devm_kcalloc()._ Thanks for the updates. Reviewed-by: Simon Horman