From: Greg KH <gregkh@linuxfoundation.org>
To: Michail Tatas <michail.tatas@gmail.com>
Cc: pure.logic@nexus-software.ie, johan@kernel.org, elder@kernel.org,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: Remove unused macro
Date: Mon, 15 Jun 2026 09:56:09 +0200 [thread overview]
Message-ID: <2026061510-backpack-skimmer-12bc@gregkh> (raw)
In-Reply-To: <ahdNZlYqnTO22tQq@michalis-linux>
On Wed, May 27, 2026 at 11:00:38PM +0300, Michail Tatas wrote:
> Remove unused macro as indicated by the compiler
> when building with make W=2
W=2 even works for staging drivers? I wouldn't worry about that at all :)
> Signed-off-by: Michail Tatas <michail.tatas@gmail.com>
> ---
> drivers/staging/greybus/loopback.c | 26 --------------------------
> 1 file changed, 26 deletions(-)
>
> diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
> index 4d085d3cd471..7442b1c4e86c 100644
> --- a/drivers/staging/greybus/loopback.c
> +++ b/drivers/staging/greybus/loopback.c
> @@ -167,32 +167,6 @@ static DEVICE_ATTR_RO(name##_avg)
> gb_loopback_ro_stats_attr(field, max, u); \
> gb_loopback_ro_avg_attr(field)
>
> -#define gb_loopback_attr(field, type) \
> -static ssize_t field##_show(struct device *dev, \
> - struct device_attribute *attr, \
> - char *buf) \
> -{ \
> - struct gb_loopback *gb = dev_get_drvdata(dev); \
> - return sysfs_emit(buf, "%" #type "\n", gb->field); \
> -} \
> -static ssize_t field##_store(struct device *dev, \
> - struct device_attribute *attr, \
> - const char *buf, \
> - size_t len) \
> -{ \
> - int ret; \
> - struct gb_loopback *gb = dev_get_drvdata(dev); \
> - mutex_lock(&gb->mutex); \
> - ret = sscanf(buf, "%"#type, &gb->field); \
> - if (ret != 1) \
> - len = -EINVAL; \
> - else \
> - gb_loopback_check_attr(gb, bundle); \
> - mutex_unlock(&gb->mutex); \
> - return len; \
> -} \
> -static DEVICE_ATTR_RW(field)
I see why this is present, it makes it more uniform. That being said,
as it's not being used anywhere, I can understand the confusion even if
there is not any produced code difference at all.
I'll queue this up after -rc1 is out.
thanks,
greg k-h
prev parent reply other threads:[~2026-06-15 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 20:00 [PATCH] staging: greybus: Remove unused macro Michail Tatas
2026-06-15 7:56 ` Greg KH [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=2026061510-backpack-skimmer-12bc@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=michail.tatas@gmail.com \
--cc=pure.logic@nexus-software.ie \
/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