[PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Seymour, Shane M
Convert DRIVER_ATTR macros to DRIVER_ATTR_RO as requested by Greg KH. Also switched to using sprintf as nothing printed should exceed PAGE_SIZE - based on feedback from Greg when implementing show functions for tape stats. Suggested-by: Greg Kroah-Hartman gre...@linuxfoundation.org

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Sergey Senozhatsky
On (06/24/15 06:10), Seymour, Shane M wrote: [..] /* The sysfs driver interface. Read-only at the moment */ -static ssize_t st_try_direct_io_show(struct device_driver *ddp, char *buf) +static ssize_t try_direct_io_show(struct device_driver *ddp, char *buf) { - return snprintf(buf,

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Sergey Senozhatsky
On (06/24/15 08:10), Greg KH gre...@linuxfoundation.org (gre...@linuxfoundation.org) wrote: On Wed, Jun 24, 2015 at 03:25:57PM +0900, Sergey Senozhatsky wrote: On (06/24/15 06:10), Seymour, Shane M wrote: [..] /* The sysfs driver interface. Read-only at the moment */ -static

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Greg KH gre...@linuxfoundation.org (gre...@linuxfoundation.org)
On Wed, Jun 24, 2015 at 03:25:57PM +0900, Sergey Senozhatsky wrote: On (06/24/15 06:10), Seymour, Shane M wrote: [..] /* The sysfs driver interface. Read-only at the moment */ -static ssize_t st_try_direct_io_show(struct device_driver *ddp, char *buf) +static ssize_t

Re: [PATCH] st: convert DRIVER_ATTR macros to DRIVER_ATTR_RO

2015-06-24 Thread Greg KH gre...@linuxfoundation.org (gre...@linuxfoundation.org)
On Wed, Jun 24, 2015 at 03:25:57PM +0900, Sergey Senozhatsky wrote: On (06/24/15 06:10), Seymour, Shane M wrote: [..] /* The sysfs driver interface. Read-only at the moment */ -static ssize_t st_try_direct_io_show(struct device_driver *ddp, char *buf) +static ssize_t