[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <953B660C027164448AE903364AC447D2485F57EE@MTLDAG02.mtl.com>
Date: Thu, 15 Dec 2011 09:05:46 +0000
From: Yevgeny Petrilin <yevgenyp@...lanox.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: mlx4: smatch stuff: saving error codes in u8
> Hi Yevgeny,
>
> Smatch complains about some recent changes to the mlx4 driver:
> drivers/net/ethernet/mellanox/mlx4/cmd.c +364 mlx4_slave_cmd(27)
> warn: assigning -22 to unsigned variable 'vhcr->status'
>
> We should be using the mlx4_status_to_errno() function here to
> translate
> the hardware error codes to linux error codes.
>
> Also "ret" here gets passed to the the callers who again save it to
> vhcr_cmd->status = __mlx4_cmd() in mlx4_master_process_vhcr(). The
> __mlx4_cmd() function only returns linux error codes, not hardware
> error
> codes.
>
> Also the mlx4_master_process_vhcr() function sets vhcr_cmd->status to
> linux error codes (which is a mistake) but it doesn't set "ret" on all
> paths so it sometimes returns success even though an error occured
> (which is a second separate mistake).
>
Thanks Dan,
Will send fixes to this ASAP.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists