Re: [PATCH v15 06/19] leds: lp50xx: Add the LP50XX family of the RGB LED driver

From: Jacek Anaszewski
Date: Wed Oct 30 2019 - 15:58:13 EST


Dan,

On 10/30/19 5:41 PM, Dan Murphy wrote:
> Hello
>
> On 10/30/19 7:07 AM, kbuild test robot wrote:
>> Hi Dan,
>>
>> I love your patch! Yet something to improve:
>>
>> [auto build test ERROR on j.anaszewski-leds/for-next]
>> [also build test ERROR on v5.4-rc5 next-20191029]
>
> I went to both these references and I do not see this patchset on either
> of these.

This branch is temporarily created by build bot by applying patch sets
from lists on top of linux-leds for-next branch.

>> [if your patch is applied to the wrong git tree, please drop us a note
>> to help
>> improve the system. BTW, we also suggest to use '--base' option to
>> specify the
>> base tree in git format-patch, please see
>> https://stackoverflow.com/a/37406982]
>>
>> url:   
>> https://github.com/0day-ci/linux/commits/Dan-Murphy/Multicolor-Framework/20191030-144320
>>
> It appears here though
>> base:  
>> https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git
>> for-next
>
> Does not appear here
>
> Finally not sure why the MIPS compiler is complaining about this but the
> ARM and x86 is not

Compilation breaks also for ARM.

This is not architecture specific but language specific thing.

If you enter this error message got Google you will get an answer
to why this happens in the first result.

You need to patch your driver with the attached one.

--
Best regards,
Jacek Anaszewski
diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
index 76ca5cc1347c..52246565f15d 100644
--- a/drivers/leds/leds-lp50xx.c
+++ b/drivers/leds/leds-lp50xx.c
@@ -336,7 +336,7 @@ enum lp50xx_model {
* @reset_reg: device reset register
*/
struct lp50xx_chip_info {
- const struct regmap_config lp50xx_regmap_config;
+ const struct regmap_config *lp50xx_regmap_config;
int model_id;
u8 max_modules;
u8 num_leds;
@@ -357,7 +357,7 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
.bank_brt_reg = LP5012_BNK_BRT,
.bank_mix_reg = LP5012_BNKA_CLR,
.reset_reg = LP5012_RESET,
- .lp50xx_regmap_config = lp5012_regmap_config,
+ .lp50xx_regmap_config = &lp5012_regmap_config,
},
[LP5012] = {
.model_id = LP5012,
@@ -368,7 +368,7 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
.bank_brt_reg = LP5012_BNK_BRT,
.bank_mix_reg = LP5012_BNKA_CLR,
.reset_reg = LP5012_RESET,
- .lp50xx_regmap_config = lp5012_regmap_config,
+ .lp50xx_regmap_config = &lp5012_regmap_config,
},
[LP5018] = {
.model_id = LP5018,
@@ -379,7 +379,7 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
.bank_brt_reg = LP5024_BNK_BRT,
.bank_mix_reg = LP5024_BNKA_CLR,
.reset_reg = LP5024_RESET,
- .lp50xx_regmap_config = lp5024_regmap_config,
+ .lp50xx_regmap_config = &lp5024_regmap_config,
},
[LP5024] = {
.model_id = LP5024,
@@ -390,7 +390,7 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
.bank_brt_reg = LP5024_BNK_BRT,
.bank_mix_reg = LP5024_BNKA_CLR,
.reset_reg = LP5024_RESET,
- .lp50xx_regmap_config = lp5024_regmap_config,
+ .lp50xx_regmap_config = &lp5024_regmap_config,
},
[LP5030] = {
.model_id = LP5030,
@@ -401,7 +401,7 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
.bank_brt_reg = LP5036_BNK_BRT,
.bank_mix_reg = LP5036_BNKA_CLR,
.reset_reg = LP5036_RESET,
- .lp50xx_regmap_config = lp5036_regmap_config,
+ .lp50xx_regmap_config = &lp5036_regmap_config,
},
[LP5036] = {
.model_id = LP5036,
@@ -412,7 +412,7 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = {
.bank_brt_reg = LP5036_BNK_BRT,
.bank_mix_reg = LP5036_BNKA_CLR,
.reset_reg = LP5036_RESET,
- .lp50xx_regmap_config = lp5036_regmap_config,
+ .lp50xx_regmap_config = &lp5036_regmap_config,
},
};

@@ -716,7 +716,7 @@ static int lp50xx_probe(struct i2c_client *client,
i2c_set_clientdata(client, led);

led->regmap = devm_regmap_init_i2c(client,
- &led->chip_info->lp50xx_regmap_config);
+ led->chip_info->lp50xx_regmap_config);
if (IS_ERR(led->regmap)) {
ret = PTR_ERR(led->regmap);
dev_err(&client->dev, "Failed to allocate register map: %d\n",