From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] regmap: cache: Fix return value
Date: Fri, 10 Mar 2023 08:39:11 +0100 [thread overview]
Message-ID: <20230310073911.3470892-2-alexander.stein@ew.tq-group.com> (raw)
In-Reply-To: <20230310073911.3470892-1-alexander.stein@ew.tq-group.com>
checkpatch.pl warned:
WARNING: ENOSYS means 'invalid syscall nr' and nothing else
Align the return value to regcache_drop_region().
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
This warning popped up while initially returning ENOSYS in patch 1.
But I'm wondering if returning 0 for regcache_write is correct or not.
This might be a follow-up patch though.
drivers/base/regmap/regcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index b61763dbfc68..c13f5f8872ac 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -242,7 +242,7 @@ int regcache_read(struct regmap *map,
int ret;
if (map->cache_type == REGCACHE_NONE)
- return -ENOSYS;
+ return -EINVAL;
BUG_ON(!map->cache_ops);
--
2.34.1
next prev parent reply other threads:[~2023-03-10 7:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 7:39 [PATCH 1/2] regmap: cache: Do not panic for REGCACHE_NONE regmap Alexander Stein
2023-03-10 7:39 ` Alexander Stein [this message]
2023-03-10 13:02 ` Mark Brown
2023-03-10 13:35 ` Alexander Stein
2023-03-10 14:21 ` Mark Brown
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=20230310073911.3470892-2-alexander.stein@ew.tq-group.com \
--to=alexander.stein@ew.tq-group.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@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®