Re: [PATCH net-next v2 2/3] net: ethernet: ti: Register the RPMsg driver as network device

From: Yojana Mallik
Date: Mon Jun 03 2024 - 05:27:50 EST




On 6/1/24 08:43, kernel test robot wrote:
> Hi Yojana,
>
> 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/Yojana-Mallik/net-ethernet-ti-RPMsg-based-shared-memory-ethernet-driver/20240531-144258
> base: net-next/main
> patch link: https://lore.kernel.org/r/20240531064006.1223417-3-y-mallik%40ti.com
> patch subject: [PATCH net-next v2 2/3] net: ethernet: ti: Register the RPMsg driver as network device
> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240601/202406011038.AwLZhQpy-lkp@xxxxxxxxx/config)
> compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240601/202406011038.AwLZhQpy-lkp@xxxxxxxxx/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@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202406011038.AwLZhQpy-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/net/ethernet/ti/inter_core_virt_eth.c:76:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> 76 | if (wait) {
> | ^~~~
> drivers/net/ethernet/ti/inter_core_virt_eth.c:87:9: note: uninitialized use occurs here
> 87 | return ret;
> | ^~~
> drivers/net/ethernet/ti/inter_core_virt_eth.c:76:2: note: remove the 'if' if its condition is always true
> 76 | if (wait) {
> | ^~~~~~~~~
> drivers/net/ethernet/ti/inter_core_virt_eth.c:65:9: note: initialize the variable 'ret' to silence this warning
> 65 | int ret;
> | ^
> | = 0
> drivers/net/ethernet/ti/inter_core_virt_eth.c:330:24: error: use of undeclared identifier 'icve_del_mc_addr'
> 330 | __dev_mc_unsync(ndev, icve_del_mc_addr);
> | ^
> drivers/net/ethernet/ti/inter_core_virt_eth.c:331:26: error: no member named 'mc_list' in 'struct icve_common'
> 331 | __hw_addr_init(&common->mc_list);
> | ~~~~~~ ^
> drivers/net/ethernet/ti/inter_core_virt_eth.c:337:28: error: no member named 'rx_mode_work' in 'struct icve_common'
> 337 | cancel_work_sync(&common->rx_mode_work);
> | ~~~~~~ ^
> 1 warning and 3 errors generated.
>
>
> vim +76 drivers/net/ethernet/ti/inter_core_virt_eth.c
>
> 59
> 60 static int icve_create_send_request(struct icve_common *common,
> 61 enum icve_rpmsg_type rpmsg_type,
> 62 bool wait)
> 63 {
> 64 unsigned long flags;
> 65 int ret;
> 66
> 67 if (wait)
> 68 reinit_completion(&common->sync_msg);
> 69
> 70 spin_lock_irqsave(&common->send_msg_lock, flags);
> 71 create_request(common, rpmsg_type);
> 72 rpmsg_send(common->rpdev->ept, (void *)(&common->send_msg),
> 73 sizeof(common->send_msg));
> 74 spin_unlock_irqrestore(&common->send_msg_lock, flags);
> 75
> > 76 if (wait) {
> 77 ret = wait_for_completion_timeout(&common->sync_msg,
> 78 ICVE_REQ_TIMEOUT);
> 79
> 80 if (!ret) {
> 81 dev_err(common->dev, "Failed to receive response within %ld jiffies\n",
> 82 ICVE_REQ_TIMEOUT);
> 83 ret = -ETIMEDOUT;
> 84 return ret;
> 85 }
> 86 }
> 87 return ret;
> 88 }
> 89
>

I will fix all these issues in v3.

Regards,
Yojana Mallik