Thread (18 messages) 18 messages, 6 authors, 2024-06-30

Re: [PATCH v12 3/7] iio: core: Add new DMABUF interface infrastructure

From: Lee Jones <lee@kernel.org>
Date: 2024-06-20 16:55:50
Also in: dmaengine, dri-devel, linux-iio, linux-media, lkml, oe-kbuild-all

On Thu, 20 Jun 2024, Markus Elfring wrote:
quoted
v11:
quoted
    - Use guard(mutex)

v12:
    - Revert to mutex_lock/mutex_unlock in iio_buffer_attach_dmabuf(),
      as it uses cleanup GOTOs
…

I would find it nice if better design options could gain acceptance.
Will the chances grow to adjust scopes another bit for involved variables
in such function implementations?

A) Enclosing a source code part with extra curly brackets?

B) scoped_guard()?
   https://elixir.bootlin.com/linux/v6.10-rc4/source/include/linux/cleanup.h#L137

C) Moving a locked source code part into a separate function implementation?
I think it would help your cause if you quoted the exact piece of code
you're referring to.  Then tone down the language a bit - keep it as
simple and natural as you can.

Ex 1: Please place curly brackets around this section to aid with <reason>

Ex 2: To save N lines of clean-up, please use scoped_guard()

Ex 3: Moving out this chunk to another function would help with <reason>

Etc.

-- 
Lee Jones [李琼斯]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help