mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: kbuild-all@01.org, linux-leds@vger.kernel.org,
	jacek.anaszewski@gmail.com,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-omap@vger.kernel.org, tony@atomide.com, sre@kernel.org,
	nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org
Subject: Re: [rfc] leds: add TI LMU backlight driver
Date: Fri, 31 Aug 2018 04:37:58 +0800	[thread overview]
Message-ID: <201808310341.F8E7Fiqo%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180829212032.GB15786@amd>

[-- Attachment #1: Type: text/plain, Size: 5551 bytes --]

Hi Pavel,

I love your patch! Yet something to improve:

[auto build test ERROR on j.anaszewski-leds/for-next]
[also build test ERROR on v4.19-rc1 next-20180830]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Pavel-Machek/leds-add-TI-LMU-backlight-driver/20180830-220414
base:   https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git for-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/leds/ti-lmu-backlight-core.c: In function 'ti_lmu_bl_init':
>> drivers/leds/ti-lmu-backlight-core.c:412:19: error: 'struct ti_lmu' has no member named 'backlight_initialized'
     if (lmu_bank->lmu->backlight_initialized)
                      ^~
   drivers/leds/ti-lmu-backlight-core.c:414:15: error: 'struct ti_lmu' has no member named 'backlight_initialized'
     lmu_bank->lmu->backlight_initialized = true;
                  ^~
   drivers/leds/ti-lmu-backlight-core.c: In function 'ti_lmu_bl_probe':
>> drivers/leds/ti-lmu-backlight-core.c:496:43: error: 'struct ti_lmu' has no member named 'id'
     lmu_bank->cfg = &lmu_bl_cfg[lmu_bank->lmu->id];
                                              ^~

vim +412 drivers/leds/ti-lmu-backlight-core.c

   403	
   404	static int ti_lmu_bl_init(struct ti_lmu_bank *lmu_bank)
   405	{
   406		struct regmap *regmap = lmu_bank->lmu->regmap;
   407		const struct lmu_bl_reg_data *regdata =
   408			lmu_bank->cfg->reginfo->init;
   409		int num_init = lmu_bank->cfg->reginfo->num_init;
   410		int i, ret;
   411	
 > 412		if (lmu_bank->lmu->backlight_initialized)
   413			return 0;
   414		lmu_bank->lmu->backlight_initialized = true;
   415	
   416		for (i = 0; regdata && i < num_init; i++) {
   417			ret = regmap_update_bits(regmap, regdata->reg, regdata->mask,
   418						 regdata->val);
   419			if (ret)
   420				return ret;
   421	
   422			regdata++;
   423		}
   424	
   425		return 0;
   426	}
   427	
   428	static int ti_lmu_bl_reload(struct ti_lmu_bank *lmu_bank)
   429	{
   430		int err;
   431	
   432		ti_lmu_bl_init(lmu_bank);
   433	
   434		err = ti_lmu_bl_configure(lmu_bank);
   435		if (err)
   436			return err;
   437	
   438		printk("lmu: set_brightness %d\n", lmu_bank->default_brightness);		
   439		return ti_lmu_bl_set_brightness(lmu_bank, lmu_bank->current_brightness);
   440	}
   441	
   442	static int ti_lmu_bl_monitor_notifier(struct notifier_block *nb,
   443						     unsigned long action, void *unused)
   444	{
   445		struct ti_lmu_bank *lmu_bank = container_of(nb, struct ti_lmu_bank, nb);
   446	
   447		if (action == LMU_EVENT_MONITOR_DONE) {
   448			if (ti_lmu_bl_reload(lmu_bank))
   449				return NOTIFY_STOP;
   450		}
   451	
   452		return NOTIFY_OK;
   453	}
   454	
   455	static int ti_lmu_bl_probe(struct platform_device *pdev)
   456	{
   457		struct ti_lmu_bank *lmu_bank;
   458		int err;
   459	
   460		printk("lmu: bl probe\n");
   461		err = setup_of_node(pdev);
   462		if (err)
   463			return err;
   464	
   465		printk("lmu: bank\n");	
   466		lmu_bank = devm_kzalloc(&pdev->dev, sizeof(*lmu_bank), GFP_KERNEL);
   467		if (!lmu_bank)
   468			return -ENOMEM;
   469		lmu_bank->dev = &pdev->dev;
   470		dev_set_drvdata(&pdev->dev, lmu_bank);
   471	
   472		err = device_property_read_string(&pdev->dev, "label",
   473						  &lmu_bank->label);
   474		if (err)
   475			return err;
   476	
   477		if (!strcmp(lmu_bank->label, "keyboard")) {
   478			lmu_bank->label = "kbd_backlight";
   479		} else
   480			lmu_bank->default_brightness = 255;
   481	
   482		lmu_bank->leds = ti_lmu_parse_led_sources(&pdev->dev);
   483		if (lmu_bank->leds < 0)
   484			return lmu_bank->leds;
   485		else if (lmu_bank->leds == 0)
   486			return -EINVAL;
   487	
   488		device_property_read_u32(&pdev->dev, "default-brightness-level",
   489					 &lmu_bank->default_brightness);
   490		device_property_read_u32(&pdev->dev, "ti,ramp-up-ms",
   491					 &lmu_bank->ramp_up_msec);
   492		device_property_read_u32(&pdev->dev, "ti,ramp-down-ms",
   493					 &lmu_bank->ramp_down_msec);
   494		
   495		lmu_bank->lmu = dev_get_drvdata(pdev->dev.parent);
 > 496		lmu_bank->cfg = &lmu_bl_cfg[lmu_bank->lmu->id];
   497		lmu_bank->bank_id = pdev->id;
   498	
   499		ti_lmu_bl_init(lmu_bank);
   500	
   501		err = ti_lmu_bl_configure(lmu_bank);
   502		if (err)
   503			return err;
   504	
   505		err = ti_lmu_bl_add_device(lmu_bank);
   506		if (err)
   507			return err;
   508	
   509		printk("lmu: brightness\n");		
   510		err = ti_lmu_bl_set_brightness(lmu_bank,
   511						      lmu_bank->default_brightness);
   512		if (err)
   513			return err;
   514	
   515		/*
   516		 * Notifier callback is required because backlight device needs
   517		 * reconfiguration after fault detection procedure is done by
   518		 * ti-lmu-fault-monitor driver.
   519		 */
   520		if (lmu_bank->cfg->fault_monitor_used) {
   521			lmu_bank->nb.notifier_call = ti_lmu_bl_monitor_notifier;
   522			err = blocking_notifier_chain_register(&lmu_bank->lmu->notifier,
   523							       &lmu_bank->nb);
   524			if (err)
   525				return err;
   526		}
   527	
   528		return 0;
   529	}
   530	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65148 bytes --]

      parent reply	other threads:[~2018-08-30 20:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 21:20 Pavel Machek
2018-08-30  8:22 ` [PATCH] " Pavel Machek
2018-08-30 16:40   ` Tony Lindgren
2018-08-30 19:20   ` Jacek Anaszewski
2018-08-30 19:41 ` [rfc] " Dan Murphy
2018-08-30 20:18   ` Pavel Machek
2018-08-31 12:19     ` Dan Murphy
2018-08-31 21:30       ` Pavel Machek
2018-09-04 14:34         ` Dan Murphy
2018-09-06 10:16           ` Pavel Machek
2018-08-30 20:37 ` kbuild test robot [this message]

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=201808310341.F8E7Fiqo%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=mpartap@gmx.net \
    --cc=nekit1000@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®