All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][staging-next] staging: unisys: visorbus: make two functions static
@ 2017-09-01 10:08 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-09-01 10:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Tim Sell, David Binder, Sameer Wadgaonkar,
	Charles Daniels, Andy Shevchenko, sparmaintainer, devel
  Cc: kernel-janitors, linux-kernel

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH][staging-next] staging: unisys: visorbus: make two functions static
@ 2017-09-01 10:08 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-09-01 10:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Tim Sell, David Binder, Sameer Wadgaonkar,
	Charles Daniels, Andy Shevchenko, sparmaintainer, devel
  Cc: kernel-janitors, linux-kernel

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH][staging-next] staging: unisys: visorbus: make two functions static
  2017-09-01 10:08 ` Colin King
@ 2017-09-01 10:33   ` Andy Shevchenko
  -1 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2017-09-01 10:33 UTC (permalink / raw)
  To: Colin King, Greg Kroah-Hartman, Tim Sell, David Binder,
	Sameer Wadgaonkar, Charles Daniels, sparmaintainer, devel
  Cc: kernel-janitors, linux-kernel

On Fri, 2017-09-01 at 11:08 +0100, Colin King wrote:
> 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?


While patch below seems okay to me, I would recommend you to add
something like

--git-min-percent=67

to get_maintainer.pl command when you generate a list of people to whom
you Cc to.

Thanks for understanding.

> 
> 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));

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][staging-next] staging: unisys: visorbus: make two functions static
@ 2017-09-01 10:33   ` Andy Shevchenko
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2017-09-01 10:33 UTC (permalink / raw)
  To: Colin King, Greg Kroah-Hartman, Tim Sell, David Binder,
	Sameer Wadgaonkar, Charles Daniels, sparmaintainer, devel
  Cc: kernel-janitors, linux-kernel

On Fri, 2017-09-01 at 11:08 +0100, Colin King wrote:
> 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?


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.

> 
> 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));

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH][staging-next] staging: unisys: visorbus: make two functions static
  2017-09-01 10:08 ` Colin King
@ 2017-09-01 21:56   ` Kershner, David A
  -1 siblings, 0 replies; 6+ messages in thread
From: Kershner, David A @ 2017-09-01 21:56 UTC (permalink / raw)
  To: Colin King, Greg Kroah-Hartman, Sell, Timothy C, Binder,
	David Anthony, Wadgaonkar, Sameer Laxmikant, *S-Par-Maintainer,
	devel
  Cc: kernel-janitors, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

> -----Original Message-----
> From: Colin King [mailto:colin.king@canonical.com]
> Sent: Friday, September 1, 2017 6:08 AM
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sell, Timothy C
> <Timothy.Sell@unisys.com>; Binder, David Anthony
> <David.Binder@unisys.com>; Wadgaonkar, Sameer Laxmikant
> <Sameer.Wadgaonkar@unisys.com>; Charles Daniels
> <cdaniels@fastmail.com>; Andy Shevchenko
> <andriy.shevchenko@linux.intel.com>; *S-Par-Maintainer
> <SParMaintainer@unisys.com>; devel@driverdev.osuosl.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH][staging-next] staging: unisys: visorbus: make two functions
> static
>
> 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>

Acked-by: David Kershner <david.kershner@unisys.com>

> ---
>  drivers/staging/unisys/visorbus/visorchannel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7872 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH][staging-next] staging: unisys: visorbus: make two functions static
@ 2017-09-01 21:56   ` Kershner, David A
  0 siblings, 0 replies; 6+ messages in thread
From: Kershner, David A @ 2017-09-01 21:56 UTC (permalink / raw)
  To: Colin King, Greg Kroah-Hartman, Sell, Timothy C, Binder,
	David Anthony, Wadgaonkar, Sameer Laxmikant, *S-Par-Maintainer,
	devel
  Cc: kernel-janitors, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

> -----Original Message-----
> From: Colin King [mailto:colin.king@canonical.com]
> Sent: Friday, September 1, 2017 6:08 AM
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Sell, Timothy C
> <Timothy.Sell@unisys.com>; Binder, David Anthony
> <David.Binder@unisys.com>; Wadgaonkar, Sameer Laxmikant
> <Sameer.Wadgaonkar@unisys.com>; Charles Daniels
> <cdaniels@fastmail.com>; Andy Shevchenko
> <andriy.shevchenko@linux.intel.com>; *S-Par-Maintainer
> <SParMaintainer@unisys.com>; devel@driverdev.osuosl.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH][staging-next] staging: unisys: visorbus: make two functions
> static
>
> 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>

Acked-by: David Kershner <david.kershner@unisys.com>

> ---
>  drivers/staging/unisys/visorbus/visorchannel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7872 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-01 21:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-01 10:08 [PATCH][staging-next] staging: unisys: visorbus: make two functions static Colin King
2017-09-01 10:08 ` Colin King
2017-09-01 10:33 ` Andy Shevchenko
2017-09-01 10:33   ` Andy Shevchenko
2017-09-01 21:56 ` Kershner, David A
2017-09-01 21:56   ` Kershner, David A

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.