[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221118174824.513e15d8@kernel.org>
Date: Fri, 18 Nov 2022 17:48:24 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: netdev@...r.kernel.org, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 5/8] devlink: refactor
region_read_snapshot_fill to use a callback function
On Thu, 17 Nov 2022 14:08:00 -0800 Jacob Keller wrote:
> + /* Allocate and re-use a single buffer */
> + data = kzalloc(DEVLINK_REGION_READ_CHUNK_SIZE, GFP_KERNEL);
> + if (!data)
> + return -ENOMEM;
Why zalloc? If we expect drivers may underfill we should let them
return actual length.
Powered by blists - more mailing lists