Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp662325rdb; Tue, 23 Jan 2024 10:41:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHisJvLvJzNEM0IQ0kNDMHgOp39y+IQwuV09qA7D1WhtSz6QjeajAOGO+Et5n516kkVC410 X-Received: by 2002:a17:902:b681:b0:1d3:dc24:351 with SMTP id c1-20020a170902b68100b001d3dc240351mr3501768pls.84.1706035276192; Tue, 23 Jan 2024 10:41:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706035276; cv=pass; d=google.com; s=arc-20160816; b=eXQxIgR7+e2zElo++4iz6QChSd5rogW21Pm11UXCyOOKsqDj9BpQzFy3EMGVjM3BWq fkHbkwgwZd/KbPDDVDEL9DUbqcIOAED1pdT1L4zLWBDN6J7GnfEjt2Uz6Inkx4OFwQ5Z ZzWmrC/YporVQgdSC0yRolHpq3ZKCqwWNsGjLR73gcR4DuBjw6aAcJZQeHGNlplRoo6T HDsqtOEkeDhxQFlYMJ5i3hqRXQGh+e3tqZSBayDZNMGeR2q0n4mz/BPXncTTFrEo97cl RGQKYKEe8NdINpGZ11Zbhpv2CLJ6H9TI85zoKLyICyV3QfXmMeXaKWiyugZ7GojNYRuh 9GMA== 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=unKlMqWhOrc7oLSBAs+sTo6HWltBQeZv/oWa9STjUl8=; fh=rF3skZtN4VhnkcFVH3JZw8jhw12x/+hO7HXyzVMpZRw=; b=Oc72F8lay8Xod7yAl0UsMZ5sxBr4BKyRDvmIhEgbh1tv+yJTZCBaDu9vYSi+gp1yqc X90p9J5G/BN2E20UEsU14ogoHpQtzZi4Os7ywTMOjTI5nMgvSQLY+UVQPgvXgsbhj5l3 VvnaXQwx+/UgHZPdtp0JG7clULUJoi3atzIRMfvlZSW/HPFN5FfQv5ZC37Swc86JBPrR 5J9O1aXlTDZG1q5wYXEgeBgndRjyrOQugN36Qnhhvfqem/OmoWofkoKiH8KovOjU0S5x IhMdoRfZ+XeAWOxooIDs11sEvWnt+VB7M60bS23/iJ3KtXGwu0hRrWRkfv0Mq/05G5IJ olMQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eHCNMsCD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35857-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35857-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p23-20020a170902b09700b001d76ae4c930si1905235plr.110.2024.01.23.10.41.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 10:41:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35857-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eHCNMsCD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35857-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35857-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id F047EB22FEA for ; Tue, 23 Jan 2024 18:17:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C630823A5; Tue, 23 Jan 2024 18:17:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eHCNMsCD" 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 680B081211; Tue, 23 Jan 2024 18:17:21 +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=1706033841; cv=none; b=Dgzah6ZN1LieJ5cOpfruz0gPgAvmRVbxcuXyaXaasRNvzeUbuocBUFQ+SZ6TfIJclWP8WBS+lpD4R4LF5IXIUTnFU5vGzjkn6UDbdOCsi4XAY7Ch1AFGjpFyPG6kV51Jrhp81iZXwbxLCw9LJPBqYQgWXiq3b44nET1UUuegXkk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706033841; c=relaxed/simple; bh=unKlMqWhOrc7oLSBAs+sTo6HWltBQeZv/oWa9STjUl8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KkzIo91wbb+BXZqbdc9H6IchCleKOcmya9ETEbDyPUZlKw3o88jR4o/7ThQzFUhwMHPzul1cNVr1pTNNSRW7PiV0DApVpHXohnpXGIKEnaVxfx6kZGBfRZozlIdS1QNgp90mtsPEcRVR098pS7ZlVXETYIsFJi/Y8mKQWPP5yFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eHCNMsCD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64873C43390; Tue, 23 Jan 2024 18:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706033840; bh=unKlMqWhOrc7oLSBAs+sTo6HWltBQeZv/oWa9STjUl8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eHCNMsCDZNKDnH/rK96JBMsA5RQBzAlm2qY0mje8iutGUR5H/S3eVCtCYALf3Pq90 XDqgSnjq6EiI+ZRHMbeSHeoEIniwqyuMdv9gv2YwcfbJxtbBvuVA0BidFogIG61Q2n xfzAaOhR0Z5Xg0t5VqE1WpulNSCUADhjUXfi6J8NixO5Sc8o3AGqU/8KM8Z0wRfdNi 9inUgqDO8x7RfjwCBbqQB2b7xvffyt4uOQm/5a037yohMFA6mBspf8TdIr3jFoFouW C6Og2hJWdIvaeP7eaS1Y/X8dY9ZFRNCEihPyI1V5Fy5nkEWMc85JEZZ7y6AruQtZ5K D+KihjKdDOwew== Date: Tue, 23 Jan 2024 18:17:16 +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, sbhatta@marvell.com, gakula@marvell.com, hkelam@marvell.com, Suman Ghosh Subject: Re: [PATCH net] octeontx2-af: Initialize bitmap arrays. Message-ID: <20240123181716.GP254773@kernel.org> References: <20240123051245.3801246-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: <20240123051245.3801246-1-rkannoth@marvell.com> + Suman Ghosh On Tue, Jan 23, 2024 at 10:42:45AM +0530, Ratheesh Kannoth wrote: > kmalloc_array() does not initializes memory to zero. > This causes issues with bitmap. Use devm_kcalloc() > to fix the issue. Hi Ratheesh, I assume that the reason that the cited commit moved away from devm_ allocations was to allow more natural management of the resources independently of the life cycle of the driver instance. Or in other words, the need to free the bitmaps in npc_mcam_rsrcs_deinit() probably indicates that devm_ allocations of them aren't giving us anything. So, perhaps kcalloc() is more appropriate than devm_kcalloc() ? > Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") > Signed-off-by: Ratheesh Kannoth