All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/net/ethernet/meta/fbnic/fbnic_fw.c:1176 fbnic_fw_xmit_send_logs() warn: sizeof(NUMBER)?
Date: Tue, 14 Jul 2026 22:35:43 +0800	[thread overview]
Message-ID: <202607142214.DTuuzann-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Lee Trager <lee@trager.us>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Jacob Keller <jacob.e.keller@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0f26556c5eeea62cc934fa8938b148aa5844a6b6
commit: 2e972f32ae5ff7a5592c627932f0001b8fe04a36 eth: fbnic: Add mailbox support for firmware logs
date:   1 year ago
:::::: branch date: 23 hours ago
:::::: commit date: 1 year ago
config: riscv-randconfig-r071-20260714 (https://download.01.org/0day-ci/archive/20260714/202607142214.DTuuzann-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 15.2.0
smatch: v0.5.0-9185-gbcc58b9c

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
| Fixes: 2e972f32ae5f ("eth: fbnic: Add mailbox support for firmware logs")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202607142214.DTuuzann-lkp@intel.com/

smatch warnings:
drivers/net/ethernet/meta/fbnic/fbnic_fw.c:1176 fbnic_fw_xmit_send_logs() warn: sizeof(NUMBER)?

vim +1176 drivers/net/ethernet/meta/fbnic/fbnic_fw.c

2e972f32ae5ff7 Lee Trager 2025-07-02  1154  
2e972f32ae5ff7 Lee Trager 2025-07-02  1155  int fbnic_fw_xmit_send_logs(struct fbnic_dev *fbd, bool enable,
2e972f32ae5ff7 Lee Trager 2025-07-02  1156  			    bool send_log_history)
2e972f32ae5ff7 Lee Trager 2025-07-02  1157  {
2e972f32ae5ff7 Lee Trager 2025-07-02  1158  	struct fbnic_tlv_msg *msg;
2e972f32ae5ff7 Lee Trager 2025-07-02  1159  	int err;
2e972f32ae5ff7 Lee Trager 2025-07-02  1160  
2e972f32ae5ff7 Lee Trager 2025-07-02  1161  	if (fbd->fw_cap.running.mgmt.version < MIN_FW_VER_CODE_LOG) {
2e972f32ae5ff7 Lee Trager 2025-07-02  1162  		dev_warn(fbd->dev, "Firmware version is too old to support firmware logs!\n");
2e972f32ae5ff7 Lee Trager 2025-07-02  1163  		return -EOPNOTSUPP;
2e972f32ae5ff7 Lee Trager 2025-07-02  1164  	}
2e972f32ae5ff7 Lee Trager 2025-07-02  1165  
2e972f32ae5ff7 Lee Trager 2025-07-02  1166  	msg = fbnic_tlv_msg_alloc(FBNIC_TLV_MSG_ID_LOG_SEND_LOGS_REQ);
2e972f32ae5ff7 Lee Trager 2025-07-02  1167  	if (!msg)
2e972f32ae5ff7 Lee Trager 2025-07-02  1168  		return -ENOMEM;
2e972f32ae5ff7 Lee Trager 2025-07-02  1169  
2e972f32ae5ff7 Lee Trager 2025-07-02  1170  	if (enable) {
2e972f32ae5ff7 Lee Trager 2025-07-02  1171  		err = fbnic_tlv_attr_put_flag(msg, FBNIC_SEND_LOGS);
2e972f32ae5ff7 Lee Trager 2025-07-02  1172  		if (err)
2e972f32ae5ff7 Lee Trager 2025-07-02  1173  			goto free_message;
2e972f32ae5ff7 Lee Trager 2025-07-02  1174  
2e972f32ae5ff7 Lee Trager 2025-07-02  1175  		/* Report request for version 1 of logs */
2e972f32ae5ff7 Lee Trager 2025-07-02 @1176  		err = fbnic_tlv_attr_put_int(msg, FBNIC_SEND_LOGS_VERSION,
2e972f32ae5ff7 Lee Trager 2025-07-02  1177  					     FBNIC_FW_LOG_VERSION);
2e972f32ae5ff7 Lee Trager 2025-07-02  1178  		if (err)
2e972f32ae5ff7 Lee Trager 2025-07-02  1179  			goto free_message;
2e972f32ae5ff7 Lee Trager 2025-07-02  1180  
2e972f32ae5ff7 Lee Trager 2025-07-02  1181  		if (send_log_history) {
2e972f32ae5ff7 Lee Trager 2025-07-02  1182  			err = fbnic_tlv_attr_put_flag(msg,
2e972f32ae5ff7 Lee Trager 2025-07-02  1183  						      FBNIC_SEND_LOGS_HISTORY);
2e972f32ae5ff7 Lee Trager 2025-07-02  1184  			if (err)
2e972f32ae5ff7 Lee Trager 2025-07-02  1185  				goto free_message;
2e972f32ae5ff7 Lee Trager 2025-07-02  1186  		}
2e972f32ae5ff7 Lee Trager 2025-07-02  1187  	}
2e972f32ae5ff7 Lee Trager 2025-07-02  1188  
2e972f32ae5ff7 Lee Trager 2025-07-02  1189  	err = fbnic_mbx_map_tlv_msg(fbd, msg);
2e972f32ae5ff7 Lee Trager 2025-07-02  1190  	if (err)
2e972f32ae5ff7 Lee Trager 2025-07-02  1191  		goto free_message;
2e972f32ae5ff7 Lee Trager 2025-07-02  1192  
2e972f32ae5ff7 Lee Trager 2025-07-02  1193  	return 0;
2e972f32ae5ff7 Lee Trager 2025-07-02  1194  
2e972f32ae5ff7 Lee Trager 2025-07-02  1195  free_message:
2e972f32ae5ff7 Lee Trager 2025-07-02  1196  	free_page((unsigned long)msg);
2e972f32ae5ff7 Lee Trager 2025-07-02  1197  	return err;
2e972f32ae5ff7 Lee Trager 2025-07-02  1198  }
2e972f32ae5ff7 Lee Trager 2025-07-02  1199  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-07-14 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 14:35 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-26  4:12 drivers/net/ethernet/meta/fbnic/fbnic_fw.c:1176 fbnic_fw_xmit_send_logs() warn: sizeof(NUMBER)? kernel test robot
2025-08-22  7:34 kernel test robot

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=202607142214.DTuuzann-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.