netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next:master 353/371] drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:162:39: sparse: cast to restricted __le16
@ 2017-12-15 18:19 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-12-15 18:19 UTC (permalink / raw)
  To: Salil Mehta; +Cc: kbuild-all, netdev, lipeng

Hi Salil,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   9463b2f72eadf93132815e7ee8e54b4f46e39be9
commit: e963cb789a29b890678b58ef7da5d7c497510b7e [353/371] net: hns3: Add HNS3 VF driver to kernel build framework
reproduce:
        # apt-get install sparse
        git checkout e963cb789a29b890678b58ef7da5d7c497510b7e
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)


vim +162 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c

b11a0bb2 Salil Mehta 2017-12-14  124  
b11a0bb2 Salil Mehta 2017-12-14  125  void hclgevf_mbx_handler(struct hclgevf_dev *hdev)
b11a0bb2 Salil Mehta 2017-12-14  126  {
b11a0bb2 Salil Mehta 2017-12-14  127  	struct hclgevf_mbx_resp_status *resp;
b11a0bb2 Salil Mehta 2017-12-14  128  	struct hclge_mbx_pf_to_vf_cmd *req;
b11a0bb2 Salil Mehta 2017-12-14  129  	struct hclgevf_cmq_ring *crq;
b11a0bb2 Salil Mehta 2017-12-14  130  	struct hclgevf_desc *desc;
b11a0bb2 Salil Mehta 2017-12-14  131  	u16 link_status, flag;
b11a0bb2 Salil Mehta 2017-12-14  132  	u8 *temp;
b11a0bb2 Salil Mehta 2017-12-14  133  	int i;
b11a0bb2 Salil Mehta 2017-12-14  134  
b11a0bb2 Salil Mehta 2017-12-14  135  	resp = &hdev->mbx_resp;
b11a0bb2 Salil Mehta 2017-12-14  136  	crq = &hdev->hw.cmq.crq;
b11a0bb2 Salil Mehta 2017-12-14  137  
b11a0bb2 Salil Mehta 2017-12-14  138  	flag = le16_to_cpu(crq->desc[crq->next_to_use].flag);
b11a0bb2 Salil Mehta 2017-12-14  139  	while (hnae_get_bit(flag, HCLGEVF_CMDQ_RX_OUTVLD_B)) {
b11a0bb2 Salil Mehta 2017-12-14  140  		desc = &crq->desc[crq->next_to_use];
b11a0bb2 Salil Mehta 2017-12-14  141  		req = (struct hclge_mbx_pf_to_vf_cmd *)desc->data;
b11a0bb2 Salil Mehta 2017-12-14  142  
b11a0bb2 Salil Mehta 2017-12-14  143  		switch (req->msg[0]) {
b11a0bb2 Salil Mehta 2017-12-14  144  		case HCLGE_MBX_PF_VF_RESP:
b11a0bb2 Salil Mehta 2017-12-14  145  			if (resp->received_resp)
b11a0bb2 Salil Mehta 2017-12-14  146  				dev_warn(&hdev->pdev->dev,
b11a0bb2 Salil Mehta 2017-12-14  147  					 "VF mbx resp flag not clear(%d)\n",
b11a0bb2 Salil Mehta 2017-12-14  148  					 req->msg[1]);
b11a0bb2 Salil Mehta 2017-12-14  149  			resp->received_resp = true;
b11a0bb2 Salil Mehta 2017-12-14  150  
b11a0bb2 Salil Mehta 2017-12-14  151  			resp->origin_mbx_msg = (req->msg[1] << 16);
b11a0bb2 Salil Mehta 2017-12-14  152  			resp->origin_mbx_msg |= req->msg[2];
b11a0bb2 Salil Mehta 2017-12-14  153  			resp->resp_status = req->msg[3];
b11a0bb2 Salil Mehta 2017-12-14  154  
b11a0bb2 Salil Mehta 2017-12-14  155  			temp = (u8 *)&req->msg[4];
b11a0bb2 Salil Mehta 2017-12-14  156  			for (i = 0; i < HCLGE_MBX_MAX_RESP_DATA_SIZE; i++) {
b11a0bb2 Salil Mehta 2017-12-14  157  				resp->additional_info[i] = *temp;
b11a0bb2 Salil Mehta 2017-12-14  158  				temp++;
b11a0bb2 Salil Mehta 2017-12-14  159  			}
b11a0bb2 Salil Mehta 2017-12-14  160  			break;
b11a0bb2 Salil Mehta 2017-12-14  161  		case HCLGE_MBX_LINK_STAT_CHANGE:
b11a0bb2 Salil Mehta 2017-12-14 @162  			link_status = le16_to_cpu(req->msg[1]);

:::::: The code at line 162 was first introduced by commit
:::::: b11a0bb231f3d83429c5e88451ca85ce27c4a9dd net: hns3: Add mailbox support to VF driver

:::::: TO: Salil Mehta <salil.mehta@huawei.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-15 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15 18:19 [net-next:master 353/371] drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:162:39: sparse: cast to restricted __le16 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).