Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724936

[PATCH][staging-next] staging: unisys: visorbus: make two functions static

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH][staging-next] staging: unisys: visorbus: make two functions static
Date 2017-09-01 12:10 +0200
Message-ID <ukR3I-2tp-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

The functions sig_queue_offset and sig_data_offset are local to
the source and do not need to be in global scope, so make them
static.

Cleans up sparse warnings:
symbol 'sig_queue_offset' was not declared. Should it be static?
symbol 'sig_data_offset' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/unisys/visorbus/visorchannel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 49d1f5f9ef1d..2a000fee3119 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -155,7 +155,7 @@ void *visorchannel_get_header(struct visorchannel *channel)
  * Return offset of a specific SIGNAL_QUEUE_HEADER from the beginning of a
  * channel header
  */
-int sig_queue_offset(struct channel_header *chan_hdr, int q)
+static int sig_queue_offset(struct channel_header *chan_hdr, int q)
 {
 	return ((chan_hdr)->ch_space_offset +
 	       ((q) * sizeof(struct signal_queue_header)));
@@ -165,8 +165,8 @@ int sig_queue_offset(struct channel_header *chan_hdr, int q)
  * Return offset of a specific queue entry (data) from the beginning of a
  * channel header
  */
-int sig_data_offset(struct channel_header *chan_hdr, int q,
-		    struct signal_queue_header *sig_hdr, int slot)
+static int sig_data_offset(struct channel_header *chan_hdr, int q,
+			   struct signal_queue_header *sig_hdr, int slot)
 {
 	return (sig_queue_offset(chan_hdr, q) + sig_hdr->sig_base_offset +
 	       (slot * sig_hdr->signal_size));
-- 
2.14.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH][staging-next] staging: unisys: visorbus: make two functions static Colin King <colin.king@canonical.com> - 2017-09-01 12:10 +0200
  Re: [PATCH][staging-next] staging: unisys: visorbus: make two  functions static Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-09-01 12:40 +0200
  RE: [PATCH][staging-next] staging: unisys: visorbus: make two  functions static "Kershner, David A" <David.Kershner@unisys.com> - 2017-09-02 00:00 +0200

csiph-web