[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201807171029.I5sfmdnj%fengguang.wu@intel.com>
Date: Tue, 17 Jul 2018 10:37:32 +0800
From: kbuild test robot <lkp@...el.com>
To: Alexander Sverdlin <alexander.sverdlin@...ia.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 238/243] drivers/net/phy/mdio-thunder.c:40:8:
error: implicit declaration of function 'pcim_enable_device'; did you mean
'pci_enable_device'?
Hi Alexander,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: ccdb51717ba3bdc9585998e4ffd41d70c04dedea
commit: 7e2bc7fb65d544bb8598a0ab64e40ee9c60ded6e [238/243] net: cavium: Drop dependency of NET_VENDOR_CAVIUM on PCI
config: um-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
git checkout 7e2bc7fb65d544bb8598a0ab64e40ee9c60ded6e
# save the attached .config to linux build tree
make ARCH=um
All error/warnings (new ones prefixed by >>):
drivers/net/phy/mdio-thunder.c: In function 'thunder_mdiobus_pci_probe':
>> drivers/net/phy/mdio-thunder.c:40:8: error: implicit declaration of function 'pcim_enable_device'; did you mean 'pci_enable_device'? [-Werror=implicit-function-declaration]
err = pcim_enable_device(pdev);
^~~~~~~~~~~~~~~~~~
pci_enable_device
drivers/net/phy/mdio-thunder.c: At top level:
>> drivers/net/phy/mdio-thunder.c:151:1: warning: data definition has no type or storage class
module_pci_driver(thunder_mdiobus_driver);
^~~~~~~~~~~~~~~~~
>> drivers/net/phy/mdio-thunder.c:151:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
>> drivers/net/phy/mdio-thunder.c:151:1: warning: parameter names (without types) in function declaration
drivers/net/phy/mdio-thunder.c:144:26: warning: 'thunder_mdiobus_driver' defined but not used [-Wunused-variable]
static struct pci_driver thunder_mdiobus_driver = {
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/cavium/liquidio/lio_main.c:31:0:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
pci_release_region(oct->pci_dev, baridx * 2);
^~~~~~~~~~~~~~~~~~
pci_release_regions
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_map_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:111:6: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) {
^~~~~~~~~~~~~~~~~~
pci_request_regions
drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'stop_pci_io':
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:332:3: error: implicit declaration of function 'pci_disable_msi'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
pci_disable_msi(oct->pci_dev);
^~~~~~~~~~~~~~~
pci_disable_sriov
drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_pci_flr':
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:983:2: error: implicit declaration of function 'pci_cfg_access_lock'; did you mean '__access_ok'? [-Werror=implicit-function-declaration]
pci_cfg_access_lock(oct->pci_dev);
^~~~~~~~~~~~~~~~~~~
__access_ok
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:989:7: error: implicit declaration of function '__pci_reset_function_locked' [-Werror=implicit-function-declaration]
rc = __pci_reset_function_locked(oct->pci_dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:995:2: error: implicit declaration of function 'pci_cfg_access_unlock'; did you mean '__access_ok'? [-Werror=implicit-function-declaration]
pci_cfg_access_unlock(oct->pci_dev);
^~~~~~~~~~~~~~~~~~~~~
__access_ok
drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_destroy_resources':
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:1063:20: error: invalid use of undefined type 'struct msix_entry'
msix_entries[i].vector,
^
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:1063:20: error: dereferencing pointer to incomplete type 'struct msix_entry'
drivers/net/ethernet/cavium/liquidio/lio_main.c:1065:27: error: invalid use of undefined type 'struct msix_entry'
free_irq(msix_entries[i].vector,
^
drivers/net/ethernet/cavium/liquidio/lio_main.c:1071:25: error: invalid use of undefined type 'struct msix_entry'
free_irq(msix_entries[i].vector, oct);
^
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:1073:4: error: implicit declaration of function 'pci_disable_msix'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
pci_disable_msix(oct->pci_dev);
^~~~~~~~~~~~~~~~
pci_disable_sriov
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:1164:3: error: implicit declaration of function 'pci_clear_master'; did you mean 'pci_set_master'? [-Werror=implicit-function-declaration]
pci_clear_master(oct->pci_dev);
^~~~~~~~~~~~~~~~
pci_set_master
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:26:0:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
pci_release_region(oct->pci_dev, baridx * 2);
^~~~~~~~~~~~~~~~~~
pci_release_regions
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_map_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:111:6: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) {
^~~~~~~~~~~~~~~~~~
pci_request_regions
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_set
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec_and_test
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_set
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec_and_test
Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit
Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:clear_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
Cyclomatic Complexity 1 arch/x86/include/uapi/asm/swab.h:__arch_swab32
Cyclomatic Complexity 1 arch/x86/include/uapi/asm/swab.h:__arch_swab64
Cyclomatic Complexity 1 include/uapi/linux/swab.h:__fswab32
Cyclomatic Complexity 1 include/uapi/linux/swab.h:__fswab64
Cyclomatic Complexity 2 include/uapi/linux/swab.h:__swab64p
Cyclomatic Complexity 1 include/uapi/linux/swab.h:__swab64s
Cyclomatic Complexity 1 include/linux/jump_label.h:static_key_count
Cyclomatic Complexity 2 include/linux/jump_label.h:static_key_false
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 1 arch/um/include/shared/mem.h:to_phys
Cyclomatic Complexity 1 arch/um/include/shared/mem.h:to_virt
Cyclomatic Complexity 1 include/linux/bottom_half.h:local_bh_disable
Cyclomatic Complexity 1 include/linux/bottom_half.h:local_bh_enable
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
Cyclomatic Complexity 1 include/linux/jiffies.h:_msecs_to_jiffies
Cyclomatic Complexity 3 include/linux/jiffies.h:msecs_to_jiffies
Cyclomatic Complexity 1 include/linux/workqueue.h:queue_delayed_work
Cyclomatic Complexity 1 include/linux/workqueue.h:schedule_delayed_work
Cyclomatic Complexity 1 include/linux/completion.h:__init_completion
Cyclomatic Complexity 2 include/linux/page-flags.h:compound_head
Cyclomatic Complexity 1 include/linux/page_ref.h:page_ref_count
Cyclomatic Complexity 2 include/linux/page_ref.h:page_ref_dec_and_test
Cyclomatic Complexity 1 include/linux/mm.h:put_page_testzero
Cyclomatic Complexity 1 include/linux/mm.h:put_devmap_managed_page
Cyclomatic Complexity 3 include/linux/mm.h:put_page
Cyclomatic Complexity 1 include/linux/mm.h:lowmem_page_address
Cyclomatic Complexity 1 include/linux/dma-mapping.h:valid_dma_direction
Cyclomatic Complexity 1 include/linux/dma-mapping.h:get_dma_ops
Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_map_single_attrs
Cyclomatic Complexity 2 include/linux/dma-mapping.h:dma_unmap_single_attrs
Cyclomatic Complexity 2 include/linux/dma-mapping.h:dma_mapping_error
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_end_pointer
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_copy_to_linear_data
Cyclomatic Complexity 1 include/linux/netdevice.h:netdev_get_tx_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netdev_priv
Cyclomatic Complexity 1 include/linux/netdevice.h:netdev_notifier_info_to_dev
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_tx_start_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_start_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_wake_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_tx_stop_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_stop_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_tx_queue_stopped
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_queue_stopped
Cyclomatic Complexity 1 include/linux/netdevice.h:dev_kfree_skb_any
Cyclomatic Complexity 1 include/linux/netdevice.h:__netif_tx_lock
Cyclomatic Complexity 1 include/linux/netdevice.h:__netif_tx_unlock
Cyclomatic Complexity 2 include/linux/netdevice.h:netif_trans_update
Cyclomatic Complexity 2 include/linux/netdevice.h:netif_tx_disable
Cyclomatic Complexity 1 include/linux/etherdevice.h:eth_random_addr
Cyclomatic Complexity 1 include/linux/etherdevice.h:eth_hw_addr_random
Cyclomatic Complexity 1 include/linux/etherdevice.h:ether_addr_copy
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/octeon_droq.h:octeon_free_recv_info
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/octeon_nic.h:octnet_iq_is_full
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/octeon_main.h:octeon_swap_8B_data
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/octeon_network.h:recv_buffer_free
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_tx_timeout
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_get_stats64
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_get_ndev
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_attr_get
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_copy_packet
Cyclomatic Complexity 6 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_pkt_recv
Cyclomatic Complexity 9 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_pkt_xmit
Cyclomatic Complexity 6 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_send_soft_command
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_fetch_stats
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_stop
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_packet_sent_callback
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_send_sc_complete
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_change_mtu
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_phys_port_name
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_open
Cyclomatic Complexity 5 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_netdev_event
Cyclomatic Complexity 9 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_create
Cyclomatic Complexity 5 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_destroy
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_modinit
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c:lio_vf_rep_modexit
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:27:0:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
pci_release_region(oct->pci_dev, baridx * 2);
^~~~~~~~~~~~~~~~~~
pci_release_regions
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_map_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:111:6: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) {
^~~~~~~~~~~~~~~~~~
pci_request_regions
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function 'lio_irq_reallocate_irqs':
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:562:39: error: invalid use of undefined type 'struct msix_entry'
irq_set_affinity_hint(msix_entries[i].vector,
^
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:562:39: error: dereferencing pointer to incomplete type 'struct msix_entry'
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:564:26: error: invalid use of undefined type 'struct msix_entry'
free_irq(msix_entries[i].vector,
^
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:572:25: error: invalid use of undefined type 'struct msix_entry'
free_irq(msix_entries[i].vector, oct);
^
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:574:3: error: implicit declaration of function 'pci_disable_msix'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
pci_disable_msix(oct->pci_dev);
^~~~~~~~~~~~~~~~
pci_disable_sriov
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/cavium/liquidio/lio_core.c:26:0:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
pci_release_region(oct->pci_dev, baridx * 2);
^~~~~~~~~~~~~~~~~~
pci_release_regions
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_map_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:111:6: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) {
^~~~~~~~~~~~~~~~~~
pci_request_regions
drivers/net/ethernet/cavium/liquidio/lio_core.c: In function 'octeon_setup_interrupt':
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1067:17: error: invalid application of 'sizeof' to incomplete type 'struct msix_entry'
sizeof(struct msix_entry),
^~~~~~
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1083:17: error: invalid use of undefined type 'struct msix_entry'
msix_entries[i].entry =
^
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1083:17: error: dereferencing pointer to incomplete type 'struct msix_entry'
drivers/net/ethernet/cavium/liquidio/lio_core.c:1086:16: error: invalid use of undefined type 'struct msix_entry'
msix_entries[oct->num_msix_irqs - 1].entry =
^
drivers/net/ethernet/cavium/liquidio/lio_core.c:1086:4: error: invalid use of undefined type 'struct msix_entry'
msix_entries[oct->num_msix_irqs - 1].entry =
^~~~~~~~~~~~
drivers/net/ethernet/cavium/liquidio/lio_core.c:1090:17: error: invalid use of undefined type 'struct msix_entry'
msix_entries[i].entry = i;
^
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1092:27: error: implicit declaration of function 'pci_enable_msix_range'; did you mean 'pci_enable_sriov'? [-Werror=implicit-function-declaration]
num_alloc_ioq_vectors = pci_enable_msix_range(
^~~~~~~~~~~~~~~~~~~~~
pci_enable_sriov
drivers/net/ethernet/cavium/liquidio/lio_core.c:1116:18: error: invalid use of undefined type 'struct msix_entry'
msix_entries[num_ioq_vectors].vector,
^
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1123:5: error: implicit declaration of function 'pci_disable_msix'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
pci_disable_msix(oct->pci_dev);
^~~~~~~~~~~~~~~~
pci_disable_sriov
drivers/net/ethernet/cavium/liquidio/lio_core.c:1142:37: error: invalid use of undefined type 'struct msix_entry'
irqret = request_irq(msix_entries[i].vector,
^
drivers/net/ethernet/cavium/liquidio/lio_core.c:1152:26: error: invalid use of undefined type 'struct msix_entry'
free_irq(msix_entries[num_ioq_vectors].vector,
^
drivers/net/ethernet/cavium/liquidio/lio_core.c:1159:25: error: invalid use of undefined type 'struct msix_entry'
msix_entries[i].vector,
^
drivers/net/ethernet/cavium/liquidio/lio_core.c:1161:27: error: invalid use of undefined type 'struct msix_entry'
free_irq(msix_entries[i].vector,
^
drivers/net/ethernet/cavium/liquidio/lio_core.c:1171:44: error: invalid use of undefined type 'struct msix_entry'
oct->ioq_vector[i].vector = msix_entries[i].vector;
^
drivers/net/ethernet/cavium/liquidio/lio_core.c:1173:38: error: invalid use of undefined type 'struct msix_entry'
irq_set_affinity_hint(msix_entries[i].vector,
^
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1180:9: error: implicit declaration of function 'pci_enable_msi'; did you mean 'pci_enable_sriov'? [-Werror=implicit-function-declaration]
err = pci_enable_msi(oct->pci_dev);
^~~~~~~~~~~~~~
pci_enable_sriov
>> drivers/net/ethernet/cavium/liquidio/lio_core.c:1210:5: error: implicit declaration of function 'pci_disable_msi'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
pci_disable_msi(oct->pci_dev);
^~~~~~~~~~~~~~~
pci_disable_sriov
cc1: some warnings being treated as errors
--
In file included from drivers/net/ethernet/cavium/liquidio/request_manager.c:27:0:
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_unmap_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:97:3: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
pci_release_region(oct->pci_dev, baridx * 2);
^~~~~~~~~~~~~~~~~~
pci_release_regions
drivers/net/ethernet/cavium/liquidio/octeon_main.h: In function 'octeon_map_pci_barx':
>> drivers/net/ethernet/cavium/liquidio/octeon_main.h:111:6: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) {
^~~~~~~~~~~~~~~~~~
pci_request_regions
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_set
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_sub
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_inc
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_set
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_inc
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_sub
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
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/list.h:list_empty
Cyclomatic Complexity 1 arch/um/include/asm/irqflags.h:arch_local_save_flags
Cyclomatic Complexity 1 include/asm-generic/irqflags.h:arch_irqs_disabled_flags
Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_bh
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_trylock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_bh
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
Cyclomatic Complexity 1 include/linux/jiffies.h:_msecs_to_jiffies
Cyclomatic Complexity 3 include/linux/jiffies.h:msecs_to_jiffies
Cyclomatic Complexity 1 include/linux/workqueue.h:queue_delayed_work
Cyclomatic Complexity 2 include/linux/overflow.h:array_size
Cyclomatic Complexity 1 include/linux/device.h:dev_to_node
Cyclomatic Complexity 1 include/asm-generic/io.h:__raw_writel
Cyclomatic Complexity 1 include/asm-generic/io.h:writel
Cyclomatic Complexity 1 include/linux/dma-mapping.h:get_dma_ops
Cyclomatic Complexity 7 include/linux/dma-mapping.h:dma_alloc_attrs
Cyclomatic Complexity 4 include/linux/dma-mapping.h:dma_free_attrs
Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_alloc_coherent
Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_free_coherent
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/liquidio_common.h:incr_index
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/request_manager.c:ring_doorbell
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/request_manager.c:__copy_cmd_into_iq
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/request_manager.c:__post_command2
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/request_manager.c:__add_to_request_list
Cyclomatic Complexity 10 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_init_instr_queue
Cyclomatic Complexity 5 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_delete_instr_queue
Cyclomatic Complexity 7 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_setup_iq
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_ring_doorbell_locked
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_register_reqtype_free_fn
Cyclomatic Complexity 11 drivers/net/ethernet/cavium/liquidio/request_manager.c:lio_process_iq_request_list
Cyclomatic Complexity 7 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_flush_iq
Cyclomatic Complexity 7 drivers/net/ethernet/cavium/liquidio/request_manager.c:__check_db_timeout
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/request_manager.c:check_db_timeout
Cyclomatic Complexity 8 drivers/net/ethernet/cavium/liquidio/request_manager.c:lio_wait_for_instr_fetch
Cyclomatic Complexity 5 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_send_command
Cyclomatic Complexity 8 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_prepare_soft_command
Cyclomatic Complexity 13 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_send_soft_command
Cyclomatic Complexity 2 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_free_sc_buffer_pool
Cyclomatic Complexity 3 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_setup_sc_buffer_pool
Cyclomatic Complexity 7 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_alloc_soft_command
Cyclomatic Complexity 1 drivers/net/ethernet/cavium/liquidio/request_manager.c:octeon_free_soft_command
cc1: some warnings being treated as errors
..
vim +40 drivers/net/phy/mdio-thunder.c
379d7ac7 David Daney 2016-03-11 24
379d7ac7 David Daney 2016-03-11 25 static int thunder_mdiobus_pci_probe(struct pci_dev *pdev,
379d7ac7 David Daney 2016-03-11 26 const struct pci_device_id *ent)
379d7ac7 David Daney 2016-03-11 27 {
379d7ac7 David Daney 2016-03-11 28 struct device_node *node;
379d7ac7 David Daney 2016-03-11 29 struct fwnode_handle *fwn;
379d7ac7 David Daney 2016-03-11 30 struct thunder_mdiobus_nexus *nexus;
379d7ac7 David Daney 2016-03-11 31 int err;
379d7ac7 David Daney 2016-03-11 32 int i;
379d7ac7 David Daney 2016-03-11 33
379d7ac7 David Daney 2016-03-11 34 nexus = devm_kzalloc(&pdev->dev, sizeof(*nexus), GFP_KERNEL);
379d7ac7 David Daney 2016-03-11 35 if (!nexus)
379d7ac7 David Daney 2016-03-11 36 return -ENOMEM;
379d7ac7 David Daney 2016-03-11 37
379d7ac7 David Daney 2016-03-11 38 pci_set_drvdata(pdev, nexus);
379d7ac7 David Daney 2016-03-11 39
379d7ac7 David Daney 2016-03-11 @40 err = pcim_enable_device(pdev);
379d7ac7 David Daney 2016-03-11 41 if (err) {
379d7ac7 David Daney 2016-03-11 42 dev_err(&pdev->dev, "Failed to enable PCI device\n");
379d7ac7 David Daney 2016-03-11 43 pci_set_drvdata(pdev, NULL);
379d7ac7 David Daney 2016-03-11 44 return err;
379d7ac7 David Daney 2016-03-11 45 }
379d7ac7 David Daney 2016-03-11 46
379d7ac7 David Daney 2016-03-11 47 err = pci_request_regions(pdev, KBUILD_MODNAME);
379d7ac7 David Daney 2016-03-11 48 if (err) {
379d7ac7 David Daney 2016-03-11 49 dev_err(&pdev->dev, "pci_request_regions failed\n");
379d7ac7 David Daney 2016-03-11 50 goto err_disable_device;
379d7ac7 David Daney 2016-03-11 51 }
379d7ac7 David Daney 2016-03-11 52
379d7ac7 David Daney 2016-03-11 53 nexus->bar0 = pcim_iomap(pdev, 0, pci_resource_len(pdev, 0));
379d7ac7 David Daney 2016-03-11 54 if (!nexus->bar0) {
379d7ac7 David Daney 2016-03-11 55 err = -ENOMEM;
379d7ac7 David Daney 2016-03-11 56 goto err_release_regions;
379d7ac7 David Daney 2016-03-11 57 }
379d7ac7 David Daney 2016-03-11 58
379d7ac7 David Daney 2016-03-11 59 i = 0;
379d7ac7 David Daney 2016-03-11 60 device_for_each_child_node(&pdev->dev, fwn) {
379d7ac7 David Daney 2016-03-11 61 struct resource r;
379d7ac7 David Daney 2016-03-11 62 struct mii_bus *mii_bus;
379d7ac7 David Daney 2016-03-11 63 struct cavium_mdiobus *bus;
379d7ac7 David Daney 2016-03-11 64 union cvmx_smix_en smi_en;
379d7ac7 David Daney 2016-03-11 65
379d7ac7 David Daney 2016-03-11 66 /* If it is not an OF node we cannot handle it yet, so
379d7ac7 David Daney 2016-03-11 67 * exit the loop.
379d7ac7 David Daney 2016-03-11 68 */
379d7ac7 David Daney 2016-03-11 69 node = to_of_node(fwn);
379d7ac7 David Daney 2016-03-11 70 if (!node)
379d7ac7 David Daney 2016-03-11 71 break;
379d7ac7 David Daney 2016-03-11 72
379d7ac7 David Daney 2016-03-11 73 err = of_address_to_resource(node, 0, &r);
379d7ac7 David Daney 2016-03-11 74 if (err) {
379d7ac7 David Daney 2016-03-11 75 dev_err(&pdev->dev,
379d7ac7 David Daney 2016-03-11 76 "Couldn't translate address for \"%s\"\n",
379d7ac7 David Daney 2016-03-11 77 node->name);
379d7ac7 David Daney 2016-03-11 78 break;
379d7ac7 David Daney 2016-03-11 79 }
379d7ac7 David Daney 2016-03-11 80
379d7ac7 David Daney 2016-03-11 81 mii_bus = devm_mdiobus_alloc_size(&pdev->dev, sizeof(*bus));
379d7ac7 David Daney 2016-03-11 82 if (!mii_bus)
379d7ac7 David Daney 2016-03-11 83 break;
379d7ac7 David Daney 2016-03-11 84 bus = mii_bus->priv;
379d7ac7 David Daney 2016-03-11 85 bus->mii_bus = mii_bus;
379d7ac7 David Daney 2016-03-11 86
379d7ac7 David Daney 2016-03-11 87 nexus->buses[i] = bus;
379d7ac7 David Daney 2016-03-11 88 i++;
379d7ac7 David Daney 2016-03-11 89
379d7ac7 David Daney 2016-03-11 90 bus->register_base = (u64)nexus->bar0 +
379d7ac7 David Daney 2016-03-11 91 r.start - pci_resource_start(pdev, 0);
379d7ac7 David Daney 2016-03-11 92
379d7ac7 David Daney 2016-03-11 93 smi_en.u64 = 0;
379d7ac7 David Daney 2016-03-11 94 smi_en.s.en = 1;
379d7ac7 David Daney 2016-03-11 95 oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
379d7ac7 David Daney 2016-03-11 96 bus->mii_bus->name = KBUILD_MODNAME;
379d7ac7 David Daney 2016-03-11 97 snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%llx", r.start);
379d7ac7 David Daney 2016-03-11 98 bus->mii_bus->parent = &pdev->dev;
379d7ac7 David Daney 2016-03-11 99 bus->mii_bus->read = cavium_mdiobus_read;
379d7ac7 David Daney 2016-03-11 100 bus->mii_bus->write = cavium_mdiobus_write;
379d7ac7 David Daney 2016-03-11 101
379d7ac7 David Daney 2016-03-11 102 err = of_mdiobus_register(bus->mii_bus, node);
379d7ac7 David Daney 2016-03-11 103 if (err)
379d7ac7 David Daney 2016-03-11 104 dev_err(&pdev->dev, "of_mdiobus_register failed\n");
379d7ac7 David Daney 2016-03-11 105
379d7ac7 David Daney 2016-03-11 106 dev_info(&pdev->dev, "Added bus at %llx\n", r.start);
379d7ac7 David Daney 2016-03-11 107 if (i >= ARRAY_SIZE(nexus->buses))
379d7ac7 David Daney 2016-03-11 108 break;
379d7ac7 David Daney 2016-03-11 109 }
379d7ac7 David Daney 2016-03-11 110 return 0;
379d7ac7 David Daney 2016-03-11 111
379d7ac7 David Daney 2016-03-11 112 err_release_regions:
379d7ac7 David Daney 2016-03-11 113 pci_release_regions(pdev);
379d7ac7 David Daney 2016-03-11 114
379d7ac7 David Daney 2016-03-11 115 err_disable_device:
379d7ac7 David Daney 2016-03-11 116 pci_set_drvdata(pdev, NULL);
379d7ac7 David Daney 2016-03-11 117 return err;
379d7ac7 David Daney 2016-03-11 118 }
379d7ac7 David Daney 2016-03-11 119
379d7ac7 David Daney 2016-03-11 120 static void thunder_mdiobus_pci_remove(struct pci_dev *pdev)
379d7ac7 David Daney 2016-03-11 121 {
379d7ac7 David Daney 2016-03-11 122 int i;
379d7ac7 David Daney 2016-03-11 123 struct thunder_mdiobus_nexus *nexus = pci_get_drvdata(pdev);
379d7ac7 David Daney 2016-03-11 124
379d7ac7 David Daney 2016-03-11 125 for (i = 0; i < ARRAY_SIZE(nexus->buses); i++) {
379d7ac7 David Daney 2016-03-11 126 struct cavium_mdiobus *bus = nexus->buses[i];
379d7ac7 David Daney 2016-03-11 127
379d7ac7 David Daney 2016-03-11 128 if (!bus)
379d7ac7 David Daney 2016-03-11 129 continue;
379d7ac7 David Daney 2016-03-11 130
379d7ac7 David Daney 2016-03-11 131 mdiobus_unregister(bus->mii_bus);
379d7ac7 David Daney 2016-03-11 132 mdiobus_free(bus->mii_bus);
379d7ac7 David Daney 2016-03-11 133 oct_mdio_writeq(0, bus->register_base + SMI_EN);
379d7ac7 David Daney 2016-03-11 134 }
379d7ac7 David Daney 2016-03-11 135 pci_set_drvdata(pdev, NULL);
379d7ac7 David Daney 2016-03-11 136 }
379d7ac7 David Daney 2016-03-11 137
379d7ac7 David Daney 2016-03-11 138 static const struct pci_device_id thunder_mdiobus_id_table[] = {
379d7ac7 David Daney 2016-03-11 139 { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, 0xa02b) },
379d7ac7 David Daney 2016-03-11 140 { 0, } /* End of table. */
379d7ac7 David Daney 2016-03-11 141 };
379d7ac7 David Daney 2016-03-11 142 MODULE_DEVICE_TABLE(pci, thunder_mdiobus_id_table);
379d7ac7 David Daney 2016-03-11 143
379d7ac7 David Daney 2016-03-11 144 static struct pci_driver thunder_mdiobus_driver = {
379d7ac7 David Daney 2016-03-11 145 .name = KBUILD_MODNAME,
379d7ac7 David Daney 2016-03-11 146 .id_table = thunder_mdiobus_id_table,
379d7ac7 David Daney 2016-03-11 147 .probe = thunder_mdiobus_pci_probe,
379d7ac7 David Daney 2016-03-11 148 .remove = thunder_mdiobus_pci_remove,
379d7ac7 David Daney 2016-03-11 149 };
379d7ac7 David Daney 2016-03-11 150
379d7ac7 David Daney 2016-03-11 @151 module_pci_driver(thunder_mdiobus_driver);
379d7ac7 David Daney 2016-03-11 152
:::::: The code at line 40 was first introduced by commit
:::::: 379d7ac7ca31722a1fb488ae3e98b274c9db568c phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.
:::::: TO: David Daney <david.daney@...ium.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
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" (19891 bytes)
Powered by blists - more mailing lists