Re: [PATCH 3/5] 9p: virtio: make sure 'offs' is initialized in zc_request

From: Simon Horman
Date: Tue May 02 2023 - 11:27:57 EST


On Thu, Apr 27, 2023 at 08:23:36PM +0900, Dominique Martinet wrote:
> Similarly to the previous patch: offs can be used in handle_rerrors
> without initializing on small payloads; in this case handle_rerrors will
> not use it because of the size check, but it doesn't hurt to make sure
> it is zero to please scan-build.
>
> This fixes the following warning:
> net/9p/trans_virtio.c:539:3: warning: 3rd function call argument is an uninitialized value [core.CallAndMessage]
> handle_rerror(req, in_hdr_len, offs, in_pages);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>

Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>