All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Lee Jones" <lee@kernel.org>,
	"Benson Leung" <bleung@chromium.org>,
	"Guenter Roeck" <groeck@chromium.org>,
	"Tzung-Bi Shih" <tzungbi@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, chrome-platform@lists.linux.dev,
	linux-kernel@vger.kernel.org, "Dustin Howett" <dustin@howett.net>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>
Subject: Re: [PATCH] platform/chrome: cros_kbd_led_backlight: enable probing through EC_FEATURE_PWM_KEYB
Date: Mon, 6 May 2024 06:44:32 +0800	[thread overview]
Message-ID: <202405060653.uskC4eSJ-lkp@intel.com> (raw)
In-Reply-To: <20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2@weissschuh.net>

Hi Thomas,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 2fbe479c0024e1c6b992184a799055e19932aa48]

url:    https://github.com/intel-lab-lkp/linux/commits/Thomas-Wei-schuh/platform-chrome-cros_kbd_led_backlight-enable-probing-through-EC_FEATURE_PWM_KEYB/20240505-174413
base:   2fbe479c0024e1c6b992184a799055e19932aa48
patch link:    https://lore.kernel.org/r/20240505-cros_ec-kbd-led-framework-v1-1-bfcca69013d2%40weissschuh.net
patch subject: [PATCH] platform/chrome: cros_kbd_led_backlight: enable probing through EC_FEATURE_PWM_KEYB
config: x86_64-randconfig-014-20240506 (https://download.01.org/0day-ci/archive/20240506/202405060653.uskC4eSJ-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240506/202405060653.uskC4eSJ-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/202405060653.uskC4eSJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/platform/chrome/cros_kbd_led_backlight.c:218:42: error: redefinition of 'keyboard_led_drvdata_ec_pwm'
     218 | static const struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm = {};
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/chrome/cros_kbd_led_backlight.c:184:57: note: previous definition of 'keyboard_led_drvdata_ec_pwm' with type 'const struct keyboard_led_drvdata'
     184 | static const __maybe_unused struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm = {
         |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/chrome/cros_kbd_led_backlight.c: In function 'keyboard_led_probe':
   drivers/platform/chrome/cros_kbd_led_backlight.c:240:28: error: 'keyboard_led_drvdata_ec_pwm_mfd' undeclared (first use in this function); did you mean 'keyboard_led_drvdata_ec_pwm'?
     240 |                 drvdata = &keyboard_led_drvdata_ec_pwm_mfd;
         |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                            keyboard_led_drvdata_ec_pwm
   drivers/platform/chrome/cros_kbd_led_backlight.c:240:28: note: each undeclared identifier is reported only once for each function it appears in
   drivers/platform/chrome/cros_kbd_led_backlight.c: At top level:
>> drivers/platform/chrome/cros_kbd_led_backlight.c:218:42: warning: 'keyboard_led_drvdata_ec_pwm' defined but not used [-Wunused-const-variable=]
     218 | static const struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm = {};
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/keyboard_led_drvdata_ec_pwm +218 drivers/platform/chrome/cros_kbd_led_backlight.c

   217	
 > 218	static const struct keyboard_led_drvdata keyboard_led_drvdata_ec_pwm = {};
   219	
   220	#endif /* IS_ENABLED(CONFIG_MFD_CROS_EC_DEV) */
   221	
   222	static int keyboard_led_is_mfd_device(struct platform_device *pdev)
   223	{
   224		if (!IS_ENABLED(CONFIG_MFD_CROS_EC_DEV))
   225			return 0;
   226	
   227		if (!pdev->dev.parent)
   228			return 0;
   229	
   230		return strcmp(pdev->dev.parent->driver->name, "cros-ec-dev") == 0;
   231	}
   232	
   233	static int keyboard_led_probe(struct platform_device *pdev)
   234	{
   235		const struct keyboard_led_drvdata *drvdata;
   236		struct keyboard_led *keyboard_led;
   237		int error;
   238	
   239		if (keyboard_led_is_mfd_device(pdev))
 > 240			drvdata = &keyboard_led_drvdata_ec_pwm_mfd;
   241		else
   242			drvdata = device_get_match_data(&pdev->dev);
   243		if (!drvdata)
   244			return -EINVAL;
   245	
   246		keyboard_led = devm_kzalloc(&pdev->dev, sizeof(*keyboard_led), GFP_KERNEL);
   247		if (!keyboard_led)
   248			return -ENOMEM;
   249		platform_set_drvdata(pdev, keyboard_led);
   250	
   251		if (drvdata->init) {
   252			error = drvdata->init(pdev);
   253			if (error)
   254				return error;
   255		}
   256	
   257		keyboard_led->cdev.name = "chromeos::kbd_backlight";
   258		keyboard_led->cdev.flags |= LED_CORE_SUSPENDRESUME;
   259		keyboard_led->cdev.max_brightness = drvdata->max_brightness;
   260		keyboard_led->cdev.brightness_set = drvdata->brightness_set;
   261		keyboard_led->cdev.brightness_set_blocking = drvdata->brightness_set_blocking;
   262		keyboard_led->cdev.brightness_get = drvdata->brightness_get;
   263	
   264		error = devm_led_classdev_register(&pdev->dev, &keyboard_led->cdev);
   265		if (error)
   266			return error;
   267	
   268		return 0;
   269	}
   270	

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

  parent reply	other threads:[~2024-05-05 22:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05  9:41 [PATCH] platform/chrome: cros_kbd_led_backlight: enable probing through EC_FEATURE_PWM_KEYB Thomas Weißschuh
2024-05-05 13:42 ` Mario Limonciello
2024-05-06 17:38   ` Thomas Weißschuh
2024-05-09  4:25     ` Tzung-Bi Shih
2024-05-09  8:13       ` Thomas Weißschuh
2024-05-09  9:28         ` Tzung-Bi Shih
2024-05-05 21:08 ` kernel test robot
2024-05-05 22:33 ` kernel test robot
2024-05-05 22:44 ` kernel test robot [this message]
2024-05-07  8:29 ` Lee Jones

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=202405060653.uskC4eSJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=dustin@howett.net \
    --cc=groeck@chromium.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=mario.limonciello@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tzungbi@kernel.org \
    /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.