Thread (34 messages) 34 messages, 7 authors, 2010-09-07

Re: [PATCH] drivers/net/pch_gbe: Cleanup stats use

From: Joe Perches <joe@perches.com>
Date: 2010-09-01 01:38:51
Also in: lkml

On Tue, 2010-08-31 at 18:33 -0700, Stephen Hemminger wrote:
On Tue, 31 Aug 2010 11:38:35 -0700
Joe Perches [off-list ref] wrote:
quoted
 struct pch_gbe_stats {
-	signed char stat_string[ETH_GSTRING_LEN];
-	int sizeof_stat;
-	int stat_offset;
+	signed char string[ETH_GSTRING_LEN];
+	size_t size;
+	size_t offset;
 };
Is this driver really using 'signed char' here?
Should just be 'char' for a simple string.
You're right.  Probably all the below should just be char.

$ grep -Pn "\bsigned\s+char\b" drivers/net/pch_gbe/*.[ch]
pch_gbe_ethtool.c:34:	signed char string[ETH_GSTRING_LEN];
pch_gbe_param.c:155:	signed char *name;
pch_gbe_param.c:156:	signed char *err;
pch_gbe_param.c:165:			struct pch_gbe_opt_list { int i; signed char *str; } *p;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help