linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ljones-mfd:ib-mfd-i2c-input-chrome-4.2 8/10] drivers/mfd/cros_ec.c:30:25: sparse: symbol 'ec_p' was not declared. Should it be static?
@ 2015-06-15 13:39 kbuild test robot
  2015-06-15 13:39 ` [PATCH ljones-mfd] mfd: cros_ec:: ec_p can be static kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2015-06-15 13:39 UTC (permalink / raw)
  To: Gwendal Grignou
  Cc: kbuild-all, Lee Jones, Dmitry Torokhov, Javier Martinez Canillas,
	Samuel Ortiz, linux-kernel

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-i2c-input-chrome-4.2
head:   ff4378f4b813d5aa26bbf814a9060638dab1fbbf
commit: 57b33ff077beebb68481a2b6b8e5fe58ca998169 [8/10] mfd: cros_ec: Support multiple EC in a system
reproduce:
  # apt-get install sparse
  git checkout 57b33ff077beebb68481a2b6b8e5fe58ca998169
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/mfd/cros_ec.c:30:25: sparse: symbol 'ec_p' was not declared. Should it be static?
>> drivers/mfd/cros_ec.c:40:17: sparse: symbol 'ec_cell' was not declared. Should it be static?
>> drivers/mfd/cros_ec.c:46:17: sparse: symbol 'ec_pd_cell' was not declared. Should it be static?

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation

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

* [PATCH ljones-mfd] mfd: cros_ec:: ec_p can be static
  2015-06-15 13:39 [ljones-mfd:ib-mfd-i2c-input-chrome-4.2 8/10] drivers/mfd/cros_ec.c:30:25: sparse: symbol 'ec_p' was not declared. Should it be static? kbuild test robot
@ 2015-06-15 13:39 ` kbuild test robot
  2015-06-15 19:06   ` Javier Martinez Canillas
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2015-06-15 13:39 UTC (permalink / raw)
  To: Gwendal Grignou
  Cc: kbuild-all, Lee Jones, Dmitry Torokhov, Javier Martinez Canillas,
	Samuel Ortiz, linux-kernel


Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 cros_ec.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
index 11b1884b..dd6f4ff 100644
--- a/drivers/mfd/cros_ec.c
+++ b/drivers/mfd/cros_ec.c
@@ -27,7 +27,7 @@
 #define CROS_EC_DEV_EC_INDEX 0
 #define CROS_EC_DEV_PD_INDEX 1
 
-struct cros_ec_platform ec_p = {
+static struct cros_ec_platform ec_p = {
 	.ec_name = CROS_EC_DEV_NAME,
 	.cmd_offset = EC_CMD_PASSTHRU_OFFSET(CROS_EC_DEV_EC_INDEX),
 };
@@ -37,13 +37,13 @@ struct cros_ec_platform pd_p = {
 	.cmd_offset = EC_CMD_PASSTHRU_OFFSET(CROS_EC_DEV_PD_INDEX),
 };
 
-struct mfd_cell ec_cell = {
+static struct mfd_cell ec_cell = {
 	.name = "cros-ec-ctl",
 	.platform_data = &ec_p,
 	.pdata_size = sizeof(ec_p),
 };
 
-struct mfd_cell ec_pd_cell = {
+static struct mfd_cell ec_pd_cell = {
 	.name = "cros-ec-ctl",
 	.platform_data = &pd_p,
 	.pdata_size = sizeof(pd_p),

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

* Re: [PATCH ljones-mfd] mfd: cros_ec:: ec_p can be static
  2015-06-15 13:39 ` [PATCH ljones-mfd] mfd: cros_ec:: ec_p can be static kbuild test robot
@ 2015-06-15 19:06   ` Javier Martinez Canillas
  0 siblings, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2015-06-15 19:06 UTC (permalink / raw)
  To: kbuild test robot, Gwendal Grignou
  Cc: kbuild-all, Lee Jones, Dmitry Torokhov, Samuel Ortiz, linux-kernel

Hello Fengguang,

Thanks a lot for your patch.

On 06/15/2015 03:39 PM, kbuild test robot wrote:
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>  cros_ec.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
> index 11b1884b..dd6f4ff 100644
> --- a/drivers/mfd/cros_ec.c
> +++ b/drivers/mfd/cros_ec.c
> @@ -27,7 +27,7 @@
>  #define CROS_EC_DEV_EC_INDEX 0
>  #define CROS_EC_DEV_PD_INDEX 1
>  
> -struct cros_ec_platform ec_p = {
> +static struct cros_ec_platform ec_p = {
>  	.ec_name = CROS_EC_DEV_NAME,
>  	.cmd_offset = EC_CMD_PASSTHRU_OFFSET(CROS_EC_DEV_EC_INDEX),
>  };
> @@ -37,13 +37,13 @@ struct cros_ec_platform pd_p = {
>  	.cmd_offset = EC_CMD_PASSTHRU_OFFSET(CROS_EC_DEV_PD_INDEX),
>  };

This can also be static

>  
> -struct mfd_cell ec_cell = {
> +static struct mfd_cell ec_cell = {
>  	.name = "cros-ec-ctl",
>  	.platform_data = &ec_p,
>  	.pdata_size = sizeof(ec_p),
>  };
>  
> -struct mfd_cell ec_pd_cell = {
> +static struct mfd_cell ec_pd_cell = {
>  	.name = "cros-ec-ctl",
>  	.platform_data = &pd_p,
>  	.pdata_size = sizeof(pd_p),
> 

These two should in fact be static const since mfd_add_devices()
expects a const struct mfd_cell * as third argument. I forgot on
my patch, sorry about that.

With these changes:

Acked-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier

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

end of thread, other threads:[~2015-06-15 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-15 13:39 [ljones-mfd:ib-mfd-i2c-input-chrome-4.2 8/10] drivers/mfd/cros_ec.c:30:25: sparse: symbol 'ec_p' was not declared. Should it be static? kbuild test robot
2015-06-15 13:39 ` [PATCH ljones-mfd] mfd: cros_ec:: ec_p can be static kbuild test robot
2015-06-15 19:06   ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).