mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v1] misc: apds990x: Use sysfs_match_string() helper
Date: Sat, 10 Jun 2017 15:09:03 +0800	[thread overview]
Message-ID: <201706101422.1pn3nfPZ%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170609120758.22008-1-andriy.shevchenko@linux.intel.com>

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

Hi Andy,

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on v4.12-rc4 next-20170609]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/misc-apds990x-Use-sysfs_match_string-helper/20170610-131929
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from include/linux/bitmap.h:8:0,
                    from include/linux/nodemask.h:94,
                    from include/linux/mmzone.h:16,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers//misc/apds990x.c:26:
   drivers//misc/apds990x.c: In function 'apds990x_prox_reporting_mode_store':
>> include/linux/string.h:155:36: warning: passing argument 1 of '__sysfs_match_string' from incompatible pointer type
    #define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
                                       ^
>> drivers//misc/apds990x.c:861:8: note: in expansion of macro 'sysfs_match_string'
     ret = sysfs_match_string(reporting_modes, buf);
           ^
   include/linux/string.h:146:5: note: expected 'const char * const*' but argument is of type 'const char (*)[9]'
    int __sysfs_match_string(const char * const *array, size_t n, const char *s);
        ^
--
   In file included from include/linux/bitmap.h:8:0,
                    from include/linux/nodemask.h:94,
                    from include/linux/mmzone.h:16,
                    from include/linux/gfp.h:5,
                    from include/linux/kmod.h:22,
                    from include/linux/module.h:13,
                    from drivers/misc/apds990x.c:26:
   drivers/misc/apds990x.c: In function 'apds990x_prox_reporting_mode_store':
>> include/linux/string.h:155:36: warning: passing argument 1 of '__sysfs_match_string' from incompatible pointer type
    #define sysfs_match_string(_a, _s) __sysfs_match_string(_a, ARRAY_SIZE(_a), _s)
                                       ^
   drivers/misc/apds990x.c:861:8: note: in expansion of macro 'sysfs_match_string'
     ret = sysfs_match_string(reporting_modes, buf);
           ^
   include/linux/string.h:146:5: note: expected 'const char * const*' but argument is of type 'const char (*)[9]'
    int __sysfs_match_string(const char * const *array, size_t n, const char *s);
        ^

vim +/sysfs_match_string +861 drivers//misc/apds990x.c

   845	
   846	static ssize_t apds990x_prox_reporting_mode_show(struct device *dev,
   847					   struct device_attribute *attr, char *buf)
   848	{
   849		struct apds990x_chip *chip =  dev_get_drvdata(dev);
   850		return sprintf(buf, "%s\n",
   851			reporting_modes[!!chip->prox_continuous_mode]);
   852	}
   853	
   854	static ssize_t apds990x_prox_reporting_mode_store(struct device *dev,
   855					  struct device_attribute *attr,
   856					  const char *buf, size_t len)
   857	{
   858		struct apds990x_chip *chip =  dev_get_drvdata(dev);
   859		int ret;
   860	
 > 861		ret = sysfs_match_string(reporting_modes, buf);
   862		if (ret < 0)
   863			return ret;
   864	
   865		chip->prox_continuous_mode = ret;
   866		return len;
   867	}
   868	
   869	static DEVICE_ATTR(prox0_reporting_mode, S_IRUGO | S_IWUSR,

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41175 bytes --]

  reply	other threads:[~2017-06-10  7:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 12:07 Andy Shevchenko
2017-06-10  7:09 ` kbuild test robot [this message]
2017-06-10  7:17 ` kbuild test robot
2017-06-11  7:47 ` Greg Kroah-Hartman
2017-06-11  8:57   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201706101422.1pn3nfPZ%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®