Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260AbbGULOp (ORCPT ); Tue, 21 Jul 2015 07:14:45 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56834 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbbGULOm (ORCPT ); Tue, 21 Jul 2015 07:14:42 -0400 Message-ID: <55AE299F.3010002@suse.cz> Date: Tue, 21 Jul 2015 13:14:39 +0200 From: Vlastimil Babka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Dmitry Torokhov , Samuel Thibault , Pavel Machek , =?windows-1252?Q?Pali_Roh=E1r?= CC: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, rpurdie@rpsys.net, Greg Kroah-Hartman Subject: Re: [PATCH v2 1/3] Input: export LEDs as class devices in sysfs References: <1433799790-31873-1-git-send-email-dmitry.torokhov@gmail.com> <1433799790-31873-2-git-send-email-dmitry.torokhov@gmail.com> <20150609174211.GH6338@dtor-ws> In-Reply-To: <20150609174211.GH6338@dtor-ws> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6104 Lines: 106 On 06/09/2015 07:42 PM, Dmitry Torokhov wrote: > From: Samuel Thibault > > This change creates a new input handler called "leds" that exports LEDs on input > devices as standard LED class devices in sysfs and allows controlling their > ptate via sysfs or via any of the standard LED triggers. This allows to > re-purpose and reassign LDEs on the keyboards to represent states other > than the standard keyboard states (CapsLock, NumLock, etc). > > The old API of controlling input LEDs by writing into /dev/input/eventX > devices is still present and will take precedence over acessing via LEDs > subsystem (i.e. it may override state set by a trigger). If input device is > "grabbed" then requests coming through LED subsystem will be ignored. > > Signed-off-by: Samuel Thibault > Signed-off-by: Dmitry Torokhov > --- > + led_no = 0; > + for_each_set_bit(led_code, dev->ledbit, LED_CNT) { > + struct input_led *led = &leds->leds[led_no]; > + > + led->handle = &leds->handle; > + led->code = led_code; > + > + if (WARN_ON(!input_led_info[led_code].name)) > + continue; > + Hi, I get several warnings on booting 4.2-rc2 here. Should I be worried? [ 2.782432] ------------[ cut here ]------------ [ 2.782440] WARNING: CPU: 2 PID: 356 at ../drivers/input/input-leds.c:115 input_leds_connect+0x22b/0x260() [ 2.782441] Modules linked in: btrfs xor raid6_pq crc32c_intel radeon i2c_algo_bit sr_mod cdrom drm_kms_helper ttm e1000e drm xhci_pci ptp pps_core xhci_hcd sg [ 2.782453] CPU: 2 PID: 356 Comm: kworker/2:2 Not tainted 4.2.0-rc2-1.g288d56b-desktop #1 [ 2.782454] Hardware name: Dell Inc. OptiPlex 9010/0M9KCM, BIOS A13 03/27/2013 [ 2.782458] Workqueue: usb_hub_wq hub_event [ 2.782459] ffffffff81a917b7 ffff880213ecf298 ffffffff8169f19d 0000000000000007 [ 2.782462] 0000000000000000 ffff880213ecf2d8 ffffffff810674f6 ffff880213ecf2f8 [ 2.782463] ffff8802132fb000 0000000000000003 000000000000000b ffff8800369ff000 [ 2.782465] Call Trace: [ 2.782470] [] dump_stack+0x4c/0x6e [ 2.782474] [] warn_slowpath_common+0x86/0xc0 [ 2.782476] [] warn_slowpath_null+0x1a/0x20 [ 2.782478] [] input_leds_connect+0x22b/0x260 [ 2.782480] [] input_attach_handler+0x1a2/0x1f0 [ 2.782483] [] input_register_device+0x440/0x4f0 [ 2.782486] [] hidinput_connect+0x334/0x5d0 [ 2.782488] [] hid_connect+0x324/0x400 [ 2.782490] [] ? usbhid_start+0x54a/0x780 [ 2.782492] [] hid_device_probe+0x118/0x140 [ 2.782495] [] driver_probe_device+0x1f4/0x460 [ 2.782497] [] __device_attach_driver+0x79/0xa0 [ 2.782499] [] ? __driver_attach+0xa0/0xa0 [ 2.782501] [] bus_for_each_drv+0x5b/0x90 [ 2.782502] [] __device_attach+0xa8/0x120 [ 2.782504] [] device_initial_probe+0x13/0x20 [ 2.782506] [] bus_probe_device+0x9a/0xb0 [ 2.782508] [] device_add+0x3fe/0x670 [ 2.782511] [] ? debugfs_create_file+0xd3/0x110 [ 2.782513] [] hid_add_device+0xcc/0x2a0 [ 2.782515] [] usbhid_probe+0x2e4/0x410 [ 2.782518] [] usb_probe_interface+0x1b2/0x2d0 [ 2.782519] [] driver_probe_device+0x1f4/0x460 [ 2.782521] [] __device_attach_driver+0x79/0xa0 [ 2.782523] [] ? __driver_attach+0xa0/0xa0 [ 2.782525] [] bus_for_each_drv+0x5b/0x90 [ 2.782526] [] __device_attach+0xa8/0x120 [ 2.782528] [] device_initial_probe+0x13/0x20 [ 2.782530] [] bus_probe_device+0x9a/0xb0 [ 2.782531] [] device_add+0x3fe/0x670 [ 2.782533] [] usb_set_configuration+0x501/0x8e0 [ 2.782535] [] ? kernfs_add_one+0xee/0x140 [ 2.782537] [] generic_probe+0x2e/0x80 [ 2.782539] [] usb_probe_device+0x32/0x70 [ 2.782541] [] driver_probe_device+0x1f4/0x460 [ 2.782542] [] __device_attach_driver+0x79/0xa0 [ 2.782544] [] ? __driver_attach+0xa0/0xa0 [ 2.782546] [] bus_for_each_drv+0x5b/0x90 [ 2.782547] [] __device_attach+0xa8/0x120 [ 2.782549] [] device_initial_probe+0x13/0x20 [ 2.782551] [] bus_probe_device+0x9a/0xb0 [ 2.782552] [] device_add+0x3fe/0x670 [ 2.782554] [] ? usb_new_device+0x216/0x5d0 [ 2.782556] [] usb_new_device+0x29e/0x5d0 [ 2.782559] [] ? pm_runtime_set_autosuspend_delay+0x51/0x60 [ 2.782561] [] ? __usb_detect_quirks+0x52/0x110 [ 2.782563] [] hub_port_connect+0x31f/0x9c0 [ 2.782565] [] hub_event+0x6d1/0xb10 [ 2.782568] [] process_one_work+0x159/0x470 [ 2.782570] [] worker_thread+0x48/0x4a0 [ 2.782572] [] ? process_one_work+0x470/0x470 [ 2.782574] [] ? process_one_work+0x470/0x470 [ 2.782576] [] kthread+0xc9/0xe0 [ 2.782579] [] ? kthread_worker_fn+0x170/0x170 [ 2.782581] [] ret_from_fork+0x3f/0x70 [ 2.782583] [] ? kthread_worker_fn+0x170/0x170 [ 2.782585] ---[ end trace ce1cb4ca0f2cbd0b ]--- [ 2.782586] ------------[ cut here ]------------ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/