Linux Modules
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: linux-modules@vger.kernel.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH 3/4] shared: annotate local API as static
Date: Tue, 21 Feb 2023 13:19:28 +0000	[thread overview]
Message-ID: <20230221131929.106951-4-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <20230221131929.106951-1-emil.l.velikov@gmail.com>

From: Emil Velikov <emil.velikov@collabora.com>

None of the API is used outside of the compilation unit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 shared/util.c | 6 +++---
 shared/util.h | 3 ---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/shared/util.c b/shared/util.c
index 4b547ff..e2bab83 100644
--- a/shared/util.c
+++ b/shared/util.c
@@ -354,7 +354,7 @@ char *freadline_wrapped(FILE *fp, unsigned int *linenum)
 /* path handling functions                                                  */
 /* ************************************************************************ */
 
-bool path_is_absolute(const char *p)
+static bool path_is_absolute(const char *p)
 {
 	assert(p != NULL);
 
@@ -460,13 +460,13 @@ int mkdir_parents(const char *path, mode_t mode)
 	return mkdir_p(path, end - path, mode);
 }
 
-unsigned long long ts_usec(const struct timespec *ts)
+static unsigned long long ts_usec(const struct timespec *ts)
 {
 	return (unsigned long long) ts->tv_sec * USEC_PER_SEC +
 	       (unsigned long long) ts->tv_nsec / NSEC_PER_USEC;
 }
 
-unsigned long long ts_msec(const struct timespec *ts)
+static unsigned long long ts_msec(const struct timespec *ts)
 {
 	return (unsigned long long) ts->tv_sec * MSEC_PER_SEC +
 	       (unsigned long long) ts->tv_nsec / NSEC_PER_MSEC;
diff --git a/shared/util.h b/shared/util.h
index 7030653..c4a3916 100644
--- a/shared/util.h
+++ b/shared/util.h
@@ -38,7 +38,6 @@ char *freadline_wrapped(FILE *fp, unsigned int *linenum) __attribute__((nonnull(
 
 /* path handling functions                                                  */
 /* ************************************************************************ */
-bool path_is_absolute(const char *p) _must_check_ __attribute__((nonnull(1)));
 char *path_make_absolute_cwd(const char *p) _must_check_ __attribute__((nonnull(1)));
 int mkdir_p(const char *path, int len, mode_t mode);
 int mkdir_parents(const char *path, mode_t mode);
@@ -51,8 +50,6 @@ unsigned long long stat_mstamp(const struct stat *st);
 #define MSEC_PER_SEC	1000ULL
 #define NSEC_PER_MSEC	1000000ULL
 
-unsigned long long ts_usec(const struct timespec *ts);
-unsigned long long ts_msec(const struct timespec *ts);
 unsigned long long now_usec(void);
 unsigned long long now_msec(void);
 int sleep_until_msec(unsigned long long msec);
-- 
2.39.2


  parent reply	other threads:[~2023-02-21 13:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 13:19 [PATCH 0/4] kmod: Paper cuts - dead code removal, don't SED manually Emil Velikov
2023-02-21 13:19 ` [PATCH 1/4] libkmod: remove unused kmod_module_get_builtin Emil Velikov
2023-02-21 13:19 ` [PATCH 2/4] libkmod: annotate kmod_builtin_iter API as static Emil Velikov
2023-02-21 13:19 ` Emil Velikov [this message]
2023-02-21 13:19 ` [PATCH 4/4] configure: manage libkmod.pc.in and version.py.in via AC_CONFIG_FILES Emil Velikov
2023-02-22  0:40 ` [PATCH 0/4] kmod: Paper cuts - dead code removal, don't SED manually Lucas De Marchi
2023-02-22 11:50   ` Emil Velikov

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=20230221131929.106951-4-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=linux-modules@vger.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