Thread (9 messages) 9 messages, 4 authors, 2025-02-11

Re: [PATCH v7 2/3] firmware: add Exynos ACPM protocol driver

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2025-02-10 09:23:13
Also in: linux-devicetree, linux-samsung-soc, lkml

On 10/02/2025 09:59, Tudor Ambarus wrote:

On 2/8/25 3:31 PM, Markus Elfring wrote:
quoted
quoted
+++ b/drivers/firmware/samsung/exynos-acpm.c
@@ -0,0 +1,771 @@
quoted
+static int acpm_dequeue_by_polling(struct acpm_chan *achan,
+				   const struct acpm_xfer *xfer)
+{
quoted
+	do {
+		mutex_lock(&achan->rx_lock);
+		ret = acpm_get_rx(achan, xfer);
+		mutex_unlock(&achan->rx_lock);
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&achan->rx_lock);”?
https://elixir.bootlin.com/linux/v6.13.1/source/include/linux/mutex.h#L201
I'll replace the open-coded mutex handling with cleanup.h guard(mutex)
and scoped_guard(mutex, ...), thanks.
FYI, Markus is PLONKed so I won't ever see what he writes.

<form letter>
Feel free to ignore all comments from Markus, regardless whether the
suggestion is reasonable or not. Several maintainers ignore Markus'
feedback, because it is just a waste of time.
</form letter>

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help