lkml.org 
[lkml]   [2006]   [Mar]   [9]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 8 of 20] ipath - sysfs support for core driver
FromRoland Dreier <>
DateThu, 09 Mar 2006 15:18:49 -0800
 > +static ssize_t show_version(struct device_driver *dev, char *buf)
 > +{
 > +	return scnprintf(buf, PAGE_SIZE, "%s", ipath_core_version);
 > +}

Any reason you left a "\n" off of this attribute?

 > +static ssize_t show_atomic_stats(struct device_driver *dev, char *buf)
 > +{
 > +	memcpy(buf, &ipath_stats, sizeof(ipath_stats));
 > +
 > +	return sizeof(ipath_stats);
 > +}

I think putting a whole binary struct in a sysfs attribute is
considered a no-no.

 > +static ssize_t show_boardversion(struct device *dev,
 > +			       struct device_attribute *attr,
 > +			       char *buf)
 > +{
 > +	struct ipath_devdata *dd = dev_get_drvdata(dev);
 > +	return scnprintf(buf, PAGE_SIZE, "%s", dd->ipath_boardversion);
 > +}

Another missing "\n"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-09 23:21    [from the cache]
©2003-2008