linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net: bna: use correct type specifier (2)
@ 2016-07-31  9:01 Heinrich Schuchardt
  2016-08-01 20:44 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31  9:01 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: netdev, linux-kernel, Heinrich Schuchardt

add and val are read with
sscanf(kern_buf, "%x:%x", &addr, &val);
and used as arguments for bna_reg_offset_check and writel
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 cfcb00c..05c1c1d 100644
--- a/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
+++ b/drivers/net/ethernet/brocade/bna/bnad_debugfs.c
@@ -373,7 +373,8 @@ bnad_debugfs_write_regwr(struct file *file, const char __user *buf,
 	struct bnad_debug_info *debug = file->private_data;
 	struct bnad *bnad = (struct bnad *)debug->i_private;
 	struct bfa_ioc *ioc = &bnad->bna.ioceth.ioc;
-	int addr, val, rc;
+	int rc;
+	u32 addr, val;
 	void __iomem *reg_addr;
 	unsigned long flags;
 	void *kern_buf;
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] net: bna: use correct type specifier (2)
  2016-07-31  9:01 [PATCH 1/1] net: bna: use correct type specifier (2) Heinrich Schuchardt
@ 2016-08-01 20:44 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-01 20:44 UTC (permalink / raw)
  To: xypron.glpk; +Cc: rasesh.mody, netdev, linux-kernel

From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 11:01:20 +0200

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

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-01 20:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31  9:01 [PATCH 1/1] net: bna: use correct type specifier (2) Heinrich Schuchardt
2016-08-01 20:44 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).