netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ansuel Smith <ansuelsmth@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>, Pavel Machek <pavel@ucw.cz>
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org
Subject: Re: [PATCH v5 5/8] leds: trigger: netdev: add hardware control support
Date: Thu, 25 Nov 2021 05:50:48 +0800	[thread overview]
Message-ID: <202111250506.dija25Sg-lkp@intel.com> (raw)
In-Reply-To: <20211112153557.26941-6-ansuelsmth@gmail.com>

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@intel.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

  reply	other threads:[~2021-11-24 21:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 15:35 [PATCH v5 0/8] Adds support for PHY LEDs with offload triggers Ansuel Smith
2021-11-12 15:35 ` [PATCH v5 1/8] leds: add support for hardware driven LEDs Ansuel Smith
2021-11-13  1:04   ` Randy Dunlap
2021-11-12 15:35 ` [PATCH v5 2/8] leds: document additional use of blink_set for hardware control Ansuel Smith
2021-11-13  0:55   ` Randy Dunlap
2021-11-12 15:35 ` [PATCH v5 3/8] leds: trigger: netdev: drop NETDEV_LED_MODE_LINKUP from mode Ansuel Smith
2021-11-12 15:35 ` [PATCH v5 4/8] leds: trigger: netdev: rename and expose NETDEV trigger enum and struct Ansuel Smith
2021-11-12 18:58   ` kernel test robot
2021-11-18 15:28   ` kernel test robot
2021-11-22 18:48   ` kernel test robot
2021-11-12 15:35 ` [PATCH v5 5/8] leds: trigger: netdev: add hardware control support Ansuel Smith
2021-11-24 21:50   ` kernel test robot [this message]
2021-11-12 15:35 ` [PATCH v5 6/8] leds: trigger: add hardware-phy-activity trigger Ansuel Smith
2021-11-13  0:52   ` Randy Dunlap
2021-11-16 22:20   ` kernel test robot
2021-11-12 15:35 ` [PATCH v5 7/8] net: dsa: qca8k: add LEDs support Ansuel Smith
2021-11-12 15:35 ` [PATCH v5 8/8] dt-bindings: net: dsa: qca8k: add LEDs definition example Ansuel Smith
2021-11-28 23:11   ` Rob Herring

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=202111250506.dija25Sg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).