Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbWCIXTA (ORCPT ); Thu, 9 Mar 2006 18:19:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751965AbWCIXTA (ORCPT ); Thu, 9 Mar 2006 18:19:00 -0500 Received: from test-iport-1.cisco.com ([171.71.176.117]:38691 "EHLO test-iport-1.cisco.com") by vger.kernel.org with ESMTP id S1751959AbWCIXS7 (ORCPT ); Thu, 9 Mar 2006 18:18:59 -0500 To: "Bryan O'Sullivan" Cc: rolandd@cisco.com, gregkh@suse.de, akpm@osdl.org, davem@davemloft.net, linux-kernel@vger.kernel.org, openib-general@openib.org Subject: Re: [PATCH 8 of 20] ipath - sysfs support for core driver X-Message-Flag: Warning: May contain useful information References: From: Roland Dreier Date: Thu, 09 Mar 2006 15:18:49 -0800 In-Reply-To: (Bryan O'Sullivan's message of "Thu, 9 Mar 2006 08:47:01 -0800") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.18 (linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-OriginalArrivalTime: 09 Mar 2006 23:18:50.0509 (UTC) FILETIME=[D311D3D0:01C643CF] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 31 > +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/