All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: kbuild test robot <lkp@intel.com>
Cc: Chen Feng <puck.chen@hisilicon.com>,
	kbuild-all@01.org, lgirdwood@gmail.com, broonie@kernel.org,
	linux-kernel@vger.kernel.org, yudongbin@hisilicon.com,
	saberlily.xia@hisilicon.com, suzhuangluan@hisilicon.com,
	kong.kongxinwei@hisilicon.com, xuyiping@hisilicon.com,
	z.liuxinliang@hisilicon.com, puck.chenfeng@gmail.com,
	weidong2@hisilicon.com, w.f@huawei.com, qijiwen@hisilicon.com,
	peter.panshilin@hisilicon.com, dan.zhao@hisilicon.com,
	linuxarm@huawei.com, liguozhu@hisilicon.com,
	shimingxing@hisilicon.com, albert.lubing@hisilicon.com,
	oliver.fu@hisilicon.com, haojian.zhuang@linaro.org
Subject: Re: [PATCH v4 3/5] mfd: hi655x: Add hi665x pmic driver
Date: Mon, 11 Jan 2016 05:49:40 +0000	[thread overview]
Message-ID: <20160111054940.GI3331@x1> (raw)
In-Reply-To: <201601050310.g8dRfxpW%fengguang.wu@intel.com>

Obviously I am unable to accept (or even review) this patch until
these issues are resolved.  Please fix and resubmit the set.

On Tue, 05 Jan 2016, kbuild test robot wrote:
> [auto build test WARNING on v4.4-rc8]
> [also build test WARNING on next-20160104]
> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Chen-Feng/Add-Support-for-Hi6220-PMIC-Hi6553-MFD-Core/20160104-203635
> config: parisc-allmodconfig (attached as .config)
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=parisc 
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/platform_device.h:14:0,
>                     from drivers/mfd/hi655x-pmic.c:19:
>    include/linux/device.h:1329:1: warning: data definition has no type or storage class
>     module_init(__driver##_init); \
>     ^
>    include/linux/platform_device.h:222:2: note: in expansion of macro 'module_driver'
>      module_driver(__platform_driver, platform_driver_register, \
>      ^
> >> drivers/mfd/hi655x-pmic.c:156:1: note: in expansion of macro 'module_platform_driver'
>     module_platform_driver(hi655x_pmic_driver);
>     ^
>    include/linux/device.h:1329:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
>     module_init(__driver##_init); \
>     ^
>    include/linux/platform_device.h:222:2: note: in expansion of macro 'module_driver'
>      module_driver(__platform_driver, platform_driver_register, \
>      ^
> >> drivers/mfd/hi655x-pmic.c:156:1: note: in expansion of macro 'module_platform_driver'
>     module_platform_driver(hi655x_pmic_driver);
>     ^
>    drivers/mfd/hi655x-pmic.c:156:1: warning: parameter names (without types) in function declaration
>    In file included from include/linux/platform_device.h:14:0,
>                     from drivers/mfd/hi655x-pmic.c:19:
>    include/linux/device.h:1334:1: warning: data definition has no type or storage class
>     module_exit(__driver##_exit);
>     ^
>    include/linux/platform_device.h:222:2: note: in expansion of macro 'module_driver'
>      module_driver(__platform_driver, platform_driver_register, \
>      ^
> >> drivers/mfd/hi655x-pmic.c:156:1: note: in expansion of macro 'module_platform_driver'
>     module_platform_driver(hi655x_pmic_driver);
>     ^
>    include/linux/device.h:1334:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
>     module_exit(__driver##_exit);
>     ^
>    include/linux/platform_device.h:222:2: note: in expansion of macro 'module_driver'
>      module_driver(__platform_driver, platform_driver_register, \
>      ^
> >> drivers/mfd/hi655x-pmic.c:156:1: note: in expansion of macro 'module_platform_driver'
>     module_platform_driver(hi655x_pmic_driver);
>     ^
>    drivers/mfd/hi655x-pmic.c:156:1: warning: parameter names (without types) in function declaration
>    drivers/mfd/hi655x-pmic.c:158:15: error: expected declaration specifiers or '...' before string constant
>     MODULE_AUTHOR("Chen Feng <puck.chen@hisilicon.com>");
>                   ^
>    drivers/mfd/hi655x-pmic.c:159:20: error: expected declaration specifiers or '...' before string constant
>     MODULE_DESCRIPTION("Hisi hi655x pmic driver");
>                        ^
>    drivers/mfd/hi655x-pmic.c:160:16: error: expected declaration specifiers or '...' before string constant
>     MODULE_LICENSE("GPL v2");
>                    ^
>    In file included from include/linux/platform_device.h:14:0,
>                     from drivers/mfd/hi655x-pmic.c:19:
>    drivers/mfd/hi655x-pmic.c:156:24: warning: 'hi655x_pmic_driver_init' defined but not used [-Wunused-function]
>     module_platform_driver(hi655x_pmic_driver);
>                            ^
>    include/linux/device.h:1325:19: note: in definition of macro 'module_driver'
>     static int __init __driver##_init(void) \
>                       ^
> >> drivers/mfd/hi655x-pmic.c:156:1: note: in expansion of macro 'module_platform_driver'
>     module_platform_driver(hi655x_pmic_driver);
>     ^
>    drivers/mfd/hi655x-pmic.c:156:24: warning: 'hi655x_pmic_driver_exit' defined but not used [-Wunused-function]
>     module_platform_driver(hi655x_pmic_driver);
>                            ^
>    include/linux/device.h:1330:20: note: in definition of macro 'module_driver'
>     static void __exit __driver##_exit(void) \
>                        ^
> >> drivers/mfd/hi655x-pmic.c:156:1: note: in expansion of macro 'module_platform_driver'
>     module_platform_driver(hi655x_pmic_driver);
>     ^
>    cc1: some warnings being treated as errors
> 
> vim +/module_platform_driver +156 drivers/mfd/hi655x-pmic.c
> 
>     13	
>     14	#include <linux/io.h>
>     15	#include <linux/interrupt.h>
>     16	#include <linux/init.h>
>     17	#include <linux/gpio.h>
>     18	#include <linux/of_gpio.h>
>   > 19	#include <linux/platform_device.h>
>     20	#include <linux/of_platform.h>
>     21	#include <linux/mfd/hi655x-pmic.h>
>     22	#include <linux/regmap.h>
>     23	
>     24	static const struct of_device_id of_hi655x_pmic_child_match_tbl[] = {
>     25		{ .compatible = "hisilicon,hi655x-regulator", },
>     26		{},
>     27	};
>     28	
>     29	static const struct of_device_id of_hi655x_pmic_match_tbl[] = {
>     30		{ .compatible = "hisilicon,hi655x-pmic", },
>     31		{},
>     32	};
>     33	
>     34	static const struct regmap_irq hi655x_irqs[] = {
>     35		{ .reg_offset = 0, .mask = OTMP_D1R_INT },
>     36		{ .reg_offset = 0, .mask = VSYS_2P5_R_INT },
>     37		{ .reg_offset = 0, .mask = VSYS_UV_D3R_INT },
>     38		{ .reg_offset = 0, .mask = VSYS_6P0_D200UR_INT },
>     39		{ .reg_offset = 0, .mask = PWRON_D4SR_INT },
>     40		{ .reg_offset = 0, .mask = PWRON_D20F_INT },
>     41		{ .reg_offset = 0, .mask = PWRON_D20R_INT },
>     42		{ .reg_offset = 0, .mask = RESERVE_INT },
>     43	};
>     44	
>     45	static const struct regmap_irq_chip hi655x_irq_chip = {
>     46		.name = "hi655x-pmic",
>     47		.irqs = hi655x_irqs,
>     48		.num_regs = 1,
>     49		.num_irqs = ARRAY_SIZE(hi655x_irqs),
>     50		.status_base = HI655X_IRQ_STAT_BASE,
>     51		.mask_base = HI655X_IRQ_MASK_BASE,
>     52	};
>     53	
>     54	static unsigned int hi655x_pmic_get_version(struct hi655x_pmic *pmic)
>     55	{
>     56		u32 val;
>     57	
>     58		regmap_read(pmic->regmap,
>     59			    HI655X_BUS_ADDR(HI655X_VER_REG), &val);
>     60	
>     61		return val;
>     62	}
>     63	
>     64	static struct regmap_config hi655x_regmap_config = {
>     65		.reg_bits = 32,
>     66		.reg_stride = HI655X_STRIDE,
>     67		.val_bits = 8,
>     68		.max_register = HI655X_BUS_ADDR(0xFFF),
>     69	};
>     70	
>     71	static void hi655x_local_irq_clear(struct regmap *map)
>     72	{
>     73		int i;
>     74	
>     75		regmap_write(map, HI655X_ANA_IRQM_BASE, HI655X_IRQ_CLR);
>     76		for (i = 0; i < HI655X_IRQ_ARRAY; i++) {
>     77			regmap_write(map, HI655X_IRQ_STAT_BASE + i * HI655X_STRIDE,
>     78				     HI655X_IRQ_CLR);
>     79		}
>     80	}
>     81	
>     82	static int hi655x_pmic_probe(struct platform_device *pdev)
>     83	{
>     84		int ret;
>     85		struct hi655x_pmic *pmic;
>     86		struct device *dev = &pdev->dev;
>     87		struct device_node *np = dev->of_node;
>     88		void __iomem *base;
>     89	
>     90		pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);
>     91		pmic->dev = dev;
>     92	
>     93		pmic->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>     94		if (!pmic->res) {
>     95			dev_err(dev, "platform_get_resource err\n");
>     96			return -ENOENT;
>     97		}
>     98		base = devm_ioremap_resource(dev, pmic->res);
>     99		if (!base) {
>    100			dev_err(dev, "cannot map register memory\n");
>    101			return -ENOMEM;
>    102		}
>    103		pmic->regmap = devm_regmap_init_mmio_clk(dev, NULL, base,
>    104							 &hi655x_regmap_config);
>    105	
>    106		pmic->ver = hi655x_pmic_get_version(pmic);
>    107		if ((pmic->ver < PMU_VER_START) || (pmic->ver > PMU_VER_END)) {
>    108			dev_warn(dev, "it is wrong pmu version\n");
>    109			return -EINVAL;
>    110		}
>    111	
>    112		hi655x_local_irq_clear(pmic->regmap);
>    113	
>    114		pmic->gpio = of_get_named_gpio(np, "pmic-gpios", 0);
>    115		if (!gpio_is_valid(pmic->gpio)) {
>    116			dev_err(dev, "cannot get the pmic-gpios\n");
>    117			return -ENODEV;
>    118		}
>    119	
>    120		ret = devm_gpio_request_one(dev, pmic->gpio, GPIOF_IN, "hi655x_pmic_irq");
>    121		if (ret < 0) {
>    122			dev_err(dev, "failed to request gpio %d  ret = %d\n",
>    123				pmic->gpio, ret);
>    124			return ret;
>    125		}
>    126	
>    127		ret = regmap_add_irq_chip(pmic->regmap, gpio_to_irq(pmic->gpio),
>    128					  IRQF_TRIGGER_LOW | IRQF_NO_SUSPEND, 0,
>    129					  &hi655x_irq_chip, &pmic->irq_data);
>    130		if (ret) {
>    131			dev_err(dev, "add pmic irq chip error! ret %d\n", ret);
>    132			return ret;
>    133		}
>    134	
>    135		/* bind pmic to device */
>    136		platform_set_drvdata(pdev, pmic);
>    137	
>    138		/* populate sub nodes */
>    139		ret = of_platform_populate(np, of_hi655x_pmic_child_match_tbl,
>    140					   NULL, dev);
>    141		if (ret) {
>    142			regmap_del_irq_chip(pmic->irq, pmic->irq_data);
>    143			return ret;
>    144		}
>    145	
>    146		return 0;
>    147	}
>    148	
>    149	static struct platform_driver hi655x_pmic_driver = {
>    150		.driver	= {
>    151			.name =	"hi655x-pmic",
>    152			.of_match_table = of_hi655x_pmic_match_tbl,
>    153		},
>    154		.probe  = hi655x_pmic_probe,
>    155	};
>  > 156	module_platform_driver(hi655x_pmic_driver);
>    157	
>    158	MODULE_AUTHOR("Chen Feng <puck.chen@hisilicon.com>");
>    159	MODULE_DESCRIPTION("Hisi hi655x pmic driver");
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2016-01-11  5:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 12:27 [PATCH v4 0/5] Add Support for Hi6220 PMIC Hi6553 MFD Core Chen Feng
2016-01-04 12:27 ` [PATCH v4 1/5] doc: bindings: Add document for mfd hi665x PMIC Chen Feng
2016-01-04 12:27 ` [PATCH v4 2/5] doc: bindings: Document for hi655x regulator driver Chen Feng
2016-01-05 15:47   ` Mark Brown
2016-01-07  3:36     ` chenfeng
2016-01-04 12:27 ` [PATCH v4 3/5] mfd: hi655x: Add hi665x pmic driver Chen Feng
2016-01-04 18:45   ` kbuild test robot
2016-01-04 20:02   ` kbuild test robot
2016-01-11  5:49     ` Lee Jones [this message]
2016-01-04 12:27 ` [PATCH v4 4/5] regulator: add regulator driver of hi655x pmic Chen Feng
2016-01-05 15:44   ` Mark Brown
2016-01-07  3:35     ` chenfeng
2016-01-04 12:27 ` [PATCH v4 5/5] hisilicon/dts: Add hi655x pmic dts node Chen Feng

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=20160111054940.GI3331@x1 \
    --to=lee.jones@linaro.org \
    --cc=albert.lubing@hisilicon.com \
    --cc=broonie@kernel.org \
    --cc=dan.zhao@hisilicon.com \
    --cc=haojian.zhuang@linaro.org \
    --cc=kbuild-all@01.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=lgirdwood@gmail.com \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lkp@intel.com \
    --cc=oliver.fu@hisilicon.com \
    --cc=peter.panshilin@hisilicon.com \
    --cc=puck.chen@hisilicon.com \
    --cc=puck.chenfeng@gmail.com \
    --cc=qijiwen@hisilicon.com \
    --cc=saberlily.xia@hisilicon.com \
    --cc=shimingxing@hisilicon.com \
    --cc=suzhuangluan@hisilicon.com \
    --cc=w.f@huawei.com \
    --cc=weidong2@hisilicon.com \
    --cc=xuyiping@hisilicon.com \
    --cc=yudongbin@hisilicon.com \
    --cc=z.liuxinliang@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.