* [tty:tty-next 28/31] drivers/tty/serial/max310x.c:1507:20: warning: 'max310x_regmap_name' defined but not used
@ 2026-05-12 19:53 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-12 19:53 UTC (permalink / raw)
To: Hugo Villeneuve; +Cc: oe-kbuild-all, linux-serial, Greg Kroah-Hartman
Hi Hugo,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
head: 16e95bfb79b5d9d01dc7651d98caf3c2ace331cd
commit: 20ffe4b3330a8bde9e933e9ba2323d5e9386caa5 [28/31] serial: max310x: allow driver to be built with SPI or I2C
config: powerpc64-randconfig-001-20260513 (https://download.01.org/0day-ci/archive/20260513/202605130334.e6V1YDQN-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260513/202605130334.e6V1YDQN-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/202605130334.e6V1YDQN-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/tty/serial/max310x.c: In function 'max310x_uart_init':
drivers/tty/serial/max310x.c:1730:1: warning: label 'err_spi_register' defined but not used [-Wunused-label]
err_spi_register:
^~~~~~~~~~~~~~~~
At top level:
>> drivers/tty/serial/max310x.c:1507:20: warning: 'max310x_regmap_name' defined but not used [-Wunused-function]
static const char *max310x_regmap_name(u8 port_id)
^~~~~~~~~~~~~~~~~~~
drivers/tty/serial/max310x.c:1492:29: warning: 'regcfg' defined but not used [-Wunused-variable]
static struct regmap_config regcfg = {
^~~~~~
>> drivers/tty/serial/max310x.c:1464:13: warning: 'max310x_remove' defined but not used [-Wunused-function]
static void max310x_remove(struct device *dev)
^~~~~~~~~~~~~~
>> drivers/tty/serial/max310x.c:1280:12: warning: 'max310x_probe' defined but not used [-Wunused-function]
static int max310x_probe(struct device *dev, const struct max310x_devtype *devtype,
^~~~~~~~~~~~~
vim +/max310x_regmap_name +1507 drivers/tty/serial/max310x.c
f65444187a66bf Alexander Shiyan 2012-08-06 1463
70b4d23226c85a Uwe Kleine-König 2021-10-12 @1464 static void max310x_remove(struct device *dev)
f65444187a66bf Alexander Shiyan 2012-08-06 1465 {
f65444187a66bf Alexander Shiyan 2012-08-06 1466 struct max310x_port *s = dev_get_drvdata(dev);
88d5e520aa9701 abdoulaye berthe 2014-07-12 1467 int i;
f65444187a66bf Alexander Shiyan 2012-08-06 1468
6286767ad3afc8 Alexander Shiyan 2016-06-07 1469 for (i = 0; i < s->devtype->nr; i++) {
10d8b34a421716 Alexander Shiyan 2013-06-29 1470 cancel_work_sync(&s->p[i].tx_work);
e7b8a3ceff5e5c Alexander Shiyan 2014-02-07 1471 cancel_work_sync(&s->p[i].md_work);
5bdb48b501e836 Alexander Shiyan 2016-06-07 1472 cancel_work_sync(&s->p[i].rs_work);
5d888f1c32e228 Hugo Villeneuve 2024-01-18 1473
5d888f1c32e228 Hugo Villeneuve 2024-01-18 1474 if (test_and_clear_bit(s->p[i].port.line, max310x_lines))
6286767ad3afc8 Alexander Shiyan 2016-06-07 1475 uart_remove_one_port(&max310x_uart, &s->p[i].port);
5d888f1c32e228 Hugo Villeneuve 2024-01-18 1476
9464833a765f66 Hugo Villeneuve 2024-01-18 1477 max310x_power(&s->p[i].port, 0);
10d8b34a421716 Alexander Shiyan 2013-06-29 1478 }
f65444187a66bf Alexander Shiyan 2012-08-06 1479
d3a8a252e177cf Alexander Shiyan 2014-02-10 1480 clk_disable_unprepare(s->clk);
f65444187a66bf Alexander Shiyan 2012-08-06 1481 }
f65444187a66bf Alexander Shiyan 2012-08-06 1482
58afc909772c9b Alexander Shiyan 2014-02-10 1483 static const struct of_device_id __maybe_unused max310x_dt_ids[] = {
58afc909772c9b Alexander Shiyan 2014-02-10 1484 { .compatible = "maxim,max3107", .data = &max3107_devtype, },
58afc909772c9b Alexander Shiyan 2014-02-10 1485 { .compatible = "maxim,max3108", .data = &max3108_devtype, },
58afc909772c9b Alexander Shiyan 2014-02-10 1486 { .compatible = "maxim,max3109", .data = &max3109_devtype, },
58afc909772c9b Alexander Shiyan 2014-02-10 1487 { .compatible = "maxim,max14830", .data = &max14830_devtype },
58afc909772c9b Alexander Shiyan 2014-02-10 1488 { }
58afc909772c9b Alexander Shiyan 2014-02-10 1489 };
58afc909772c9b Alexander Shiyan 2014-02-10 1490 MODULE_DEVICE_TABLE(of, max310x_dt_ids);
58afc909772c9b Alexander Shiyan 2014-02-10 1491
27027a70e21f62 Alexander Shiyan 2014-02-10 1492 static struct regmap_config regcfg = {
27027a70e21f62 Alexander Shiyan 2014-02-10 1493 .reg_bits = 8,
27027a70e21f62 Alexander Shiyan 2014-02-10 1494 .val_bits = 8,
d584b65c0ddf20 Jan Kundrát 2017-12-13 1495 .write_flag_mask = MAX310X_WRITE_BIT,
c9615d34ce2619 wangkaiyuan 2024-03-18 1496 .cache_type = REGCACHE_MAPLE,
6ef281daf02059 Cosmin Tanislav 2022-06-05 1497 .max_register = MAX310X_REG_1F,
27027a70e21f62 Alexander Shiyan 2014-02-10 1498 .writeable_reg = max310x_reg_writeable,
27027a70e21f62 Alexander Shiyan 2014-02-10 1499 .volatile_reg = max310x_reg_volatile,
27027a70e21f62 Alexander Shiyan 2014-02-10 1500 .precious_reg = max310x_reg_precious,
3f42b142ea1171 Jan Kundrát 2023-04-05 1501 .writeable_noinc_reg = max310x_reg_noinc,
3f42b142ea1171 Jan Kundrát 2023-04-05 1502 .readable_noinc_reg = max310x_reg_noinc,
3f42b142ea1171 Jan Kundrát 2023-04-05 1503 .max_raw_read = MAX310X_FIFO_SIZE,
3f42b142ea1171 Jan Kundrát 2023-04-05 1504 .max_raw_write = MAX310X_FIFO_SIZE,
27027a70e21f62 Alexander Shiyan 2014-02-10 1505 };
27027a70e21f62 Alexander Shiyan 2014-02-10 1506
609aabb259d497 Hugo Villeneuve 2024-01-18 @1507 static const char *max310x_regmap_name(u8 port_id)
609aabb259d497 Hugo Villeneuve 2024-01-18 1508 {
609aabb259d497 Hugo Villeneuve 2024-01-18 1509 switch (port_id) {
609aabb259d497 Hugo Villeneuve 2024-01-18 1510 case 0: return "port0";
609aabb259d497 Hugo Villeneuve 2024-01-18 1511 case 1: return "port1";
609aabb259d497 Hugo Villeneuve 2024-01-18 1512 case 2: return "port2";
609aabb259d497 Hugo Villeneuve 2024-01-18 1513 case 3: return "port3";
609aabb259d497 Hugo Villeneuve 2024-01-18 1514 default:
609aabb259d497 Hugo Villeneuve 2024-01-18 1515 WARN_ON(true);
609aabb259d497 Hugo Villeneuve 2024-01-18 1516 return NULL;
609aabb259d497 Hugo Villeneuve 2024-01-18 1517 }
609aabb259d497 Hugo Villeneuve 2024-01-18 1518 }
609aabb259d497 Hugo Villeneuve 2024-01-18 1519
:::::: The code at line 1507 was first introduced by commit
:::::: 609aabb259d497578ffa2d66ced57c22044f821c serial: max310x: use separate regmap name for each port
:::::: TO: Hugo Villeneuve <hvilleneuve@dimonoff.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-12 19:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 19:53 [tty:tty-next 28/31] drivers/tty/serial/max310x.c:1507:20: warning: 'max310x_regmap_name' defined but not used kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox