linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
@ 2020-06-12  7:58 ` kernel test robot
  2020-06-12 12:20   ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-06-12  7:58 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: kbuild-all, linux-kernel, Jens Axboe, Christoph Hellwig

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

Hi Bartlomiej,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b791d1bdf9212d944d749a5c7ff6febdba241771
commit: 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd ata: expose ncq_enable_prio sysfs attribute only on NCQ capable hosts
date:   3 months ago
config: i386-randconfig-r011-20200612 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce (this is a W=1 build):
        git checkout 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from drivers/ata/ahci_platform.c:11:
include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.can_queue') [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.sdev_attrs') [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
--
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from drivers/ata/ahci_ceva.c:10:
include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.can_queue') [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.sdev_attrs') [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^

vim +/__ATA_BASE_SHT +1366 include/linux/libata.h

  1338	
  1339	/*
  1340	 * All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated
  1341	 * by the edge drivers.  Because the 'module' field of sht must be the
  1342	 * edge driver's module reference, otherwise the driver can be unloaded
  1343	 * even if the scsi_device is being accessed.
  1344	 */
  1345	#define __ATA_BASE_SHT(drv_name)				\
> 1346		.module			= THIS_MODULE,			\
  1347		.name			= drv_name,			\
  1348		.ioctl			= ata_scsi_ioctl,		\
  1349		ATA_SCSI_COMPAT_IOCTL					\
  1350		.queuecommand		= ata_scsi_queuecmd,		\
  1351		.can_queue		= ATA_DEF_QUEUE,		\
  1352		.tag_alloc_policy	= BLK_TAG_ALLOC_RR,		\
  1353		.this_id		= ATA_SHT_THIS_ID,		\
  1354		.emulated		= ATA_SHT_EMULATED,		\
  1355		.proc_name		= drv_name,			\
  1356		.slave_configure	= ata_scsi_slave_config,	\
  1357		.slave_destroy		= ata_scsi_slave_destroy,	\
  1358		.bios_param		= ata_std_bios_param,		\
  1359		.unlock_native_capacity	= ata_scsi_unlock_native_capacity
  1360	
  1361	#define ATA_BASE_SHT(drv_name)					\
  1362		__ATA_BASE_SHT(drv_name),				\
  1363		.sdev_attrs		= ata_common_sdev_attrs
  1364	
  1365	#define ATA_NCQ_SHT(drv_name)					\
> 1366		__ATA_BASE_SHT(drv_name),				\
  1367		.sdev_attrs		= ata_ncq_sdev_attrs,		\
  1368		.change_queue_depth	= ata_scsi_change_queue_depth
  1369	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

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

* Re: include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
  2020-06-12  7:58 ` include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT' kernel test robot
@ 2020-06-12 12:20   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-12 12:20 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel, Jens Axboe, Christoph Hellwig


On 6/12/20 9:58 AM, kernel test robot wrote:
> Hi Bartlomiej,

Hi,

> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   b791d1bdf9212d944d749a5c7ff6febdba241771
> commit: 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd ata: expose ncq_enable_prio sysfs attribute only on NCQ capable hosts
> date:   3 months ago
> config: i386-randconfig-r011-20200612 (attached as .config)
> compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> reproduce (this is a W=1 build):
>         git checkout 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd
>         # save the attached .config to linux build tree
>         make W=1 ARCH=i386 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
> 
> In file included from include/linux/linkage.h:7:0,
> from include/linux/kernel.h:8,
> from drivers/ata/ahci_platform.c:11:
> include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.can_queue') [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.sdev_attrs') [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> --
> In file included from include/linux/linkage.h:7:0,
> from include/linux/kernel.h:8,
> from drivers/ata/ahci_ceva.c:10:
> include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.can_queue') [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.sdev_attrs') [-Woverride-init]
> #define THIS_MODULE ((struct module *)0)
> ^
> include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
> .module   = THIS_MODULE,                    ^
>>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
> __ATA_BASE_SHT(drv_name),         ^
> drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
> ATA_NCQ_SHT(drv_name),           ^
> drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro 'AHCI_SHT'
> AHCI_SHT(DRV_NAME),
> ^
> 
> vim +/__ATA_BASE_SHT +1366 include/linux/libata.h
> 
>   1338	
>   1339	/*
>   1340	 * All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated
>   1341	 * by the edge drivers.  Because the 'module' field of sht must be the
>   1342	 * edge driver's module reference, otherwise the driver can be unloaded
>   1343	 * even if the scsi_device is being accessed.
>   1344	 */
>   1345	#define __ATA_BASE_SHT(drv_name)				\
>> 1346		.module			= THIS_MODULE,			\
>   1347		.name			= drv_name,			\
>   1348		.ioctl			= ata_scsi_ioctl,		\
>   1349		ATA_SCSI_COMPAT_IOCTL					\
>   1350		.queuecommand		= ata_scsi_queuecmd,		\
>   1351		.can_queue		= ATA_DEF_QUEUE,		\
>   1352		.tag_alloc_policy	= BLK_TAG_ALLOC_RR,		\
>   1353		.this_id		= ATA_SHT_THIS_ID,		\
>   1354		.emulated		= ATA_SHT_EMULATED,		\
>   1355		.proc_name		= drv_name,			\
>   1356		.slave_configure	= ata_scsi_slave_config,	\
>   1357		.slave_destroy		= ata_scsi_slave_destroy,	\
>   1358		.bios_param		= ata_std_bios_param,		\
>   1359		.unlock_native_capacity	= ata_scsi_unlock_native_capacity
>   1360	
>   1361	#define ATA_BASE_SHT(drv_name)					\
>   1362		__ATA_BASE_SHT(drv_name),				\
>   1363		.sdev_attrs		= ata_common_sdev_attrs
>   1364	
>   1365	#define ATA_NCQ_SHT(drv_name)					\
>> 1366		__ATA_BASE_SHT(drv_name),				\
>   1367		.sdev_attrs		= ata_ncq_sdev_attrs,		\
>   1368		.change_queue_depth	= ata_scsi_change_queue_depth
>   1369	
> 
The above warnings produced by gcc-4.9 are very misleading, gcc-5.4
(Ubuntu 5.4.0-6ubuntu1~16.04.11) produces much more descriptive ones:

  CC      drivers/ata/ahci_platform.o
In file included from drivers/ata/ahci_platform.c:21:0:
drivers/ata/ahci.h:384:16: warning: initialized field overwritten [-Woverride-init]
  .can_queue  = AHCI_MAX_CMDS,   \
                ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
drivers/ata/ahci.h:384:16: note: (near initialization for ‘ahci_platform_sht.can_queue’)
  .can_queue  = AHCI_MAX_CMDS,   \
                ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
drivers/ata/ahci.h:388:17: warning: initialized field overwritten [-Woverride-init]
  .sdev_attrs  = ahci_sdev_attrs
                 ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
drivers/ata/ahci.h:388:17: note: (near initialization for ‘ahci_platform_sht.sdev_attrs’)
  .sdev_attrs  = ahci_sdev_attrs
                 ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
  CC      drivers/ata/libahci.o
  CC      drivers/ata/libahci_platform.o
  CC      drivers/ata/sata_dwc_460ex.o
  CC      drivers/ata/ahci_ceva.o
In file included from drivers/ata/ahci_ceva.c:15:0:
drivers/ata/ahci.h:384:16: warning: initialized field overwritten [-Woverride-init]
  .can_queue  = AHCI_MAX_CMDS,   \
                ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
drivers/ata/ahci.h:384:16: note: (near initialization for ‘ahci_platform_sht.can_queue’)
  .can_queue  = AHCI_MAX_CMDS,   \
                ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
drivers/ata/ahci.h:388:17: warning: initialized field overwritten [-Woverride-init]
  .sdev_attrs  = ahci_sdev_attrs
                 ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^
drivers/ata/ahci.h:388:17: note: (near initialization for ‘ahci_platform_sht.sdev_attrs’)
  .sdev_attrs  = ahci_sdev_attrs
                 ^
drivers/ata/ahci_ceva.c:187:2: note: in expansion of macro ‘AHCI_SHT’
  AHCI_SHT(DRV_NAME),
  ^

Also it turns out that this is an old issue and not a regression
introduced by commit 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd
("ata: expose ncq_enable_prio sysfs attribute only on NCQ capable
hosts").

Anyway, it should be fixed by:

https://lore.kernel.org/linux-ide/0d803e72-b15e-4673-4858-4741f2772fc4@samsung.com/

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

* include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
@ 2020-05-20 18:31 kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-05-20 18:31 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: kbuild-all, linux-kernel, Jens Axboe, Christoph Hellwig

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   115a54162a6c0d0ef2aef25ebd0b61fc5e179ebe
commit: 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd ata: expose ncq_enable_prio sysfs attribute only on NCQ capable hosts
date:   8 weeks ago
config: i386-randconfig-a005-20200520 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce:
        git checkout 6f09eae3b5d974ef845e56690d6bc2b8f2a70acd
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from drivers/ata/ahci_platform.c:11:
include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.can_queue') [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: initialized field overwritten [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^
include/linux/export.h:19:30: warning: (near initialization for 'ahci_platform_sht.sdev_attrs') [-Woverride-init]
#define THIS_MODULE ((struct module *)0)
^
include/linux/libata.h:1346:14: note: in expansion of macro 'THIS_MODULE'
.module   = THIS_MODULE,                    ^
>> include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT'
__ATA_BASE_SHT(drv_name),         ^
drivers/ata/ahci.h:383:2: note: in expansion of macro 'ATA_NCQ_SHT'
ATA_NCQ_SHT(drv_name),           ^
drivers/ata/ahci_platform.c:40:2: note: in expansion of macro 'AHCI_SHT'
AHCI_SHT(DRV_NAME),
^

vim +/__ATA_BASE_SHT +1366 include/linux/libata.h

  1338	
  1339	/*
  1340	 * All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated
  1341	 * by the edge drivers.  Because the 'module' field of sht must be the
  1342	 * edge driver's module reference, otherwise the driver can be unloaded
  1343	 * even if the scsi_device is being accessed.
  1344	 */
  1345	#define __ATA_BASE_SHT(drv_name)				\
  1346		.module			= THIS_MODULE,			\
  1347		.name			= drv_name,			\
  1348		.ioctl			= ata_scsi_ioctl,		\
  1349		ATA_SCSI_COMPAT_IOCTL					\
  1350		.queuecommand		= ata_scsi_queuecmd,		\
  1351		.can_queue		= ATA_DEF_QUEUE,		\
  1352		.tag_alloc_policy	= BLK_TAG_ALLOC_RR,		\
  1353		.this_id		= ATA_SHT_THIS_ID,		\
  1354		.emulated		= ATA_SHT_EMULATED,		\
  1355		.proc_name		= drv_name,			\
  1356		.slave_configure	= ata_scsi_slave_config,	\
  1357		.slave_destroy		= ata_scsi_slave_destroy,	\
  1358		.bios_param		= ata_std_bios_param,		\
  1359		.unlock_native_capacity	= ata_scsi_unlock_native_capacity
  1360	
  1361	#define ATA_BASE_SHT(drv_name)					\
  1362		__ATA_BASE_SHT(drv_name),				\
  1363		.sdev_attrs		= ata_common_sdev_attrs
  1364	
  1365	#define ATA_NCQ_SHT(drv_name)					\
> 1366		__ATA_BASE_SHT(drv_name),				\
  1367		.sdev_attrs		= ata_ncq_sdev_attrs,		\
  1368		.change_queue_depth	= ata_scsi_change_queue_depth
  1369	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

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

end of thread, other threads:[~2020-06-12 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200612080537eucas1p241be7d826607e41fcc122003c8e63ad4@eucas1p2.samsung.com>
2020-06-12  7:58 ` include/linux/libata.h:1366:2: note: in expansion of macro '__ATA_BASE_SHT' kernel test robot
2020-06-12 12:20   ` Bartlomiej Zolnierkiewicz
2020-05-20 18:31 kbuild test robot

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).