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: <8bd0f97a0909291844j17f485edib7417015d90b4784@mail.gmail.com>
Date:	Tue, 29 Sep 2009 21:44:22 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	uclinux-dist-devel@...ckfin.uclinux.org, chrisv@...erswitching.com,
	linux-kernel@...r.kernel.org, michael.hennerich@...log.com
Subject: Re: [Uclinux-dist-devel] [PATCH] ad525x_dpot: new driver for AD525x 
	digital potentiometers

On Tue, Sep 29, 2009 at 21:27, Andrew Morton wrote:
> On Tue, 29 Sep 2009 21:14:37 -0400 Mike Frysinger wrote:
>> > + __ __ __ if (reg & AD525X_REG_TOL)
>> > + __ __ __ __ __ __ __ return sprintf(buf, "0x%04x\n", value & 0xFFFF);
>> > + __ __ __ else
>> > + __ __ __ __ __ __ __ return sprintf(buf, "%u\n", value & data->rdac_mask);
>> >
>> > which makes me suspect that the proposed userspace interface is quite
>> > poor.
>>
>> not really.
>
> Think so.  We have a sysfs file which under some circumstances will
> return a decimal number and which under others will return a hex
> number.  So userspace is supposed to look for the leading 0x to work
> out how to interpret that number?
>
> Or something.  Whatever.  Perhaps it all makes sense when one has seen
> the overall description.

no, you're looking at one common function which is called by different
sysfs files.  no point in copying & pasting the same code over and
over.  all of the rdac files display as a hex file while all the
non-rdac files display as a decimal.
-mike
--
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