From: kernel test robot <lkp@intel.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk,
horms@kernel.org, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
mengyuanlou@net-swift.com, Jiawen Wu <jiawenwu@trustnetic.com>
Subject: Re: [PATCH net-next v3 1/2] net: txgbe: Add basic support for new AML devices
Date: Thu, 16 Jan 2025 20:33:35 +0800 [thread overview]
Message-ID: <202501162038.zXreDkFM-lkp@intel.com> (raw)
In-Reply-To: <20250115102408.2225055-1-jiawenwu@trustnetic.com>
Hi Jiawen,
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/Jiawen-Wu/net-wangxun-Replace-the-judgement-of-MAC-type-with-flags/20250115-180916
base: net-next/main
patch link: https://lore.kernel.org/r/20250115102408.2225055-1-jiawenwu%40trustnetic.com
patch subject: [PATCH net-next v3 1/2] net: txgbe: Add basic support for new AML devices
config: powerpc-randconfig-001-20250116 (https://download.01.org/0day-ci/archive/20250116/202501162038.zXreDkFM-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project c23f2417dc5f6dc371afb07af5627ec2a9d373a0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250116/202501162038.zXreDkFM-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/202501162038.zXreDkFM-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/wangxun/libwx/wx_hw.c:451:12: warning: variable 'recv_hdr' is uninitialized when used here [-Wuninitialized]
451 | buf_len = recv_hdr->buf_len;
| ^~~~~~~~
drivers/net/ethernet/wangxun/libwx/wx_hw.c:406:29: note: initialize the variable 'recv_hdr' to silence this warning
406 | struct wx_hic_hdr *recv_hdr;
| ^
| = NULL
1 warning generated.
vim +/recv_hdr +451 drivers/net/ethernet/wangxun/libwx/wx_hw.c
400
401 static int wx_host_interface_command_r(struct wx *wx, u32 *buffer,
402 u32 length, u32 timeout, bool return_data)
403 {
404 struct wx_hic_hdr *send_hdr = (struct wx_hic_hdr *)buffer;
405 u32 hdr_size = sizeof(struct wx_hic_hdr);
406 struct wx_hic_hdr *recv_hdr;
407 bool busy, reply;
408 u32 dword_len;
409 u16 buf_len;
410 int err = 0;
411 u8 send_cmd;
412 u32 i;
413
414 /* wait to get lock */
415 might_sleep();
416 err = read_poll_timeout(test_and_set_bit, busy, !busy, 1000, timeout * 1000,
417 false, WX_STATE_SWFW_BUSY, wx->state);
418 if (err)
419 return err;
420
421 /* index to unique seq id for each mbox message */
422 send_hdr->index = wx->swfw_index;
423 send_cmd = send_hdr->cmd;
424
425 dword_len = length >> 2;
426 /* write data to SW-FW mbox array */
427 for (i = 0; i < dword_len; i++) {
428 wr32a(wx, WX_SW2FW_MBOX, i, (__force u32)cpu_to_le32(buffer[i]));
429 /* write flush */
430 rd32a(wx, WX_SW2FW_MBOX, i);
431 }
432
433 /* generate interrupt to notify FW */
434 wr32m(wx, WX_SW2FW_MBOX_CMD, WX_SW2FW_MBOX_CMD_VLD, 0);
435 wr32m(wx, WX_SW2FW_MBOX_CMD, WX_SW2FW_MBOX_CMD_VLD, WX_SW2FW_MBOX_CMD_VLD);
436
437 /* polling reply from FW */
438 err = read_poll_timeout(wx_poll_fw_reply, reply, reply, 1000, 50000,
439 true, wx, buffer, recv_hdr, send_cmd);
440 if (err) {
441 wx_err(wx, "Polling from FW messages timeout, cmd: 0x%x, index: %d\n",
442 send_cmd, wx->swfw_index);
443 goto rel_out;
444 }
445
446 /* expect no reply from FW then return */
447 if (!return_data)
448 goto rel_out;
449
450 /* If there is any thing in data position pull it in */
> 451 buf_len = recv_hdr->buf_len;
452 if (buf_len == 0)
453 goto rel_out;
454
455 if (length < buf_len + hdr_size) {
456 wx_err(wx, "Buffer not large enough for reply message.\n");
457 err = -EFAULT;
458 goto rel_out;
459 }
460
461 /* Calculate length in DWORDs, add 3 for odd lengths */
462 dword_len = (buf_len + 3) >> 2;
463 for (i = hdr_size >> 2; i <= dword_len; i++) {
464 buffer[i] = rd32a(wx, WX_FW2SW_MBOX, i);
465 le32_to_cpus(&buffer[i]);
466 }
467
468 rel_out:
469 /* index++, index replace wx_hic_hdr.checksum */
470 if (send_hdr->index == WX_HIC_HDR_INDEX_MAX)
471 wx->swfw_index = 0;
472 else
473 wx->swfw_index = send_hdr->index + 1;
474
475 clear_bit(WX_STATE_SWFW_BUSY, wx->state);
476 return err;
477 }
478
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-01-16 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 10:24 [PATCH net-next v3 1/2] net: txgbe: Add basic support for new AML devices Jiawen Wu
2025-01-15 10:24 ` [PATCH net-next v3 2/2] net: wangxun: Replace the judgement of MAC type with flags Jiawen Wu
2025-01-15 15:29 ` [PATCH net-next v3 1/2] net: txgbe: Add basic support for new AML devices Simon Horman
2025-01-16 6:57 ` Jiawen Wu
2025-01-16 12:33 ` kernel test robot [this message]
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=202501162038.zXreDkFM-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiawenwu@trustnetic.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).