lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 25 Dec 2016 15:51:59 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Venkat Prashanth B U <venkat.prashanth2498@...il.com>
Cc:     kbuild-all@...org, alexandre.belloni@...e-electrons.com,
        manabian@...il.com, a.zummo@...ertech.it,
        rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org,
        Venkat Prashanth B U <venkat.prashanth2498@...il.com>
Subject: Re: [PATCH] rtc: add support for rtc NXP pca21125 and pca8565

Hi Venkat,

[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on v4.9 next-20161224]
[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/Venkat-Prashanth-B-U/rtc-add-support-for-rtc-NXP-pca21125-and-pca8565/20161225-150140
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: i386-randconfig-x016-201652 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   drivers/rtc/rtc-pcf8563.c: In function 'pca21125_probe':
>> drivers/rtc/rtc-pcf8563.c:666:32: warning: passing argument 1 of '__devm_regmap_init_spi' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     regmap = devm_regmap_init_spi(spi, &config);
                                   ^
   include/linux/regmap.h:505:6: note: in definition of macro '__regmap_lockdep_wrapper'
      fn(__VA_ARGS__, &_key,     \
         ^~~~~~~~~~~
>> drivers/rtc/rtc-pcf8563.c:666:11: note: in expansion of macro 'devm_regmap_init_spi'
     regmap = devm_regmap_init_spi(spi, &config);
              ^~~~~~~~~~~~~~~~~~~~
   include/linux/regmap.h:470:16: note: expected 'struct spi_device *' but argument is of type 'const struct spi_device *'
    struct regmap *__devm_regmap_init_spi(struct spi_device *dev,
                   ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/rtc/rtc-pcf8563.c:674:12: error: assignment of member 'mode' in read-only object
     spi->mode = SPI_MODE_3;
               ^
>> drivers/rtc/rtc-pcf8563.c:675:21: error: assignment of member 'bits_per_word' in read-only object
     spi->bits_per_word = 8;
                        ^
>> drivers/rtc/rtc-pcf8563.c:676:12: warning: passing argument 1 of 'spi_setup' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     spi_setup(spi);
               ^~~
   In file included from drivers/rtc/rtc-pcf8563.c:25:0:
   include/linux/spi/spi.h:905:12: note: expected 'struct spi_device *' but argument is of type 'const struct spi_device *'
    extern int spi_setup(struct spi_device *spi);
               ^~~~~~~~~
>> drivers/rtc/rtc-pcf8563.c:678:20: warning: passing argument 1 of 'regmap_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_read(regmap, PCF8563_REG_SC, &tmp);
                       ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:758:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
        ^~~~~~~~~~~
   drivers/rtc/rtc-pcf8563.c:682:20: warning: passing argument 1 of 'regmap_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_read(regmap, PCF8563_REG_CLKO, &tmp);
                       ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:758:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
        ^~~~~~~~~~~
>> drivers/rtc/rtc-pcf8563.c:687:21: warning: passing argument 1 of 'regmap_write' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_write(regmap, PCF8563_REG_CLKO, tmp & 0x1c);
                        ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:745:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
        ^~~~~~~~~~~~
   drivers/rtc/rtc-pcf8563.c:692:20: warning: passing argument 1 of 'regmap_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_read(regmap, PCF8563_REG_SR, &tmp);
                       ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:758:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
        ^~~~~~~~~~~
   drivers/rtc/rtc-pcf8563.c:697:21: warning: passing argument 1 of 'regmap_write' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_write(regmap, PCF8563_REG_SR, tmp & 0x88);
                        ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:745:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
        ^~~~~~~~~~~~
   drivers/rtc/rtc-pcf8563.c:703:20: warning: passing argument 1 of 'regmap_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_read(regmap, PCF8563_REG_CLKO, &tmp);
                       ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:758:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
        ^~~~~~~~~~~
   drivers/rtc/rtc-pcf8563.c:709:20: warning: passing argument 1 of 'regmap_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     res = regmap_read(regmap, PCF8563_REG_SR, &tmp);
                       ^~~~~~
   In file included from drivers/rtc/rtc-pcf8563.c:26:0:
   include/linux/regmap.h:758:5: note: expected 'struct regmap *' but argument is of type 'const struct regmap *'
    int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
        ^~~~~~~~~~~
>> drivers/rtc/rtc-pcf8563.c:716:42: warning: passing argument 1 of 'devm_rtc_device_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     pcf8563->rtc = devm_rtc_device_register(&spi->dev,
                                             ^
   In file included from drivers/rtc/rtc-pcf8563.c:20:0:
   include/linux/rtc.h:163:27: note: expected 'struct device *' but argument is of type 'const struct device *'
    extern struct rtc_device *devm_rtc_device_register(struct device *dev,
                              ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/rtc/rtc-pcf8563.c:716:15: error: assignment of member 'rtc' in read-only object
     pcf8563->rtc = devm_rtc_device_register(&spi->dev,
                  ^
   drivers/rtc/rtc-pcf8563.c: At top level:
>> drivers/rtc/rtc-pcf8563.c:726:1: error: expected expression before 'static'
    static struct i2c_driver pcf8563_driver = {
    ^~~~~~
>> drivers/rtc/rtc-pcf8563.c:726:1: warning: excess elements in struct initializer
   drivers/rtc/rtc-pcf8563.c:726:1: note: (near initialization for 'pca21125_driver')
>> drivers/rtc/rtc-pcf8563.c:652:0: error: unterminated #if
    #if IS_ENABLED(CONFIG_SPI_MASTER)
    
   drivers/rtc/rtc-pcf8563.c:654:12: warning: 'pca21125_probe' defined but not used [-Wunused-function]
    static int pca21125_probe(const struct spi_device *spi)
               ^~~~~~~~~~~~~~
   drivers/rtc/rtc-pcf8563.c:566:12: warning: 'pcf8563_probe' defined but not used [-Wunused-function]
    static int pcf8563_probe(struct i2c_client *client,
               ^~~~~~~~~~~~~

vim +/mode +674 drivers/rtc/rtc-pcf8563.c

   646		{ .compatible = "nxp,pca8565" },
   647		{}
   648	};
   649	MODULE_DEVICE_TABLE(of, pcf8563_of_match);
   650	#endif
   651	
 > 652	#if IS_ENABLED(CONFIG_SPI_MASTER)
   653	
   654	static int pca21125_probe(const struct spi_device *spi)
   655	{
   656		int res;
   657		unsigned int tmp;
   658		static const struct regmap_config config = {
   659					.reg_bits = 8,
   660					.val_bits = 8,
   661					.write_flag_mask = 0x80,
   662			};
   663	const struct regmap *regmap;
   664	const struct pcf8563 *pcf8563;
   665	
 > 666		regmap = devm_regmap_init_spi(spi, &config);
   667	
   668				if (IS_ERR(regmap)) {
   669					dev_err(&spi->dev, "%s: regmap allocation failed: %ld\n",
   670						__func__, PTR_ERR(regmap));
   671					return PTR_ERR(regmap);
   672			}
   673	
 > 674		spi->mode = SPI_MODE_3;
 > 675		spi->bits_per_word = 8;
 > 676		spi_setup(spi);
   677	
 > 678		res = regmap_read(regmap, PCF8563_REG_SC, &tmp);
   679	
   680		if (res)
   681			return res;
 > 682		res = regmap_read(regmap, PCF8563_REG_CLKO, &tmp);
   683	
   684		if (res)
   685			return res;
   686	
 > 687		res = regmap_write(regmap, PCF8563_REG_CLKO, tmp & 0x1c);
   688	
   689		if (res)
   690			return res;
   691	
   692		res = regmap_read(regmap, PCF8563_REG_SR, &tmp);
   693	
   694		if (res)
   695			return res;
   696	
   697		res = regmap_write(regmap, PCF8563_REG_SR, tmp & 0x88);
   698	
   699		if (res)
   700			return res;
   701	
   702	       /* Print our settings */
   703		res = regmap_read(regmap, PCF8563_REG_CLKO, &tmp);
   704	
   705		if (res)
   706			return res;
   707	
   708		dev_info(&spi->dev, "Control Reg: 0x%02x\n", tmp);
 > 709		res = regmap_read(regmap, PCF8563_REG_SR, &tmp);
   710	
   711		if (res)
   712			return res;
   713	
   714		dev_info(&spi->dev, "Ctrl/Stat Reg: 0x%02x\n", tmp);
   715	
 > 716		pcf8563->rtc = devm_rtc_device_register(&spi->dev,
   717									"pcf8563",
   718							&pcf8563_rtc_ops, THIS_MODULE);
   719	}
   720	
   721	const struct spi_driver pca21125_driver = {
   722			.driver = {
   723					.name    = "pca21125",
   724			},
   725	
 > 726	static struct i2c_driver pcf8563_driver = {
   727		.driver		= {
   728			.name	= "rtc-pcf8563",
   729			.of_match_table = of_match_ptr(pcf8563_of_match),

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

Download attachment ".config.gz" of type "application/gzip" (25471 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ