linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Ratheesh Kannoth <rkannoth@marvell.com>
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 <sumang@marvell.com>
Subject: Re: [PATCH net] octeontx2-af: Initialize bitmap arrays.
Date: Tue, 23 Jan 2024 18:17:16 +0000	[thread overview]
Message-ID: <20240123181716.GP254773@kernel.org> (raw)
In-Reply-To: <20240123051245.3801246-1-rkannoth@marvell.com>

+ Suman Ghosh <sumang@marvell.com>

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 <rkannoth@marvell.com>

  reply	other threads:[~2024-01-23 18:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23  5:12 [PATCH net] octeontx2-af: Initialize bitmap arrays Ratheesh Kannoth
2024-01-23 18:17 ` Simon Horman [this message]
2024-01-24  3:01   ` [EXT] " Ratheesh Kannoth
2024-01-24 10:37     ` Simon Horman
2024-01-24 10:43       ` Ratheesh Kannoth
2024-01-24 21:15         ` Simon Horman
2024-01-25  5:03           ` Ratheesh Kannoth
2024-01-25  2:14 ` Brett Creeley
2024-01-25  5:06   ` [EXT] " Ratheesh Kannoth
2024-01-25 15:56     ` Brett Creeley
2024-01-26 21:01       ` Simon Horman
2024-01-29  5:24         ` Ratheesh Kannoth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240123181716.GP254773@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rkannoth@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sumang@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).