From: kernel test robot <lkp@intel.com>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [jirislaby:devel 48/88] drivers/net/usb/lan78xx.c:2459:22: warning: variable 'of_node' set but not used
Date: Thu, 6 Mar 2025 15:31:43 +0800 [thread overview]
Message-ID: <202503061520.5GrwtX36-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 321d82b640b78daba94d863283761c8fe95d17d7
commit: 9cdfa882e0196b967a675b0af9fe4c29882400a2 [48/88] irqdomain: net: Stop using irq_domain_add_simple()
config: i386-buildonly-randconfig-006-20250306 (https://download.01.org/0day-ci/archive/20250306/202503061520.5GrwtX36-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250306/202503061520.5GrwtX36-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/202503061520.5GrwtX36-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/usb/lan78xx.c:6:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:43:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/x86/include/asm/cacheflush.h:5:
In file included from include/linux/mm.h:2287:
include/linux/vmstat.h:507:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
507 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/net/usb/lan78xx.c:2459:22: warning: variable 'of_node' set but not used [-Wunused-but-set-variable]
2459 | struct device_node *of_node;
| ^
drivers/net/usb/lan78xx.c:2516:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
2516 | int ret;
| ^
3 warnings generated.
vim +/of_node +2459 drivers/net/usb/lan78xx.c
cc89c323a30e73 Woojung Huh 2016-11-01 2456
cc89c323a30e73 Woojung Huh 2016-11-01 2457 static int lan78xx_setup_irq_domain(struct lan78xx_net *dev)
cc89c323a30e73 Woojung Huh 2016-11-01 2458 {
cc89c323a30e73 Woojung Huh 2016-11-01 @2459 struct device_node *of_node;
cc89c323a30e73 Woojung Huh 2016-11-01 2460 struct irq_domain *irqdomain;
cc89c323a30e73 Woojung Huh 2016-11-01 2461 unsigned int irqmap = 0;
cc89c323a30e73 Woojung Huh 2016-11-01 2462 u32 buf;
cc89c323a30e73 Woojung Huh 2016-11-01 2463 int ret = 0;
cc89c323a30e73 Woojung Huh 2016-11-01 2464
cc89c323a30e73 Woojung Huh 2016-11-01 2465 of_node = dev->udev->dev.parent->of_node;
cc89c323a30e73 Woojung Huh 2016-11-01 2466
cc89c323a30e73 Woojung Huh 2016-11-01 2467 mutex_init(&dev->domain_data.irq_lock);
cc89c323a30e73 Woojung Huh 2016-11-01 2468
d354d008255ffd Oleksij Rempel 2024-12-09 2469 ret = lan78xx_read_reg(dev, INT_EP_CTL, &buf);
d354d008255ffd Oleksij Rempel 2024-12-09 2470 if (ret < 0)
d354d008255ffd Oleksij Rempel 2024-12-09 2471 return ret;
d354d008255ffd Oleksij Rempel 2024-12-09 2472
cc89c323a30e73 Woojung Huh 2016-11-01 2473 dev->domain_data.irqenable = buf;
cc89c323a30e73 Woojung Huh 2016-11-01 2474
cc89c323a30e73 Woojung Huh 2016-11-01 2475 dev->domain_data.irqchip = &lan78xx_irqchip;
cc89c323a30e73 Woojung Huh 2016-11-01 2476 dev->domain_data.irq_handler = handle_simple_irq;
cc89c323a30e73 Woojung Huh 2016-11-01 2477
9cdfa882e0196b Jiri Slaby (SUSE 2025-02-26 2478) irqdomain = irq_domain_create_simple(of_fwnode_handle(of_node),
9cdfa882e0196b Jiri Slaby (SUSE 2025-02-26 2479) MAX_INT_EP, 0,
9cdfa882e0196b Jiri Slaby (SUSE 2025-02-26 2480) &chip_domain_ops,
9cdfa882e0196b Jiri Slaby (SUSE 2025-02-26 2481) &dev->domain_data);
cc89c323a30e73 Woojung Huh 2016-11-01 2482 if (irqdomain) {
cc89c323a30e73 Woojung Huh 2016-11-01 2483 /* create mapping for PHY interrupt */
cc89c323a30e73 Woojung Huh 2016-11-01 2484 irqmap = irq_create_mapping(irqdomain, INT_EP_PHY);
cc89c323a30e73 Woojung Huh 2016-11-01 2485 if (!irqmap) {
cc89c323a30e73 Woojung Huh 2016-11-01 2486 irq_domain_remove(irqdomain);
cc89c323a30e73 Woojung Huh 2016-11-01 2487
cc89c323a30e73 Woojung Huh 2016-11-01 2488 irqdomain = NULL;
cc89c323a30e73 Woojung Huh 2016-11-01 2489 ret = -EINVAL;
cc89c323a30e73 Woojung Huh 2016-11-01 2490 }
cc89c323a30e73 Woojung Huh 2016-11-01 2491 } else {
cc89c323a30e73 Woojung Huh 2016-11-01 2492 ret = -EINVAL;
cc89c323a30e73 Woojung Huh 2016-11-01 2493 }
cc89c323a30e73 Woojung Huh 2016-11-01 2494
cc89c323a30e73 Woojung Huh 2016-11-01 2495 dev->domain_data.irqdomain = irqdomain;
cc89c323a30e73 Woojung Huh 2016-11-01 2496 dev->domain_data.phyirq = irqmap;
cc89c323a30e73 Woojung Huh 2016-11-01 2497
cc89c323a30e73 Woojung Huh 2016-11-01 2498 return ret;
cc89c323a30e73 Woojung Huh 2016-11-01 2499 }
cc89c323a30e73 Woojung Huh 2016-11-01 2500
:::::: The code at line 2459 was first introduced by commit
:::::: cc89c323a30e73114a21fc125d2f841658a09987 lan78xx: Use irq_domain for phy interrupt from USB Int. EP
:::::: TO: Woojung Huh <woojung.huh@microchip.com>
:::::: CC: David S. Miller <davem@davemloft.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-03-06 7:32 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=202503061520.5GrwtX36-lkp@intel.com \
--to=lkp@intel.com \
--cc=jirislaby@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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.