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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 14 Oct 2017 23:15:24 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Bhumika Goyal <bhumirks@...il.com>
Cc:     kbuild-all@...org, julia.lawall@...6.fr, jic23@...nel.org,
        knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bhumika Goyal <bhumirks@...il.com>
Subject: Re: [PATCH] iio: make config_item_type const

Hi Bhumika,

[auto build test WARNING on iio/togreg]
[also build test WARNING on v4.14-rc4 next-20171013]
[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/Bhumika-Goyal/iio-make-config_item_type-const/20171014-213401
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-randconfig-x018-201741 (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=x86_64 

All warnings (new ones prefixed by >>):

   drivers//iio/trigger/iio-trig-hrtimer.c: In function 'iio_trig_hrtimer_probe':
>> drivers//iio/trigger/iio-trig-hrtimer.c:149:54: warning: passing argument 3 of 'iio_swt_group_init_type_name' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     iio_swt_group_init_type_name(&trig_info->swt, name, &iio_hrtimer_type);
                                                         ^
   In file included from drivers//iio/trigger/iio-trig-hrtimer.c:21:0:
   include/linux/iio/sw_trigger.h:61:6: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    void iio_swt_group_init_type_name(struct iio_sw_trigger *t,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
   Cyclomatic Complexity 1 include/linux/kernel.h:kstrtoul
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 5 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 include/linux/hrtimer.h:hrtimer_start
   Cyclomatic Complexity 1 include/linux/hrtimer.h:hrtimer_forward_now
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 2 include/linux/iio/trigger.h:to_iio_trigger
   Cyclomatic Complexity 1 include/linux/iio/trigger.h:iio_trigger_set_drvdata
   Cyclomatic Complexity 1 include/linux/iio/trigger.h:iio_trigger_get_drvdata
   Cyclomatic Complexity 1 include/linux/iio/sw_trigger.h:iio_swt_group_init_type_name
   Cyclomatic Complexity 3 drivers//iio/trigger/iio-trig-hrtimer.c:iio_hrtimer_store_sampling_frequency
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-hrtimer.c:iio_trig_hrtimer_init
   Cyclomatic Complexity 2 drivers//iio/trigger/iio-trig-hrtimer.c:iio_trig_hrtimer_set_state
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-hrtimer.c:iio_trig_hrtimer_remove
   Cyclomatic Complexity 4 drivers//iio/trigger/iio-trig-hrtimer.c:iio_trig_hrtimer_probe
   Cyclomatic Complexity 2 drivers//iio/trigger/iio-trig-hrtimer.c:iio_hrtimer_trig_handler
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-hrtimer.c:iio_hrtimer_show_sampling_frequency
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-hrtimer.c:iio_trig_hrtimer_exit
--
   drivers//iio/trigger/iio-trig-loop.c: In function 'iio_trig_loop_probe':
>> drivers//iio/trigger/iio-trig-loop.c:101:54: warning: passing argument 3 of 'iio_swt_group_init_type_name' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     iio_swt_group_init_type_name(&trig_info->swt, name, &iio_loop_type);
                                                         ^
   In file included from drivers//iio/trigger/iio-trig-loop.c:32:0:
   include/linux/iio/sw_trigger.h:61:6: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    void iio_swt_group_init_type_name(struct iio_sw_trigger *t,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 5 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 include/linux/iio/trigger.h:iio_trigger_set_drvdata
   Cyclomatic Complexity 1 include/linux/iio/trigger.h:iio_trigger_get_drvdata
   Cyclomatic Complexity 1 include/linux/iio/sw_trigger.h:iio_swt_group_init_type_name
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-loop.c:iio_trig_loop_init
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-loop.c:iio_trig_loop_remove
   Cyclomatic Complexity 4 drivers//iio/trigger/iio-trig-loop.c:iio_trig_loop_probe
   Cyclomatic Complexity 4 drivers//iio/trigger/iio-trig-loop.c:iio_loop_trigger_set_state
   Cyclomatic Complexity 2 drivers//iio/trigger/iio-trig-loop.c:iio_loop_thread
   Cyclomatic Complexity 1 drivers//iio/trigger/iio-trig-loop.c:iio_trig_loop_exit
--
>> drivers/iio/industrialio-configfs.c:28:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
       .ci_type = &iio_root_group_type,
                  ^
   Cyclomatic Complexity 1 drivers/iio/industrialio-configfs.c:iio_configfs_init
   Cyclomatic Complexity 1 drivers/iio/industrialio-configfs.c:iio_configfs_exit
--
   drivers/iio/industrialio-sw-device.c: In function 'iio_register_sw_device_type':
>> drivers/iio/industrialio-sw-device.c:63:7: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          &iio_device_type_group_type);
          ^
   In file included from include/linux/iio/sw_device.h:17:0,
                    from drivers/iio/industrialio-sw-device.c:17:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/industrialio-sw-device.c: In function 'iio_sw_device_init':
   drivers/iio/industrialio-sw-device.c:169:7: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          &iio_devices_group_type);
          ^
   In file included from include/linux/iio/sw_device.h:17:0,
                    from drivers/iio/industrialio-sw-device.c:17:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
   Cyclomatic Complexity 1 include/linux/list.h:__list_del_entry_valid
   Cyclomatic Complexity 2 include/linux/list.h:__list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_add_tail
   Cyclomatic Complexity 1 include/linux/list.h:__list_del
   Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
   Cyclomatic Complexity 1 include/linux/list.h:list_del
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 1 include/linux/err.h:ERR_CAST
   Cyclomatic Complexity 2 include/linux/err.h:PTR_ERR_OR_ZERO
   Cyclomatic Complexity 1 include/linux/module.h:try_module_get
   Cyclomatic Complexity 1 include/linux/module.h:module_put
   Cyclomatic Complexity 3 include/linux/configfs.h:to_config_group
   Cyclomatic Complexity 2 include/linux/iio/sw_device.h:to_iio_sw_device
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-device.c:iio_sw_device_init
   Cyclomatic Complexity 5 drivers/iio/industrialio-sw-device.c:__iio_find_sw_device_type
   Cyclomatic Complexity 3 drivers/iio/industrialio-sw-device.c:iio_get_sw_device_type
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-device.c:iio_sw_device_exit
   Cyclomatic Complexity 4 drivers/iio/industrialio-sw-device.c:iio_register_sw_device_type
   Cyclomatic Complexity 2 drivers/iio/industrialio-sw-device.c:iio_unregister_sw_device_type
   Cyclomatic Complexity 3 drivers/iio/industrialio-sw-device.c:iio_sw_device_create
   Cyclomatic Complexity 2 drivers/iio/industrialio-sw-device.c:device_make_group
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-device.c:iio_sw_device_destroy
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-device.c:device_drop_group
--
   drivers/iio/industrialio-sw-trigger.c: In function 'iio_register_sw_trigger_type':
>> drivers/iio/industrialio-sw-trigger.c:63:7: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          &iio_trigger_type_group_type);
          ^
   In file included from include/linux/iio/sw_trigger.h:17:0,
                    from drivers/iio/industrialio-sw-trigger.c:17:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/industrialio-sw-trigger.c: In function 'iio_sw_trigger_init':
   drivers/iio/industrialio-sw-trigger.c:169:7: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          &iio_triggers_group_type);
          ^
   In file included from include/linux/iio/sw_trigger.h:17:0,
                    from drivers/iio/industrialio-sw-trigger.c:17:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
   Cyclomatic Complexity 1 include/linux/list.h:__list_del_entry_valid
   Cyclomatic Complexity 2 include/linux/list.h:__list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_add_tail
   Cyclomatic Complexity 1 include/linux/list.h:__list_del
   Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
   Cyclomatic Complexity 1 include/linux/list.h:list_del
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 1 include/linux/err.h:ERR_CAST
   Cyclomatic Complexity 2 include/linux/err.h:PTR_ERR_OR_ZERO
   Cyclomatic Complexity 1 include/linux/module.h:try_module_get
   Cyclomatic Complexity 1 include/linux/module.h:module_put
   Cyclomatic Complexity 3 include/linux/configfs.h:to_config_group
   Cyclomatic Complexity 2 include/linux/iio/sw_trigger.h:to_iio_sw_trigger
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-trigger.c:iio_sw_trigger_init
   Cyclomatic Complexity 5 drivers/iio/industrialio-sw-trigger.c:__iio_find_sw_trigger_type
   Cyclomatic Complexity 3 drivers/iio/industrialio-sw-trigger.c:iio_get_sw_trigger_type
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-trigger.c:iio_sw_trigger_exit
   Cyclomatic Complexity 4 drivers/iio/industrialio-sw-trigger.c:iio_register_sw_trigger_type
   Cyclomatic Complexity 2 drivers/iio/industrialio-sw-trigger.c:iio_unregister_sw_trigger_type
   Cyclomatic Complexity 3 drivers/iio/industrialio-sw-trigger.c:iio_sw_trigger_create
   Cyclomatic Complexity 2 drivers/iio/industrialio-sw-trigger.c:trigger_make_group
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-trigger.c:iio_sw_trigger_destroy
   Cyclomatic Complexity 1 drivers/iio/industrialio-sw-trigger.c:trigger_drop_group

vim +/const +28 drivers/iio/industrialio-configfs.c

8261d961 Daniel Baluta 2015-11-09  23  
8261d961 Daniel Baluta 2015-11-09  24  struct configfs_subsystem iio_configfs_subsys = {
8261d961 Daniel Baluta 2015-11-09  25  	.su_group = {
8261d961 Daniel Baluta 2015-11-09  26  		.cg_item = {
8261d961 Daniel Baluta 2015-11-09  27  			.ci_namebuf = "iio",
8261d961 Daniel Baluta 2015-11-09 @28  			.ci_type = &iio_root_group_type,
8261d961 Daniel Baluta 2015-11-09  29  		},
8261d961 Daniel Baluta 2015-11-09  30  	},
8261d961 Daniel Baluta 2015-11-09  31  	.su_mutex = __MUTEX_INITIALIZER(iio_configfs_subsys.su_mutex),
8261d961 Daniel Baluta 2015-11-09  32  };
8261d961 Daniel Baluta 2015-11-09  33  EXPORT_SYMBOL(iio_configfs_subsys);
8261d961 Daniel Baluta 2015-11-09  34  

:::::: The code at line 28 was first introduced by commit
:::::: 8261d961d1f397925d7a470864c14663d01ed714 iio: core: Introduce IIO configfs support

:::::: TO: Daniel Baluta <daniel.baluta@...el.com>
:::::: CC: Jonathan Cameron <jic23@...nel.org>

---
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" (32016 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ