mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Hugo Villeneuve <hugo@hugovil.com>
Cc: gregkh@linuxfoundation.org, fvallee@eukrea.fr,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>
Subject: Re: [PATCH 05/15] serial: sc16is7xx: use guards for simple mutex locks
Date: Tue, 30 Sep 2025 06:01:35 +0200	[thread overview]
Message-ID: <3805400b-bf91-468a-8dac-4699b41cd5f6@kernel.org> (raw)
In-Reply-To: <20250929202708.c81f114be5286eab259aa4c1@hugovil.com>

On 30. 09. 25, 2:27, Hugo Villeneuve wrote:
>>> @@ -943,9 +937,8 @@ static void sc16is7xx_ms_proc(struct kthread_work *ws)
>>>    	struct sc16is7xx_port *s = dev_get_drvdata(one->port.dev);
>>>    
>>>    	if (one->port.state) {
>>> -		mutex_lock(&one->lock);
>>> +		guard(mutex)(&one->lock);
>>>    		sc16is7xx_update_mlines(one);
>>> -		mutex_unlock(&one->lock);
>>>    
>>>    		kthread_queue_delayed_work(&s->kworker, &one->ms_work, HZ);
>>
>> Now the lock is held till here. R U sure it is OK?
> 
> Now that you mention it, I am sure its not OK :)
> 
> I will restore this one to the original lock/unlock code in V2.

Or use a scoped lock ;).

-- 
js
suse labs

  reply	other threads:[~2025-09-30  4:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 15:37 [PATCH 00/15] serial: sc16is7xx: register access fixes and improvements Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 01/15] serial: sc16is7xx: remove useless enable of enhanced features Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 02/15] serial: sc16is7xx: rename LCR macros to better reflect usage Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 03/15] serial: sc16is7xx: rename EFR mutex with generic name Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 04/15] serial: sc16is7xx: define common register access function Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 05/15] serial: sc16is7xx: use guards for simple mutex locks Hugo Villeneuve
2025-09-29  6:09   ` Jiri Slaby
2025-09-30  0:27     ` Hugo Villeneuve
2025-09-30  4:01       ` Jiri Slaby [this message]
2025-09-30 13:57         ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 06/15] serial: sc16is7xx: use dev_err_probe() instead of dev_err() Hugo Villeneuve
2025-09-29  6:10   ` Jiri Slaby
2025-09-30  0:32     ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 07/15] serial: sc16is7xx: declare SPR/TLR/XOFF2 register as volatile Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 08/15] serial: sc16is7xx: move port/channel init to separate function Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 09/15] serial: sc16is7xx: Kconfig: allow building with COMPILE_TEST Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 10/15] serial: sc16is7xx: use KBUILD_MODNAME Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 11/15] serial: sc16is7xx: remove empty line Hugo Villeneuve
2025-09-29  6:14   ` Jiri Slaby
2025-09-30  0:53     ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 12/15] serial: sc16is7xx: add missing space between macro args (checkpatch) Hugo Villeneuve
2025-09-29  6:15   ` Jiri Slaby
2025-09-30 20:08     ` Hugo Villeneuve
2025-10-01  5:16       ` Greg KH
2025-10-01 13:29         ` Hugo Villeneuve
2025-10-02  5:24           ` Greg KH
2025-09-24 15:37 ` [PATCH 13/15] serial: sc16is7xx: change incorrect indentation Hugo Villeneuve
2025-09-26  9:18   ` Maarten Brock
2025-09-26 16:11     ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 14/15] serial: sc16is7xx: reformat comments Hugo Villeneuve
2025-09-29  6:18   ` Jiri Slaby
2025-09-30 19:42     ` Hugo Villeneuve
2025-09-24 15:37 ` [PATCH 15/15] serial: sc16is7xx: add/improve comments Hugo Villeneuve

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3805400b-bf91-468a-8dac-4699b41cd5f6@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=fvallee@eukrea.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=hugo@hugovil.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®