staging: unisys: visorbus: make two functions static
Subsystems (2)
PATCH 1/1 staging: unisys: visorbus: make two functions static
From: Colin Ian King <[email protected]>
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?
--- drivers/staging/unisys/visorbus/visorchannel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/unisys/visorbus/visorchannel.c +3 -3
@@ -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));
Signature · 1 line
2.14.1
Quoted 9 lines · Colin King
From: Colin Ian King <[email protected]>
The functions
sig_queue_offsetandsig_data_offsetare 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?
While patch below seems okay to me, I would recommend you to add something like
--git-min-percentg
to get_maintainer.pl command when you generate a list of people to whom you Cc to.
Thanks for understanding.
Quoted 37 lines
Signed-off-by Colin Ian King <[email protected]>---
drivers/staging/unisys/visorbus/visorchannel.c | 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/unisys/visorbus/visorchannel.c +0
-0@@ -155,7 +155,7 @@ void *visorchannel_get_header(struct visorchannel *channel) * Return offset of a specific SIGNAL_QUEUE_HEADER from the beginningof a
* channel header
*/drivers/staging/unisys/visorbus/visorchannel.c +1
-1-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)));drivers/staging/unisys/visorbus/visorchannel.c +0
-0@@ -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 beginningof a
* channel header
*/drivers/staging/unisys/visorbus/visorchannel.c +2
-2-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, intslot)
{
return (sig_queue_offset(chan_hdr, q)+ sig_hdr-Quoted 1 line
sig_base_offset+(slot *
sig_hdr->signal_size));
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 20 lines
-----Original Message-----
From: Colin King [mailto:[email protected]]
Sent: Friday, September 1, 2017 6:08 AM
To: Greg Kroah-Hartman <[email protected]>; Sell, Timothy C <[email protected]>; Binder, David Anthony <[email protected]>; Wadgaonkar, Sameer Laxmikant <[email protected]>; Charles Daniels <[email protected]>; Andy Shevchenko <[email protected]>; *S-Par-Maintainer <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH][staging-next] staging: unisys: visorbus: make two functions staticFrom: Colin Ian King <[email protected]>
The functions
sig_queue_offsetandsig_data_offsetare local to the source and do not need to be in global scope, so make them static.
Quoted 5 lines
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 <[email protected]>
Quoted 4 lines
--- drivers/staging/unisys/visorbus/visorchannel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)