[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111250506.dija25Sg-lkp@intel.com>
Date: Thu, 25 Nov 2021 05:50:48 +0800
From: kernel test robot <lkp@...el.com>
To: Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Jonathan Corbet <corbet@....net>, Pavel Machek <pavel@....cz>
Cc: kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: Re: [PATCH v5 5/8] leds: trigger: netdev: add hardware control
support
Hi Ansuel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net/master]
[also build test WARNING on linus/master v5.16-rc2 next-20211124]
[cannot apply to pavel-leds/for-next robh/for-next net-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ansuel-Smith/Adds-support-for-PHY-LEDs-with-offload-triggers/20211112-233807
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 5833291ab6de9c3e2374336b51c814e515e8f3a5
config: h8300-randconfig-s031-20211115 (https://download.01.org/0day-ci/archive/20211125/202111250506.dija25Sg-lkp@intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/d5fdf1b98c9c9e1e89f59a3db1d863683be8e401
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ansuel-Smith/Adds-support-for-PHY-LEDs-with-offload-triggers/20211112-233807
git checkout d5fdf1b98c9c9e1e89f59a3db1d863683be8e401
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/leds/trigger/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/leds/trigger/ledtrig-netdev.c:55:61: sparse: sparse: Using plain integer as NULL pointer
drivers/leds/trigger/ledtrig-netdev.c:55:64: sparse: sparse: Using plain integer as NULL pointer
vim +55 drivers/leds/trigger/ledtrig-netdev.c
44
45 static void set_baseline_state(struct led_netdev_data *trigger_data)
46 {
47 int current_brightness, can_offload;
48 struct led_classdev *led_cdev = trigger_data->led_cdev;
49
50 if (LED_HARDWARE_CONTROLLED & led_cdev->flags) {
51 /* Check if blink mode can he set in hardware mode.
52 * The LED driver will chose a interval based on the trigger_data
53 * and its implementation.
54 */
> 55 can_offload = led_cdev->blink_set(led_cdev, 0, 0);
56
57 /* If blink_set doesn't return error we can run in hardware mode
58 * So actually activate it.
59 */
60 if (!can_offload) {
61 led_cdev->hw_control_start(led_cdev);
62 return;
63 }
64 }
65
66 /* If LED supports only hardware mode and we reach this point,
67 * then skip any software handling.
68 */
69 if (!(LED_SOFTWARE_CONTROLLED & led_cdev->flags))
70 return;
71
72 current_brightness = led_cdev->brightness;
73 if (current_brightness)
74 led_cdev->blink_brightness = current_brightness;
75 if (!led_cdev->blink_brightness)
76 led_cdev->blink_brightness = led_cdev->max_brightness;
77
78 if (!trigger_data->carrier_link_up) {
79 led_set_brightness(led_cdev, LED_OFF);
80 } else {
81 if (test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode))
82 led_set_brightness(led_cdev,
83 led_cdev->blink_brightness);
84 else
85 led_set_brightness(led_cdev, LED_OFF);
86
87 /* If we are looking for RX/TX start periodically
88 * checking stats
89 */
90 if (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ||
91 test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
92 schedule_delayed_work(&trigger_data->work, 0);
93 }
94 }
95
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists