[gpio:gpio-descriptors-regulator 15/26] drivers//regulator/lp8788-ldo.c:511:9: error: expected ';' before 'PTR_ERR'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-regulator
head:   0e78939e6e7091d8e0cb6d259758eab6874145e6
commit: 18fc2af37b0077c2be1bb72a2eb3da5b0328c5d9 [15/26] regulator: lp8788-ldo: Pass descriptor instead of GPIO number
config: x86_64-randconfig-x018-201800 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout 18fc2af37b0077c2be1bb72a2eb3da5b0328c5d9
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//regulator/lp8788-ldo.c: In function 'lp8788_config_ldo_enable_mode':
>> drivers//regulator/lp8788-ldo.c:511:3: error: 'retur' undeclared (first use in this function)
      retur PTR_ERR(ldo->ena->gpiod);
      ^~~~~
   drivers//regulator/lp8788-ldo.c:511:3: note: each undeclared identifier is reported only once for each function it appears in
>> drivers//regulator/lp8788-ldo.c:511:9: error: expected ';' before 'PTR_ERR'
      retur PTR_ERR(ldo->ena->gpiod);
            ^~~~~~~
   drivers//regulator/lp8788-ldo.c:470:31: warning: unused variable 'pdata' [-Wunused-variable]
     struct lp8788_platform_data *pdata = lp->pdata;
                                  ^~~~~

vim +511 drivers//regulator/lp8788-ldo.c

   464	
   465	static int lp8788_config_ldo_enable_mode(struct platform_device *pdev,
   466						struct lp8788_ldo *ldo,
   467						enum lp8788_ldo_id id)
   468	{
   469		struct lp8788 *lp = ldo->lp;
   470		struct lp8788_platform_data *pdata = lp->pdata;
   471		enum lp8788_ext_ldo_en_id enable_id;
   472		u8 en_mask[] = {
   473			[EN_ALDO1]   = LP8788_EN_SEL_ALDO1_M,
   474			[EN_ALDO234] = LP8788_EN_SEL_ALDO234_M,
   475			[EN_ALDO5]   = LP8788_EN_SEL_ALDO5_M,
   476			[EN_ALDO7]   = LP8788_EN_SEL_ALDO7_M,
   477			[EN_DLDO7]   = LP8788_EN_SEL_DLDO7_M,
   478			[EN_DLDO911] = LP8788_EN_SEL_DLDO911_M,
   479		};
   480	
   481		switch (id) {
   482		case DLDO7:
   483			enable_id = EN_DLDO7;
   484			break;
   485		case DLDO9:
   486		case DLDO11:
   487			enable_id = EN_DLDO911;
   488			break;
   489		case ALDO1:
   490			enable_id = EN_ALDO1;
   491			break;
   492		case ALDO2 ... ALDO4:
   493			enable_id = EN_ALDO234;
   494			break;
   495		case ALDO5:
   496			enable_id = EN_ALDO5;
   497			break;
   498		case ALDO7:
   499			enable_id = EN_ALDO7;
   500			break;
   501		default:
   502			return 0;
   503		}
   504	
   505		/* FIXME: check default mode for GPIO here: high or low? */
   506		ldo->ena_gpiod = devm_gpiod_get_index_optional(&pdev->dev,
   507							       "enable",
   508							       enable_id,
   509							       GPIOD_OUT_HIGH);
   510		if (IS_ERR(ldo->ena_gpiod))
 > 511			retur PTR_ERR(ldo->ena->gpiod);
   512	
   513		/* if no GPIO for ldo pin, then set default enable mode */
   514		if (!ldo->ena_gpiod)
   515			goto set_default_ldo_enable_mode;
   516	
   517		return 0;
   518	
   519	set_default_ldo_enable_mode:
   520		return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id], 0);
   521	}
   522	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux