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] [day] [month] [year] [list]
Date:	Mon, 12 Jan 2015 10:31:30 +0100
From:	Karol Wrona <k.wrona@...sung.com>
To:	Jonathan Cameron <jic23@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>,
	linux-iio@...r.kernel.org, Hartmut Knaack <knaack.h@....de>,
	Peter Meerwald <pmeerw@...erw.net>,
	linux-kernel@...r.kernel.org
Cc:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Karol Wrona <wrona.vy@...il.com>
Subject: Re: [PATCH 1/2] iio: Add no-triggered buffer helper functions

On 01/10/2015 07:22 PM, Jonathan Cameron wrote:
> On 10/01/15 11:10, Lars-Peter Clausen wrote:
>> On 01/08/2015 05:40 PM, Karol Wrona wrote:
>>> These ones helps to create and manage iio_kfifo buffer when
>>> no-triggered buffer is used.
>> [...]
>>> +int iio_notriggered_buffer_setup(struct iio_dev *indio_dev,
>>> +                 const struct iio_buffer_setup_ops *setup_ops)
>>> +
>>> +{
>>> +    int ret;
>>> +    struct iio_buffer *buffer;
>>> +
>>> +    buffer = iio_kfifo_allocate();
>>> +    if (!buffer)
>>> +        return -ENOMEM;
>>> +
>>> +    iio_device_attach_buffer(indio_dev, buffer);
>>> +
>>> +    indio_dev->setup_ops = setup_ops;
>>> +
>>> +    ret = iio_buffer_register(indio_dev, indio_dev->channels,
>>> +                  indio_dev->num_channels);
>>> +    if (ret)
>>> +        iio_kfifo_free(buffer);
>>> +
>>
>> We recently got rid of having to manually call iio_buffer_register() and iio_buffer_unregister(). This is now done by the IIO core. See http://git.kernel.org/cgit/linux/kernel/git/jic23/iio.git/commit/?h=togreg&id=3e1b6c95b990c93f4aa3b17e9f66221e2fa44bee
>>
>> I don't think we actually need these non-triggered helper functions anymore. It basically just boils down to iio_kfifo_allocate() and iio_device_attach_buffer().
>>
> Even if they are still worthwhile, I'd just put them in the core code rather
> than having the additional module.  Too trivial for it to make sense
> in a utility module.
> 
> I'm inclined to agree with Lars that the recent changes reduce the argument for
> having these to marginal at best.  Bad luck for crossing with those!
> 
> Jonathan
> 
> J
>> - Lars

No problem with dropping that. I prefer to be done this way too as now cleanup
wrapper has no sense at all.

Thanks
Karol


>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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