Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452791 > unrolled thread

[PATCH 1/1] net: bna: use correct type specifications

Started byHeinrich Schuchardt <xypron.glpk@gmx.de>
First post2016-07-31 11:00 +0200
Last post2016-08-01 22:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] net: bna: use correct type specifications Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 11:00 +0200
    Re: [PATCH 1/1] net: bna: use correct type specifications David Miller <davem@davemloft.net> - 2016-08-01 22:50 +0200

#1452791 — [PATCH 1/1] net: bna: use correct type specifications

FromHeinrich Schuchardt <xypron.glpk@gmx.de>
Date2016-07-31 11:00 +0200
Subject[PATCH 1/1] net: bna: use correct type specifications
Message-ID<s0ULf-6fw-3@gated-at.bofh.it>
addr and len are read with
sscanf(kern_buf, "%x:%x", &addr, &len);
and used as arguments for
bna_reg_offset_check.

So they have to be unsigned.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
index 8fc246e..cfcb00c 100644
--- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
+++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
@@ -312,7 +312,8 @@ bnad_debugfs_write_regrd(struct file *file, const char __user *buf,
 	struct bnad_debug_info *regrd_debug = file->private_data;
 	struct bnad *bnad = (struct bnad *)regrd_debug->i_private;
 	struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
-	int addr, len, rc, i;
+	int rc, i;
+	u32 addr, len;
 	u32 *regbuf;
 	void __iomem *rb, *reg_addr;
 	unsigned long flags;
-- 
2.8.1

[toc] | [next] | [standalone]


#1453462

FromDavid Miller <davem@davemloft.net>
Date2016-08-01 22:50 +0200
Message-ID<s1sjU-2WL-27@gated-at.bofh.it>
In reply to#1452791
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 10:53:14 +0200

> addr and len are read with
> sscanf(kern_buf, "%x:%x", &addr, &len);
> and used as arguments for
> bna_reg_offset_check.
> 
> So they have to be unsigned.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web