[driver-core:driver_attr 8/11] drivers/pcmcia/ds.c:136:65: error: macro "DRIVER_ATTR_WO" passed 4 arguments, but takes just 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git driver_attr
head:   c50b7be3ac64d5322e8f84f2e78f2f4b518b36ef
commit: 9a7a2d0c98fd773bf315f298db91e01ffec8ac39 [8/11] pcmcia: ds: convert to use DRIVER_ATTR_RO
config: x86_64-randconfig-x019-201723 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 9a7a2d0c98fd773bf315f298db91e01ffec8ac39
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/pcmcia/ds.c:136:65: error: macro "DRIVER_ATTR_WO" passed 4 arguments, but takes just 1
    static DRIVER_ATTR_WO(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
                                                                    ^
>> drivers/pcmcia/ds.c:136:8: error: type defaults to 'int' in declaration of 'DRIVER_ATTR_WO' [-Werror=implicit-int]
    static DRIVER_ATTR_WO(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
           ^~~~~~~~~~~~~~
   drivers/pcmcia/ds.c: In function 'pcmcia_create_newid_file':
>> drivers/pcmcia/ds.c:156:42: error: 'driver_attr_new_id' undeclared (first use in this function)
      error = driver_create_file(&drv->drv, &driver_attr_new_id);
                                             ^~~~~~~~~~~~~~~~~~
   drivers/pcmcia/ds.c:156:42: note: each undeclared identifier is reported only once for each function it appears in
   drivers/pcmcia/ds.c: In function 'pcmcia_remove_newid_file':
   drivers/pcmcia/ds.c:163:33: error: 'driver_attr_new_id' undeclared (first use in this function)
     driver_remove_file(&drv->drv, &driver_attr_new_id);
                                    ^~~~~~~~~~~~~~~~~~
   At top level:
   drivers/pcmcia/ds.c:136:8: warning: 'DRIVER_ATTR_WO' defined but not used [-Wunused-variable]
    static DRIVER_ATTR_WO(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
           ^~~~~~~~~~~~~~
   drivers/pcmcia/ds.c:98:1: warning: 'new_id_store' defined but not used [-Wunused-function]
    new_id_store(struct device_driver *driver, const char *buf, size_t count)
    ^~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/DRIVER_ATTR_WO +136 drivers/pcmcia/ds.c

   130		retval = driver_attach(&pdrv->drv);
   131	
   132		if (retval)
   133			return retval;
   134		return count;
   135	}
 > 136	static DRIVER_ATTR_WO(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
   137	
   138	static void
   139	pcmcia_free_dynids(struct pcmcia_driver *drv)
   140	{
   141		struct pcmcia_dynid *dynid, *n;
   142	
   143		mutex_lock(&drv->dynids.lock);
   144		list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) {
   145			list_del(&dynid->node);
   146			kfree(dynid);
   147		}
   148		mutex_unlock(&drv->dynids.lock);
   149	}
   150	
   151	static int
   152	pcmcia_create_newid_file(struct pcmcia_driver *drv)
   153	{
   154		int error = 0;
   155		if (drv->probe != NULL)
 > 156			error = driver_create_file(&drv->drv, &driver_attr_new_id);
   157		return error;
   158	}
   159	

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux