lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141028141255.GC18384@kroah.com>
Date:	Tue, 28 Oct 2014 22:12:55 +0800
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Qais Yousef <qais.yousef@...tec.com>
Cc:	linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	alsa-devel@...a-project.org
Subject: Re: [PATCH 09/11] drivers: char: axd: add sysfs setup files

On Tue, Oct 28, 2014 at 11:26:27AM +0000, Qais Yousef wrote:
> +/* Control Device Sysfs Attributes */
> +/* version */
> +static ssize_t show_version(struct device *dev, struct device_attribute *attr,
> +							char *buf)
> +{
> +	struct axd_cmd *cmd = (struct axd_cmd *)dev->platform_data;
> +	int major, minor, patch;
> +
> +	axd_cmd_get_version(cmd, &major, &minor, &patch);
> +	return sprintf(buf, "%u.%u.%u\n", major, minor, patch);
> +}
> +static DEVICE_ATTR(version, RD_PERMS, show_version, NULL);

DEVICE_ATTR_RO() please.  Same for all other instances, you should never
use DEVICE_ATTR() anymore.

thanks,

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ