lkml.org 
[lkml]   [2021]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[bvanassche:scsi-sysfs 9/53] include/linux/libata.h:1421:35: warning: initialized field overwritten
tree:   https://github.com/bvanassche/linux scsi-sysfs
head: 5fd80e4ce1f3a99c29cab3f6cb1536c7c68b21aa
commit: e65e65ede3d9ba7a93337352ba5e16a45281a0ca [9/53] ata
config: parisc-randconfig-r016-20211001 (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/bvanassche/linux/commit/e65e65ede3d9ba7a93337352ba5e16a45281a0ca
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-sysfs
git checkout e65e65ede3d9ba7a93337352ba5e16a45281a0ca
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc

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

In file included from drivers/ata/sata_inic162x.c:58:
include/linux/libata.h:1421:10: error: 'struct scsi_host_template' has no member named 'sdev_attr_groups'; did you mean 'shost_attr_groups'?
1421 | .sdev_attr_groups = ata_common_sdev_attr_groups
| ^~~~~~~~~~~~~~~~
drivers/ata/sata_inic162x.c:246:9: note: in expansion of macro 'ATA_BASE_SHT'
246 | ATA_BASE_SHT(DRV_NAME),
| ^~~~~~~~~~~~
include/linux/libata.h:1421:35: error: initialization of 'void (*)(struct scsi_device *)' from incompatible pointer type 'const struct attribute_group **' [-Werror=incompatible-pointer-types]
1421 | .sdev_attr_groups = ata_common_sdev_attr_groups
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/sata_inic162x.c:246:9: note: in expansion of macro 'ATA_BASE_SHT'
246 | ATA_BASE_SHT(DRV_NAME),
| ^~~~~~~~~~~~
include/linux/libata.h:1421:35: note: (near initialization for 'inic_sht.slave_destroy')
1421 | .sdev_attr_groups = ata_common_sdev_attr_groups
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/sata_inic162x.c:246:9: note: in expansion of macro 'ATA_BASE_SHT'
246 | ATA_BASE_SHT(DRV_NAME),
| ^~~~~~~~~~~~
>> include/linux/libata.h:1421:35: warning: initialized field overwritten [-Woverride-init]
1421 | .sdev_attr_groups = ata_common_sdev_attr_groups
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/sata_inic162x.c:246:9: note: in expansion of macro 'ATA_BASE_SHT'
246 | ATA_BASE_SHT(DRV_NAME),
| ^~~~~~~~~~~~
include/linux/libata.h:1421:35: note: (near initialization for 'inic_sht.slave_destroy')
1421 | .sdev_attr_groups = ata_common_sdev_attr_groups
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/sata_inic162x.c:246:9: note: in expansion of macro 'ATA_BASE_SHT'
246 | ATA_BASE_SHT(DRV_NAME),
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +1421 include/linux/libata.h

1392
1393 /*
1394 * All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated
1395 * by the edge drivers. Because the 'module' field of sht must be the
1396 * edge driver's module reference, otherwise the driver can be unloaded
1397 * even if the scsi_device is being accessed.
1398 */
1399 #define __ATA_BASE_SHT(drv_name) \
1400 .module = THIS_MODULE, \
1401 .name = drv_name, \
1402 .ioctl = ata_scsi_ioctl, \
1403 ATA_SCSI_COMPAT_IOCTL \
1404 .queuecommand = ata_scsi_queuecmd, \
1405 .dma_need_drain = ata_scsi_dma_need_drain, \
1406 .this_id = ATA_SHT_THIS_ID, \
1407 .emulated = ATA_SHT_EMULATED, \
1408 .proc_name = drv_name, \
1409 .slave_destroy = ata_scsi_slave_destroy, \
1410 .bios_param = ata_std_bios_param, \
1411 .unlock_native_capacity = ata_scsi_unlock_native_capacity
1412
1413 #define ATA_SUBBASE_SHT(drv_name) \
1414 __ATA_BASE_SHT(drv_name), \
1415 .can_queue = ATA_DEF_QUEUE, \
1416 .tag_alloc_policy = BLK_TAG_ALLOC_RR, \
1417 .slave_configure = ata_scsi_slave_config
1418
1419 #define ATA_BASE_SHT(drv_name) \
1420 ATA_SUBBASE_SHT(drv_name), \
> 1421 .sdev_attr_groups = ata_common_sdev_attr_groups
1422

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-10-01 11:15    [W:0.037 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site