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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DB9PR04MB9452B7B53EC16CB1965973D2F40C2@DB9PR04MB9452.eurprd04.prod.outlook.com>
Date: Wed, 25 Dec 2024 07:56:24 +0000
From: Sandor Yu <sandor.yu@....com>
To: Maxime Ripard <mripard@...nel.org>
CC: "dmitry.baryshkov@...aro.org" <dmitry.baryshkov@...aro.org>,
	"andrzej.hajda@...el.com" <andrzej.hajda@...el.com>,
	"neil.armstrong@...aro.org" <neil.armstrong@...aro.org>, Laurent Pinchart
	<laurent.pinchart@...asonboard.com>, "jonas@...boo.se" <jonas@...boo.se>,
	"jernej.skrabec@...il.com" <jernej.skrabec@...il.com>, "airlied@...il.com"
	<airlied@...il.com>, "daniel@...ll.ch" <daniel@...ll.ch>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>,
	"krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
	"shawnguo@...nel.org" <shawnguo@...nel.org>, "s.hauer@...gutronix.de"
	<s.hauer@...gutronix.de>, "festevam@...il.com" <festevam@...il.com>,
	"vkoul@...nel.org" <vkoul@...nel.org>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-phy@...ts.infradead.org"
	<linux-phy@...ts.infradead.org>, "kernel@...gutronix.de"
	<kernel@...gutronix.de>, dl-linux-imx <linux-imx@....com>, Oliver Brown
	<oliver.brown@....com>, "alexander.stein@...tq-group.com"
	<alexander.stein@...tq-group.com>, "sam@...nborg.org" <sam@...nborg.org>
Subject: RE: [EXT] Re: [PATCH v20 5/9] drm: bridge: Cadence: Add MHDP8501
 DP/HDMI driver


> Hi,
> 
> On Tue, Dec 17, 2024 at 02:51:47PM +0800, Sandor Yu wrote:
> > +static ssize_t firmware_version_show(struct device *dev,
> > +				     struct device_attribute *attr, char *buf); static
> struct
> > +device_attribute firmware_version = __ATTR_RO(firmware_version);
> > +
> > +ssize_t firmware_version_show(struct device *dev,
> > +			      struct device_attribute *attr, char *buf) {
> > +	struct cdns_mhdp8501_device *mhdp = dev_get_drvdata(dev);
> > +
> > +	u32 version = readl(mhdp->base.regs + VER_L) | readl(mhdp->base.regs
> + VER_H) << 8;
> > +	u32 lib_version = readl(mhdp->base.regs + VER_LIB_L_ADDR) |
> > +			  readl(mhdp->base.regs + VER_LIB_H_ADDR) << 8;
> > +
> > +	return sprintf(buf, "FW version %d, Lib version %d\n", version,
> > +lib_version); }
> > +
> > +static void cdns_mhdp8501_create_device_files(struct
> > +cdns_mhdp8501_device *mhdp) {
> > +	if (device_create_file(mhdp->dev, &firmware_version)) {
> > +		DRM_ERROR("Unable to create firmware_version sysfs\n");
> > +		device_remove_file(mhdp->dev, &firmware_version);
> > +	}
> > +}
> 
> sysfs files are part of the uABI, and need to be stable and documented.
> 
> For these kind of things, you should use debugfs.

OK, thanks, I will change it.

Sandor

> 
> Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ