All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guenter Roeck" <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 1/4] hwmon: Support guard() and scoped_guard for subsystem locks
Date: Thu, 14 May 2026 05:46:49 +0000	[thread overview]
Message-ID: <20260514054650.17E1EC2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260513142514.419345-2-linux@roeck-us.net>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The header include/linux/hwmon.h uses the DEFINE_GUARD macro but fails to explicitly include <linux/cleanup.h>.
--

commit 14ebb15eae07a29dd197db88caa15eb8cc2e93a1
Author: Guenter Roeck <linux@roeck-us.net>

hwmon: Support guard() and scoped_guard for subsystem locks
    
This commit adds support for guard() and scoped_guard() macros to the
hwmon subsystem lock, aiming to simplify lock management.

> diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
> index 301a83afbd663..04959e044fd0f 100644
> --- a/include/linux/hwmon.h
> +++ b/include/linux/hwmon.h
[ ... ]
> @@ -495,6 +495,8 @@ char *devm_hwmon_sanitize_name(struct device *dev, const char *name);
>  void hwmon_lock(struct device *dev);
>  void hwmon_unlock(struct device *dev);
>  
> +DEFINE_GUARD(hwmon_lock, struct device *, hwmon_lock(_T), hwmon_unlock(_T))

Does this header need to include <linux/cleanup.h>?

The DEFINE_GUARD macro is provided by <linux/cleanup.h>. While many files
might implicitly pull it in through <linux/device.h> or <linux/mutex.h>,
could this introduce a build regression for any compilation units that include
<linux/hwmon.h> without an implicit include path to <linux/cleanup.h>?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260513142514.419345-1-linux@roeck-us.net?part=1

  reply	other threads:[~2026-05-14  5:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 14:25 [PATCH 0/4] hwmon: Support guard() and scoped_guard for subsystem locks Guenter Roeck
2026-05-13 14:25 ` [PATCH 1/4] " Guenter Roeck
2026-05-14  5:46   ` sashiko-bot [this message]
2026-05-13 14:25 ` [PATCH 2/4] hwmon: (lm90) Use guard() to acquire subsystem lock Guenter Roeck
2026-05-14  6:18   ` sashiko-bot
2026-05-13 14:25 ` [PATCH 3/4] hwmon: (ina2xx) Use scoped_guard() to acquire the " Guenter Roeck
2026-05-13 14:25 ` [PATCH 4/4] hwmon: (adt7411) " Guenter Roeck

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=20260514054650.17E1EC2BCB7@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.