public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Wen Gu <guwen@linux.alibaba.com>
To: kernel test robot <lkp@intel.com>,
	kgraul@linux.ibm.com, wenjia@linux.ibm.com, jaka@linux.ibm.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, alibuda@linux.alibaba.com,
	tonylu@linux.alibaba.com, linux-s390@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 12/18] net/smc: implement DMB-related operations of loopback
Date: Sun, 24 Sep 2023 16:54:07 +0800	[thread overview]
Message-ID: <41d1f41f-737a-7705-c09d-f3678387f8d4@linux.alibaba.com> (raw)
In-Reply-To: <202309232327.nzXalNsH-lkp@intel.com>



On 2023/9/23 23:24, kernel test robot wrote:
> Hi Wen,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on net-next/main]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Wen-Gu/net-smc-decouple-ism_dev-from-SMC-D-device-dump/20230920-010019
> base:   net-next/main
> patch link:    https://lore.kernel.org/r/1695134522-126655-13-git-send-email-guwen%40linux.alibaba.com
> patch subject: [PATCH net-next 12/18] net/smc: implement DMB-related operations of loopback
> config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20230923/202309232327.nzXalNsH-lkp@intel.com/config)
> compiler: arceb-elf-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230923/202309232327.nzXalNsH-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309232327.nzXalNsH-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>     net/smc/smc_loopback.c: In function 'smc_lo_register_dmb':
>>> net/smc/smc_loopback.c:107:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>       107 |         dmb_node->dma_addr = (dma_addr_t)dmb_node->cpu_addr;
>           |                              ^
> 
> 

Will fix it on v4. Thanks!

> vim +107 net/smc/smc_loopback.c
> 
>      76	
>      77	static int smc_lo_register_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb,
>      78				       void *client_priv)
>      79	{
>      80		struct smc_lo_dmb_node *dmb_node, *tmp_node;
>      81		struct smc_lo_dev *ldev = smcd->priv;
>      82		int sba_idx, rc;
>      83	
>      84		/* check space for new dmb */
>      85		for_each_clear_bit(sba_idx, ldev->sba_idx_mask, SMC_LODEV_MAX_DMBS) {
>      86			if (!test_and_set_bit(sba_idx, ldev->sba_idx_mask))
>      87				break;
>      88		}
>      89		if (sba_idx == SMC_LODEV_MAX_DMBS)
>      90			return -ENOSPC;
>      91	
>      92		dmb_node = kzalloc(sizeof(*dmb_node), GFP_KERNEL);
>      93		if (!dmb_node) {
>      94			rc = -ENOMEM;
>      95			goto err_bit;
>      96		}
>      97	
>      98		dmb_node->sba_idx = sba_idx;
>      99		dmb_node->cpu_addr = kzalloc(dmb->dmb_len, GFP_KERNEL |
>     100					     __GFP_NOWARN | __GFP_NORETRY |
>     101					     __GFP_NOMEMALLOC);
>     102		if (!dmb_node->cpu_addr) {
>     103			rc = -ENOMEM;
>     104			goto err_node;
>     105		}
>     106		dmb_node->len = dmb->dmb_len;
>   > 107		dmb_node->dma_addr = (dma_addr_t)dmb_node->cpu_addr;
>     108	
>     109	again:
>     110		/* add new dmb into hash table */
>     111		get_random_bytes(&dmb_node->token, sizeof(dmb_node->token));
>     112		write_lock(&ldev->dmb_ht_lock);
>     113		hash_for_each_possible(ldev->dmb_ht, tmp_node, list, dmb_node->token) {
>     114			if (tmp_node->token == dmb_node->token) {
>     115				write_unlock(&ldev->dmb_ht_lock);
>     116				goto again;
>     117			}
>     118		}
>     119		hash_add(ldev->dmb_ht, &dmb_node->list, dmb_node->token);
>     120		write_unlock(&ldev->dmb_ht_lock);
>     121	
>     122		dmb->sba_idx = dmb_node->sba_idx;
>     123		dmb->dmb_tok = dmb_node->token;
>     124		dmb->cpu_addr = dmb_node->cpu_addr;
>     125		dmb->dma_addr = dmb_node->dma_addr;
>     126		dmb->dmb_len = dmb_node->len;
>     127	
>     128		return 0;
>     129	
>     130	err_node:
>     131		kfree(dmb_node);
>     132	err_bit:
>     133		clear_bit(sba_idx, ldev->sba_idx_mask);
>     134		return rc;
>     135	}
>     136	
> 

  reply	other threads:[~2023-09-24  8:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 14:41 [PATCH net-next 00/18] net/smc: implement virtual ISM extension and loopback-ism Wen Gu
2023-09-19 14:41 ` [PATCH net-next 01/18] net/smc: decouple ism_dev from SMC-D device dump Wen Gu
2023-09-21 20:41   ` Simon Horman
2023-09-22  8:05     ` Wen Gu
2023-09-22 18:13       ` Gerd Bayer
2023-09-23  9:24         ` Wen Gu
2023-09-19 14:41 ` [PATCH net-next 02/18] net/smc: decouple ism_dev from SMC-D DMB registration Wen Gu
2023-09-19 14:41 ` [PATCH net-next 03/18] net/smc: extract v2 check helper from SMC-D device registration Wen Gu
2023-09-19 14:41 ` [PATCH net-next 04/18] net/smc: support SMCv2.x supplemental features negotiation Wen Gu
2023-09-19 14:41 ` [PATCH net-next 05/18] net/smc: reserve CHID range for SMC-D virtual device Wen Gu
2023-09-19 14:41 ` [PATCH net-next 06/18] net/smc: extend GID to 128bits for virtual ISM device Wen Gu
2023-09-20  7:02   ` kernel test robot
2023-09-20  8:11     ` Wen Gu
2023-09-20  9:00       ` Niklas Schnelle
2023-09-20 13:05         ` Wen Gu
2023-09-19 14:41 ` [PATCH net-next 07/18] net/smc: disable SEID on non-s390 architecture Wen Gu
2023-09-19 14:41 ` [PATCH net-next 08/18] net/smc: enable virtual ISM device feature bit Wen Gu
2023-09-19 14:41 ` [PATCH net-next 09/18] net/smc: introduce SMC-D loopback device Wen Gu
2023-09-19 14:41 ` [PATCH net-next 10/18] net/smc: implement ID-related operations of loopback Wen Gu
2023-09-19 14:41 ` [PATCH net-next 11/18] net/smc: implement some unsupported " Wen Gu
2023-09-19 14:41 ` [PATCH net-next 12/18] net/smc: implement DMB-related " Wen Gu
2023-09-23 15:24   ` kernel test robot
2023-09-24  8:54     ` Wen Gu [this message]
2023-09-19 14:41 ` [PATCH net-next 13/18] net/smc: register loopback device as SMC-Dv2 device Wen Gu
2023-09-19 14:41 ` [PATCH net-next 14/18] net/smc: add operation for getting DMB attribute Wen Gu
2023-09-19 14:41 ` [PATCH net-next 15/18] net/smc: add operations for DMB attach and detach Wen Gu
2023-09-19 14:42 ` [PATCH net-next 16/18] net/smc: avoid data copy from sndbuf to peer RMB in SMC-D Wen Gu
2023-09-19 14:42 ` [PATCH net-next 17/18] net/smc: modify cursor update logic when sndbuf mapped to RMB Wen Gu
2023-09-19 14:42 ` [PATCH net-next 18/18] net/smc: add interface implementation of loopback device Wen Gu

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=41d1f41f-737a-7705-c09d-f3678387f8d4@linux.alibaba.com \
    --to=guwen@linux.alibaba.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jaka@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.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