Linux Serial subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michael Zaidman" <michael.zaidman@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v4 16/16] HID: ft260: use lock guards
Date: Tue, 17 Nov 2026 20:36:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-219629@kernel.org> (raw)
In-Reply-To: <20261117200423.19561-17-michael.zaidman@gmail.com>

> Convert the mutex_lock() and mutex_unlock() pairs to guard(mutex) from
> linux/cleanup.h. The lock is released on each return, so the goto
> labels that only unlock a mutex are removed, and the error paths
> return directly.
> 
> ft260_uart_port_remove(), ft260_uart_port_get(),
> ft260_uart_port_destroy() and ft260_schedule_reset() take a lock for
> one or two statements. They use scoped_guard(), which releases the
> lock at the end of the block. ft260_uart_port_remove() does not hold
> port->lock over the tty hangup and the rest of the removal.
> ft260_schedule_reset() must not hold ft260_chip_list_lock when it
> calls ft260_chip_put(), which takes the same lock.
> 
> ft260_i2c_xfer() and ft260_smbus_xfer() set the normal power mode with
> hid_hw_power() once, at the end. The i2c_exit and smbus_exit labels are
> removed: ft260_i2c_xfer() has one return path after the transfer, and
> each error case in the ft260_smbus_xfer() switch ends with break. So no
> function mixes goto with a guard, as include/linux/cleanup.h asks.
> 
> No functional change.
> 
> Suggested-by: Bartosz Golaszewski <brgl@kernel.org>
> Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117200423.19561-1-michael.zaidman@gmail.com?part=16


      reply	other threads:[~2026-11-17 20:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 20:04 [PATCH v4 00/16] HID: ft260: add UART and GPIO support, plus I2C fixes Michael Zaidman
2026-11-17 20:04 ` [PATCH v4 01/16] HID: ft260: add serial driver Michael Zaidman
2026-11-17 20:32   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 02/16] HID: ft260: uart: fix " Michael Zaidman
2026-11-17 20:49   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 03/16] HID: ft260: add GPIO support Michael Zaidman
2026-11-17 20:23   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 04/16] HID: ft260: i2c: reduce driver module loading time Michael Zaidman
2026-11-17 20:11   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 05/16] HID: ft260: fix sysfs store failure notice for big numbers Michael Zaidman
2026-11-17 20:12   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 06/16] HID: ft260: i2c: reduce bus-error message severity Michael Zaidman
2026-11-17 20:13   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 07/16] HID: ft260: uart: enable flow control Michael Zaidman
2026-11-17 20:21   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 08/16] HID: ft260: uart: add modem pins control via ioctl Michael Zaidman
2026-11-17 20:24   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 09/16] HID: ft260: group sysfs attrs per HID interface Michael Zaidman
2026-11-17 20:30   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 10/16] HID: ft260: i2c: fix large write transaction failure Michael Zaidman
2026-11-17 20:30   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 11/16] HID: ft260: workaround for TN_189 errata endpoint STALL after enumeration Michael Zaidman
2026-11-17 20:50   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 12/16] HID: ft260: i2c: abort in-flight transfers with STOP before reset Michael Zaidman
2026-11-17 20:33   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 13/16] HID: ft260: i2c: reject an I2C clock outside the supported range Michael Zaidman
2026-11-17 20:34   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 14/16] HID: ft260: i2c: fix i2c_reset sysfs store return value Michael Zaidman
2026-11-17 20:35   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 15/16] HID: ft260: i2c: recover a bus held by a slave Michael Zaidman
2026-11-17 20:44   ` sashiko-bot
2026-11-17 20:04 ` [PATCH v4 16/16] HID: ft260: use lock guards Michael Zaidman
2026-11-17 20:36   ` sashiko-bot [this message]

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=sashiko-outbox-219629@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=michael.zaidman@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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