From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regmap: make range check functions static
Date: Tue, 29 Mar 2022 00:56:28 +0200 [thread overview]
Message-ID: <20220328225628.3012397-1-linux@rasmusvillemoes.dk> (raw)
regmap_reg_in_ranges() and regmap_check_range_table() have no callers
outside regmap.c, so they have no reason to be exported nor have
external linkage.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
drivers/base/regmap/regmap.c | 12 +++++-------
include/linux/regmap.h | 7 -------
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 5e12f7cb5147..8b3fdc966ed6 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -57,9 +57,9 @@ static int _regmap_bus_reg_write(void *context, unsigned int reg,
static int _regmap_bus_raw_write(void *context, unsigned int reg,
unsigned int val);
-bool regmap_reg_in_ranges(unsigned int reg,
- const struct regmap_range *ranges,
- unsigned int nranges)
+static bool regmap_reg_in_ranges(unsigned int reg,
+ const struct regmap_range *ranges,
+ unsigned int nranges)
{
const struct regmap_range *r;
int i;
@@ -69,10 +69,9 @@ bool regmap_reg_in_ranges(unsigned int reg,
return true;
return false;
}
-EXPORT_SYMBOL_GPL(regmap_reg_in_ranges);
-bool regmap_check_range_table(struct regmap *map, unsigned int reg,
- const struct regmap_access_table *table)
+static bool regmap_check_range_table(struct regmap *map, unsigned int reg,
+ const struct regmap_access_table *table)
{
/* Check "no ranges" first */
if (regmap_reg_in_ranges(reg, table->no_ranges, table->n_no_ranges))
@@ -85,7 +84,6 @@ bool regmap_check_range_table(struct regmap *map, unsigned int reg,
return regmap_reg_in_ranges(reg, table->yes_ranges,
table->n_yes_ranges);
}
-EXPORT_SYMBOL_GPL(regmap_check_range_table);
bool regmap_writeable(struct regmap *map, unsigned int reg)
{
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index de81a94d7b30..5008db9bf69a 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1210,9 +1210,6 @@ void regcache_cache_only(struct regmap *map, bool enable);
void regcache_cache_bypass(struct regmap *map, bool enable);
void regcache_mark_dirty(struct regmap *map);
-bool regmap_check_range_table(struct regmap *map, unsigned int reg,
- const struct regmap_access_table *table);
-
int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
int num_regs);
int regmap_parse_val(struct regmap *map, const void *buf,
@@ -1224,10 +1221,6 @@ static inline bool regmap_reg_in_range(unsigned int reg,
return reg >= range->range_min && reg <= range->range_max;
}
-bool regmap_reg_in_ranges(unsigned int reg,
- const struct regmap_range *ranges,
- unsigned int nranges);
-
static inline int regmap_set_bits(struct regmap *map,
unsigned int reg, unsigned int bits)
{
--
2.31.1
next reply other threads:[~2022-03-28 22:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 22:56 Rasmus Villemoes [this message]
2022-03-30 12:38 ` Mark Brown
2022-04-11 14:59 ` Andy Shevchenko
2022-04-12 12:30 ` 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=20220328225628.3012397-1-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--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®