Commit 19c2a443 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: loopback: all read-only attributes are unsigned

The only values passed to the gb_loopback_ro_attr() macro are
unsigned 32-bit values.  So there's no need to pass a "type"
format specifier.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent b937aa9e
...@@ -78,14 +78,14 @@ module_param(kfifo_depth, uint, 0444); ...@@ -78,14 +78,14 @@ module_param(kfifo_depth, uint, 0444);
define_get_version(gb_loopback, LOOPBACK); define_get_version(gb_loopback, LOOPBACK);
/* interface sysfs attributes */ /* interface sysfs attributes */
#define gb_loopback_ro_attr(field, type) \ #define gb_loopback_ro_attr(field) \
static ssize_t field##_show(struct device *dev, \ static ssize_t field##_show(struct device *dev, \
struct device_attribute *attr, \ struct device_attribute *attr, \
char *buf) \ char *buf) \
{ \ { \
struct gb_connection *connection = to_gb_connection(dev); \ struct gb_connection *connection = to_gb_connection(dev); \
struct gb_loopback *gb = connection->private; \ struct gb_loopback *gb = connection->private; \
return sprintf(buf, "%"#type"\n", gb->field); \ return sprintf(buf, "%u\n", gb->field); \
} \ } \
static DEVICE_ATTR_RO(field) static DEVICE_ATTR_RO(field)
...@@ -171,9 +171,9 @@ gb_loopback_stats_attrs(requests_per_second); ...@@ -171,9 +171,9 @@ gb_loopback_stats_attrs(requests_per_second);
/* Quantity of data sent and received on this cport */ /* Quantity of data sent and received on this cport */
gb_loopback_stats_attrs(throughput); gb_loopback_stats_attrs(throughput);
/* Number of errors encountered during loop */ /* Number of errors encountered during loop */
gb_loopback_ro_attr(error, u); gb_loopback_ro_attr(error);
/* The current index of the for (i = 0; i < iteration_max; i++) loop */ /* The current index of the for (i = 0; i < iteration_max; i++) loop */
gb_loopback_ro_attr(iteration_count, u); gb_loopback_ro_attr(iteration_count);
/* /*
* Type of loopback message to send based on protocol type definitions * Type of loopback message to send based on protocol type definitions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment