[linux-next:master 12875/13109] drivers/parisc/led.c:317:undefined reference to `led_classdev_unregister'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2ee82481c392eec06a7ef28df61b7f0d8e45be2e
commit: c28839537a35ceb04ec08d069b0da190d84f25fc [12875/13109] parisc: led: Rewrite driver to use platform LED code
config: parisc-randconfig-r005-20230828 (https://download.01.org/0day-ci/archive/20230828/202308281723.rU5igcz0-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308281723.rU5igcz0-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308281723.rU5igcz0-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

>> drivers/parisc/led.c:395: warning: Function parameter or member 'model' not described in 'register_led_driver'
>> drivers/parisc/led.c:395: warning: Function parameter or member 'cmd_reg' not described in 'register_led_driver'
>> drivers/parisc/led.c:395: warning: Function parameter or member 'data_reg' not described in 'register_led_driver'
--
   hppa-linux-ld: drivers/parisc/ccio-dma.o: in function `ccio_probe':
   drivers/parisc/ccio-dma.c:1562:(.init.text+0x548): undefined reference to `proc_runway_root'
   hppa-linux-ld: drivers/parisc/ccio-dma.c:1562:(.init.text+0x55c): undefined reference to `proc_runway_root'
   hppa-linux-ld: drivers/parisc/ccio-dma.c:1564:(.init.text+0x580): undefined reference to `proc_runway_root'
   hppa-linux-ld: drivers/parisc/led.o: in function `platform_led_remove':
>> drivers/parisc/led.c:317:(.text+0x1a4): undefined reference to `led_classdev_unregister'
   hppa-linux-ld: drivers/parisc/led.o: in function `platform_led_probe':
>> include/linux/leds.h:278:(.text+0x4b4): undefined reference to `led_classdev_register_ext'
   hppa-linux-ld: drivers/parisc/led.o: in function `platform_led_probe':
   drivers/parisc/led.c:301:(.text+0x520): undefined reference to `led_classdev_unregister'


vim +317 drivers/parisc/led.c

   310	
   311	static int platform_led_remove(struct platform_device *pdev)
   312	{
   313		struct hppa_drvdata *p = platform_get_drvdata(pdev);
   314		int i;
   315	
   316		for (i = 0; i < NUM_LEDS_PER_BOARD; i++)
 > 317			led_classdev_unregister(&p->leds[i].led_cdev);
   318	
   319		return 0;
   320	}
   321	
   322	static struct led_type mainboard_led_types[NUM_LEDS_PER_BOARD] = {
   323		{
   324			.name		= "platform-lan-tx",
   325			.handler	= set_led,
   326			.default_trigger = "tx",
   327		},
   328		{
   329			.name		= "platform-lan-rx",
   330			.handler	= set_led,
   331			.default_trigger = "rx",
   332		},
   333		{
   334			.name		= "platform-disk",
   335			.handler	= set_led,
   336			.default_trigger = "disk-activity",
   337		},
   338		{
   339			.name		= "platform-heartbeat",
   340			.handler	= set_led,
   341			.default_trigger = "heartbeat",
   342		},
   343		{
   344			.name		= "platform-LED4",
   345			.handler	= set_led,
   346			.default_trigger = "panic",
   347		},
   348		{
   349			.name		= "platform-LED5",
   350			.handler	= set_led,
   351			.default_trigger = "panic",
   352		},
   353		{
   354			.name		= "platform-LED6",
   355			.handler	= set_led,
   356			.default_trigger = "panic",
   357		},
   358		{
   359			.name		= "platform-LED7",
   360			.handler	= set_led,
   361			.default_trigger = "panic",
   362		},
   363	};
   364	
   365	static int platform_led_probe(struct platform_device *pdev)
   366	{
   367		return hppa_led_generic_probe(pdev, mainboard_led_types);
   368	}
   369	
   370	MODULE_ALIAS("platform:platform-leds");
   371	
   372	static struct platform_driver hppa_mainboard_led_driver = {
   373		.probe		= platform_led_probe,
   374		.remove		= platform_led_remove,
   375		.driver		= {
   376			.name	= "platform-leds",
   377		},
   378	};
   379	
   380	static struct platform_driver * const drivers[] = {
   381		&hppa_mainboard_led_driver,
   382	};
   383	
   384	static struct platform_device platform_leds = {
   385		.name = "platform-leds",
   386	};
   387	
   388	/**
   389	 *	register_led_driver()
   390	 *
   391	 *	Registers a chassis LED or LCD for usage by this driver.
   392	 *	Only PDC-based, LASI- or ASP-style LCD/LED's are supported.
   393	 */
   394	int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg)
 > 395	{
   396		if (led_func_ptr || !data_reg)
   397			return 1;
   398	
   399		/* No LEDs when running in QEMU */
   400		if (running_on_qemu)
   401			return 1;
   402	
   403		lcd_info.model = model;		/* store the values */
   404		LCD_CMD_REG = (cmd_reg == LED_CMD_REG_NONE) ? 0 : cmd_reg;
   405	
   406		switch (lcd_info.model) {
   407		case DISPLAY_MODEL_LCD:
   408			LCD_DATA_REG = data_reg;
   409			pr_info("led: LCD display at %#lx and %#lx\n",
   410				LCD_CMD_REG , LCD_DATA_REG);
   411			led_func_ptr = led_LCD_driver;
   412			if (lcd_no_led_support)
   413				led_type = LED_HAS_LCD;
   414			else
   415				led_type = LED_HAS_LCD | LED_HAS_LED;
   416			break;
   417	
   418		case DISPLAY_MODEL_LASI:
   419			LED_DATA_REG = data_reg;
   420			led_func_ptr = led_LASI_driver;
   421			pr_info("led: LED display at %#lx\n", LED_DATA_REG);
   422			led_type = LED_HAS_LED;
   423			break;
   424	
   425		case DISPLAY_MODEL_OLD_ASP:
   426			LED_DATA_REG = data_reg;
   427			led_func_ptr = led_ASP_driver;
   428			pr_info("led: LED (ASP-style) display at %#lx\n",
   429			    LED_DATA_REG);
   430			led_type = LED_HAS_LED;
   431			break;
   432	
   433		default:
   434			pr_err("led: Unknown LCD/LED model type %d\n", lcd_info.model);
   435			return 1;
   436		}
   437	
   438		platform_register_drivers(drivers, ARRAY_SIZE(drivers));
   439	
   440		return register_reboot_notifier(&lcd_system_halt_notifier);
   441	}
   442	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux