aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-11-16 14:22:10 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:10 -0500
commit3e5192eec8faf1df77514d2a593d14cc851a6b43 (patch)
treeaa88dd86d4bca2e9292c71dddbc38325763c4d46
parent23561c944781f2c888b12b5109da676187620805 (diff)
cxgb3 - sysfs methods clean up
Remove unused argument in sysfs methods Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 1b9a711beb85..b4ee18bf35f4 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -410,8 +410,7 @@ static int setup_sge_qsets(struct adapter *adap)
410 return 0; 410 return 0;
411} 411}
412 412
413static ssize_t attr_show(struct device *d, struct device_attribute *attr, 413static ssize_t attr_show(struct device *d, char *buf,
414 char *buf,
415 ssize_t(*format) (struct net_device *, char *)) 414 ssize_t(*format) (struct net_device *, char *))
416{ 415{
417 ssize_t len; 416 ssize_t len;
@@ -423,7 +422,7 @@ static ssize_t attr_show(struct device *d, struct device_attribute *attr,
423 return len; 422 return len;
424} 423}
425 424
426static ssize_t attr_store(struct device *d, struct device_attribute *attr, 425static ssize_t attr_store(struct device *d,
427 const char *buf, size_t len, 426 const char *buf, size_t len,
428 ssize_t(*set) (struct net_device *, unsigned int), 427 ssize_t(*set) (struct net_device *, unsigned int),
429 unsigned int min_val, unsigned int max_val) 428 unsigned int min_val, unsigned int max_val)
@@ -457,7 +456,7 @@ static ssize_t format_##name(struct net_device *dev, char *buf) \
457static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ 456static ssize_t show_##name(struct device *d, struct device_attribute *attr, \
458 char *buf) \ 457 char *buf) \
459{ \ 458{ \
460 return attr_show(d, attr, buf, format_##name); \ 459 return attr_show(d, buf, format_##name); \
461} 460}
462 461
463static ssize_t set_nfilters(struct net_device *dev, unsigned int val) 462static ssize_t set_nfilters(struct net_device *dev, unsigned int val)
@@ -480,7 +479,7 @@ static ssize_t set_nfilters(struct net_device *dev, unsigned int val)
480static ssize_t store_nfilters(struct device *d, struct device_attribute *attr, 479static ssize_t store_nfilters(struct device *d, struct device_attribute *attr,
481 const char *buf, size_t len) 480 const char *buf, size_t len)
482{ 481{
483 return attr_store(d, attr, buf, len, set_nfilters, 0, ~0); 482 return attr_store(d, buf, len, set_nfilters, 0, ~0);
484} 483}
485 484
486static ssize_t set_nservers(struct net_device *dev, unsigned int val) 485static ssize_t set_nservers(struct net_device *dev, unsigned int val)
@@ -500,7 +499,7 @@ static ssize_t set_nservers(struct net_device *dev, unsigned int val)
500static ssize_t store_nservers(struct device *d, struct device_attribute *attr, 499static ssize_t store_nservers(struct device *d, struct device_attribute *attr,
501 const char *buf, size_t len) 500 const char *buf, size_t len)
502{ 501{
503 return attr_store(d, attr, buf, len, set_nservers, 0, ~0); 502 return attr_store(d, buf, len, set_nservers, 0, ~0);
504} 503}
505 504
506#define CXGB3_ATTR_R(name, val_expr) \ 505#define CXGB3_ATTR_R(name, val_expr) \
@@ -524,7 +523,7 @@ static struct attribute *cxgb3_attrs[] = {
524 523
525static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs }; 524static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs };
526 525
527static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr, 526static ssize_t tm_attr_show(struct device *d,
528 char *buf, int sched) 527 char *buf, int sched)
529{ 528{
530 struct port_info *pi = netdev_priv(to_net_dev(d)); 529 struct port_info *pi = netdev_priv(to_net_dev(d));
@@ -550,7 +549,7 @@ static ssize_t tm_attr_show(struct device *d, struct device_attribute *attr,
550 return len; 549 return len;
551} 550}
552 551
553static ssize_t tm_attr_store(struct device *d, struct device_attribute *attr, 552static ssize_t tm_attr_store(struct device *d,
554 const char *buf, size_t len, int sched) 553 const char *buf, size_t len, int sched)
555{ 554{
556 struct port_info *pi = netdev_priv(to_net_dev(d)); 555 struct port_info *pi = netdev_priv(to_net_dev(d));
@@ -578,12 +577,12 @@ static ssize_t tm_attr_store(struct device *d, struct device_attribute *attr,
578static ssize_t show_##name(struct device *d, struct device_attribute *attr, \ 577static ssize_t show_##name(struct device *d, struct device_attribute *attr, \
579 char *buf) \ 578 char *buf) \
580{ \ 579{ \
581 return tm_attr_show(d, attr, buf, sched); \ 580 return tm_attr_show(d, buf, sched); \
582} \ 581} \
583static ssize_t store_##name(struct device *d, struct device_attribute *attr, \ 582static ssize_t store_##name(struct device *d, struct device_attribute *attr, \
584 const char *buf, size_t len) \ 583 const char *buf, size_t len) \
585{ \ 584{ \
586 return tm_attr_store(d, attr, buf, len, sched); \ 585 return tm_attr_store(d, buf, len, sched); \
587} \ 586} \
588static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_##name, store_##name) 587static DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show_##name, store_##name)
589 588