mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mordechay Goodstein <mordechay.goodstein@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Luca Coelho <luciano.coelho@intel.com>
Subject: drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Fri, 15 Jan 2021 06:20:30 +0800	[thread overview]
Message-ID: <202101150626.ZpULb4Qy-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: 0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1 iwlwifi: move all bus-independent TX functions to common code
date:   4 months ago
config: i386-randconfig-s002-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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


"sparse warnings: (new ones prefixed by >>)"
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/fw/img.h, drivers/net/wireless/intel/iwlwifi/iwl-trans.h):
   drivers/net/wireless/intel/iwlwifi/fw/file.h:330:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/fw/file.h:485:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c: note: in included file:
   drivers/net/wireless/intel/iwlwifi/iwl-trans.h:788:52: sparse: sparse: array of flexible structures
>> drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct iwl_tso_hdr_page *tso_hdr_page @@     got struct iwl_tso_hdr_page [noderef] __percpu * @@
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse:     expected struct iwl_tso_hdr_page *tso_hdr_page
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse:     got struct iwl_tso_hdr_page [noderef] __percpu *
>> drivers/net/wireless/intel/iwlwifi/iwl-trans.c:169:25: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct iwl_tso_hdr_page * @@
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:169:25: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:169:25: sparse:     got struct iwl_tso_hdr_page *
>> drivers/net/wireless/intel/iwlwifi/iwl-trans.c:175:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got struct iwl_tso_hdr_page *tso_hdr_page @@
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:175:32: sparse:     expected void [noderef] __percpu *__pdata
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:175:32: sparse:     got struct iwl_tso_hdr_page *tso_hdr_page
--
   drivers/net/wireless/intel/iwlwifi/queue/tx.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/fw/img.h, drivers/net/wireless/intel/iwlwifi/iwl-trans.h, ...):
   drivers/net/wireless/intel/iwlwifi/fw/file.h:330:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/fw/file.h:485:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/queue/tx.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h, drivers/net/wireless/intel/iwlwifi/iwl-io.h):
   drivers/net/wireless/intel/iwlwifi/iwl-trans.h:788:52: sparse: sparse: array of flexible structures
>> drivers/net/wireless/intel/iwlwifi/queue/tx.c:354:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct iwl_tso_hdr_page * @@
   drivers/net/wireless/intel/iwlwifi/queue/tx.c:354:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/net/wireless/intel/iwlwifi/queue/tx.c:354:38: sparse:     got struct iwl_tso_hdr_page *

vim +154 drivers/net/wireless/intel/iwlwifi/iwl-trans.c

   110	
   111		trans->dev = dev;
   112		trans->ops = ops;
   113		trans->num_rx_queues = 1;
   114	
   115		if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
   116			trans->txqs.bc_tbl_size = sizeof(struct iwl_gen3_bc_tbl);
   117		else
   118			trans->txqs.bc_tbl_size = sizeof(struct iwlagn_scd_bc_tbl);
   119		/*
   120		 * For gen2 devices, we use a single allocation for each byte-count
   121		 * table, but they're pretty small (1k) so use a DMA pool that we
   122		 * allocate here.
   123		 */
   124		if (trans->trans_cfg->gen2) {
   125			trans->txqs.bc_pool = dmam_pool_create("iwlwifi:bc", dev,
   126							       trans->txqs.bc_tbl_size,
   127							       256, 0);
   128			if (!trans->txqs.bc_pool)
   129				return NULL;
   130		}
   131	
   132		if (trans->trans_cfg->use_tfh) {
   133			trans->txqs.tfd.addr_size = 64;
   134			trans->txqs.tfd.max_tbs = IWL_TFH_NUM_TBS;
   135			trans->txqs.tfd.size = sizeof(struct iwl_tfh_tfd);
   136		} else {
   137			trans->txqs.tfd.addr_size = 36;
   138			trans->txqs.tfd.max_tbs = IWL_NUM_OF_TBS;
   139			trans->txqs.tfd.size = sizeof(struct iwl_tfd);
   140		}
   141		trans->max_skb_frags = IWL_TRANS_MAX_FRAGS(trans);
   142	
   143		snprintf(trans->dev_cmd_pool_name, sizeof(trans->dev_cmd_pool_name),
   144			 "iwl_cmd_pool:%s", dev_name(trans->dev));
   145		trans->dev_cmd_pool =
   146			kmem_cache_create(trans->dev_cmd_pool_name,
   147					  txcmd_size, txcmd_align,
   148					  SLAB_HWCACHE_ALIGN, NULL);
   149		if (!trans->dev_cmd_pool)
   150			return NULL;
   151	
   152		WARN_ON(!ops->wait_txq_empty && !ops->wait_tx_queues_empty);
   153	
 > 154		trans->txqs.tso_hdr_page = alloc_percpu(struct iwl_tso_hdr_page);
   155		if (!trans->txqs.tso_hdr_page) {
   156			kmem_cache_destroy(trans->dev_cmd_pool);
   157			return NULL;
   158		}
   159	
   160		return trans;
   161	}
   162	
   163	void iwl_trans_free(struct iwl_trans *trans)
   164	{
   165		int i;
   166	
   167		for_each_possible_cpu(i) {
   168			struct iwl_tso_hdr_page *p =
 > 169				per_cpu_ptr(trans->txqs.tso_hdr_page, i);
   170	
   171			if (p->page)
   172				__free_page(p->page);
   173		}
   174	
 > 175		free_percpu(trans->txqs.tso_hdr_page);
   176	
   177		kmem_cache_destroy(trans->dev_cmd_pool);
   178	}
   179	

---
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: 41428 bytes --]

                 reply	other threads:[~2021-01-14 22:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202101150626.ZpULb4Qy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=mordechay.goodstein@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®