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]
Date:	Thu, 16 Aug 2012 09:32:49 +0100
From:	Jonathan Cameron <jic23@...23.retrosnub.co.uk>
To:	Lars-Peter Clausen <lars@...afoo.de>
CC:	"Kim, Milo" <Milo.Kim@...com>, Jonathan Cameron <jic23@...nel.org>,
	"jic23@....ac.uk" <jic23@....ac.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 1/3] iio: add iio_read_channel_offset() consumer api

On 16/08/12 09:19, Lars-Peter Clausen wrote:
> On 08/16/2012 09:39 AM, Kim, Milo wrote:
>> This allows the iio consumer to get the offset of the channel.
>> The value of offset can be used when calculating the result such
>> as 'result = raw * scale + offset'.
> result = (raw + offset) * scale
>
> Otherwise it looks good, except for:
>
>> +/**
>> + * iio_read_channel_offset() - read offset from a given channel
>> + * @channel:		The channel being queried.
>> + * @val:		Offset Value read back.
>> + *
>> + * Note offset can be used in the consumer when calculating the result
>> + * such as 'result = raw * scale + offset'.
>> + */
> The documentation should go in the c file.
I've often wondered about this myself.  Looking quickly about it does
appear that it is more popular to do it in c file...  Guess I've been wrong
for quite some time.  For now it's probably better to keep this docs
in the header and do the move all in one go given all the other docs
are here in this header.

I can see the arguments either way, but have not as yet seen anyone
stamp their foot on what is the 'one true way'.

>
>> +int iio_read_channel_offset(struct iio_channel *chan, int *val);
>>   #endif

--
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