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, Julia Lawall <julia.lawall@inria.fr>
Subject: drivers/net/ethernet/cisco/enic/enic_res.c:219:2-25: opportunity for str_yes_no(enic -> has_admin_channel)
Date: Tue, 06 Oct 2026 12:16:22 +0200	[thread overview]
Message-ID: <202610061215.L3KeOUeP-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Satish Kharat <satishkh@cisco.com>
CC: Jakub Kicinski <kuba@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2c3418fffa9d037b2038a6db48be63f9e2291806
commit: 4368f5fab419b43068dea912536b1f4a724b4bba enic: detect admin channel resources for SR-IOV
date:   6 months ago
:::::: branch date: 7 hours ago
:::::: commit date: 6 months ago
config: powerpc64-randconfig-r2104-20261005 (https://download.01.org/0day-ci/archive/20261006/202610061215.L3KeOUeP-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 195c81658995a4b7531c30a12c5aef6cf2bbd671)

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: 4368f5fab419 ("enic: detect admin channel resources for SR-IOV")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202610061215.L3KeOUeP-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
   drivers/net/ethernet/cisco/enic/enic_res.c:101:2-25: opportunity for str_yes_no(ENIC_SETTING ( enic , LRO ))
   drivers/net/ethernet/cisco/enic/enic_res.c:102:2-25: opportunity for str_yes_no(ENIC_SETTING ( enic , RSS ))
   drivers/net/ethernet/cisco/enic/enic_res.c:99:2-28: opportunity for str_yes_no(ENIC_SETTING ( enic , RXCSUM ))
   drivers/net/ethernet/cisco/enic/enic_res.c:100:2-25: opportunity for str_yes_no(ENIC_SETTING ( enic , TSO ))
   drivers/net/ethernet/cisco/enic/enic_res.c:98:2-28: opportunity for str_yes_no(ENIC_SETTING ( enic , TXCSUM ))
>> drivers/net/ethernet/cisco/enic/enic_res.c:219:2-25: opportunity for str_yes_no(enic -> has_admin_channel)

vim +219 drivers/net/ethernet/cisco/enic/enic_res.c

01f2e4ead2c512 drivers/net/enic/enic_res.c                Scott Feldman    2008-09-15  194  
01f2e4ead2c512 drivers/net/enic/enic_res.c                Scott Feldman    2008-09-15  195  void enic_get_res_counts(struct enic *enic)
01f2e4ead2c512 drivers/net/enic/enic_res.c                Scott Feldman    2008-09-15  196  {
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  197  	enic->wq_avail = vnic_dev_get_res_count(enic->vdev, RES_TYPE_WQ);
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  198  	enic->rq_avail = vnic_dev_get_res_count(enic->vdev, RES_TYPE_RQ);
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  199  	enic->cq_avail = vnic_dev_get_res_count(enic->vdev, RES_TYPE_CQ);
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  200  	enic->intr_avail = vnic_dev_get_res_count(enic->vdev,
717258ba4b3ecc drivers/net/enic/enic_res.c                Vasanthy Kolluri 2010-10-20  201  						  RES_TYPE_INTR_CTRL);
01f2e4ead2c512 drivers/net/enic/enic_res.c                Scott Feldman    2008-09-15  202  
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  203  	enic->wq_count = enic->wq_avail;
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  204  	enic->rq_count = enic->rq_avail;
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  205  	enic->cq_count = enic->cq_avail;
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  206  	enic->intr_count = enic->intr_avail;
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  207  
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  208  	enic->has_admin_channel =
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  209  		vnic_dev_get_res_count(enic->vdev, RES_TYPE_ADMIN_WQ) >= 1 &&
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  210  		vnic_dev_get_res_count(enic->vdev, RES_TYPE_ADMIN_RQ) >= 1 &&
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  211  		vnic_dev_get_res_count(enic->vdev, RES_TYPE_ADMIN_CQ) >=
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  212  			ARRAY_SIZE(enic->admin_cq) &&
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  213  		vnic_dev_get_res_count(enic->vdev, RES_TYPE_SRIOV_INTR) >= 1;
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  214  
a7a79debcca02f drivers/net/enic/enic_res.c                Vasanthy Kolluri 2010-06-24  215  	dev_info(enic_get_dev(enic),
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  216  		"vNIC resources avail: wq %d rq %d cq %d intr %d admin %s\n",
5aee3324724a7a drivers/net/ethernet/cisco/enic/enic_res.c Nelson Escobar   2024-11-13  217  		enic->wq_avail, enic->rq_avail,
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01  218  		enic->cq_avail, enic->intr_avail,
4368f5fab419b4 drivers/net/ethernet/cisco/enic/enic_res.c Satish Kharat    2026-04-01 @219  		enic->has_admin_channel ? "yes" : "no");
01f2e4ead2c512 drivers/net/enic/enic_res.c                Scott Feldman    2008-09-15  220  }
01f2e4ead2c512 drivers/net/enic/enic_res.c                Scott Feldman    2008-09-15  221  

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

                 reply	other threads:[~2026-10-06 10:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202610061215.L3KeOUeP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --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.