[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1400544507.2389.6.camel@jtkirshe-mobl>
Date: Mon, 19 May 2014 17:08:27 -0700
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: Toralf Förster <toralf.foerster@....de>
Cc: shannon.nelson@...el.com, jesse.brandeburg@...el.com,
e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [E1000-devel] [PATCH] fix format mismatch in
drivers/net/ethernet/intel/i40e/i40e_debugfs.c
On Mon, 2014-05-19 at 14:04 +0200, Toralf Förster wrote:
> spotted by cppcheck
>
> Signed-off-by: Toralf Förster <toralf.foerster@....de>
> ---
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I will add your patch to my queue and will hold off on making my
suggested change below until Shannon and Jesse have had time to review
your patch.
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> index 3c37386..1bc35a2 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
> @@ -1239,7 +1239,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
> } else if (strncmp(cmd_buf, "add pvid", 8) == 0) {
> i40e_status ret;
> u16 vid;
> - int v;
> + unsigned int v;
Maybe u16 instead...
>
> cnt = sscanf(&cmd_buf[8], "%i %u", &vsi_seid, &v);
> if (cnt != 2) {
> @@ -1255,7 +1255,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
> goto command_write_done;
> }
>
> - vid = (unsigned)v;
> + vid = v;
> ret = i40e_vsi_add_pvid(vsi, vid);
> if (!ret)
> dev_info(&pf->pdev->dev,
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists