From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdIAKdK (ORCPT ); Fri, 1 Sep 2017 06:33:10 -0400 Received: from mga07.intel.com ([134.134.136.100]:2659 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbdIAKdJ (ORCPT ); Fri, 1 Sep 2017 06:33:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,457,1498546800"; d="scan'208";a="130670455" Message-ID: <1504261984.25945.180.camel@linux.intel.com> Subject: Re: [PATCH][staging-next] staging: unisys: visorbus: make two functions static From: Andy Shevchenko To: Colin King , Greg Kroah-Hartman , Tim Sell , David Binder , Sameer Wadgaonkar , Charles Daniels , sparmaintainer@unisys.com, devel@driverdev.osuosl.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 01 Sep 2017 13:33:04 +0300 In-Reply-To: <20170901100810.17172-1-colin.king@canonical.com> References: <20170901100810.17172-1-colin.king@canonical.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-09-01 at 11:08 +0100, Colin King wrote: > From: Colin Ian King > > 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 > --- >  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 Intel Finland Oy From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Date: Fri, 01 Sep 2017 10:33:04 +0000 Subject: Re: [PATCH][staging-next] staging: unisys: visorbus: make two functions static Message-Id: <1504261984.25945.180.camel@linux.intel.com> List-Id: References: <20170901100810.17172-1-colin.king@canonical.com> In-Reply-To: <20170901100810.17172-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Colin King , Greg Kroah-Hartman , Tim Sell , David Binder , Sameer Wadgaonkar , Charles Daniels , sparmaintainer@unisys.com, devel@driverdev.osuosl.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org On Fri, 2017-09-01 at 11:08 +0100, Colin King wrote: > From: Colin Ian King > > 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 > --- >  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 Intel Finland Oy