Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481524 > unrolled thread
| Started by | Steve Twiss <stwiss.opensource@diasemi.com> |
|---|---|
| First post | 2016-09-12 18:20 +0200 |
| Last post | 2016-09-12 22:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
RE: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators Steve Twiss <stwiss.opensource@diasemi.com> - 2016-09-12 18:20 +0200
Re: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators Colin Ian King <colin.king@canonical.com> - 2016-09-12 22:50 +0200
| From | Steve Twiss <stwiss.opensource@diasemi.com> |
|---|---|
| Date | 2016-09-12 18:20 +0200 |
| Subject | RE: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators |
| Message-ID | <sgC7D-5D9-7@gated-at.bofh.it> |
On 08 September 2016 10:47, Colin King wrote:
> To: Support Opensource; Liam Girdwood; Mark Brown
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators
>
> From: Colin Ian King <colin.king@canonical.com>
>
> pdata->regulators is an array of DA9052_MAX_REGULATORS struct
> regulator_init_data pointers hence cannot be null, so the null pointer
> check on pdata->regulators is redundant. Remove it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/regulator/da9055-regulator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-
> regulator.c
> index d029c94..a118f63 100644
> --- a/drivers/regulator/da9055-regulator.c
> +++ b/drivers/regulator/da9055-regulator.c
> @@ -612,7 +612,7 @@ static int da9055_regulator_probe(struct
> platform_device *pdev)
> config.driver_data = regulator;
> config.regmap = da9055->regmap;
>
> - if (pdata && pdata->regulators) {
> + if (pdata) {
> config.init_data = pdata->regulators[pdev->id];
> } else {
> ret = da9055_regulator_dt_init(pdev, regulator, &config,
> --
> 2.9.3
Yes, it's true.
One my colleagues just pointed out why they had déjà vu.
May I refer to the answer that was given back in March,
https://patchwork.kernel.org/patch/8679771/
Regards,
Steve
[toc] | [next] | [standalone]
| From | Colin Ian King <colin.king@canonical.com> |
|---|---|
| Date | 2016-09-12 22:50 +0200 |
| Message-ID | <sgGkV-8vM-15@gated-at.bofh.it> |
| In reply to | #1481524 |
On 12/09/16 17:09, Steve Twiss wrote:
>
>
>
> On 08 September 2016 10:47, Colin King wrote:
>
>> To: Support Opensource; Liam Girdwood; Mark Brown
>> Cc: linux-kernel@vger.kernel.org
>> Subject: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> pdata->regulators is an array of DA9052_MAX_REGULATORS struct
>> regulator_init_data pointers hence cannot be null, so the null pointer
>> check on pdata->regulators is redundant. Remove it.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>> drivers/regulator/da9055-regulator.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-
>> regulator.c
>> index d029c94..a118f63 100644
>> --- a/drivers/regulator/da9055-regulator.c
>> +++ b/drivers/regulator/da9055-regulator.c
>> @@ -612,7 +612,7 @@ static int da9055_regulator_probe(struct
>> platform_device *pdev)
>> config.driver_data = regulator;
>> config.regmap = da9055->regmap;
>>
>> - if (pdata && pdata->regulators) {
>> + if (pdata) {
>> config.init_data = pdata->regulators[pdev->id];
>> } else {
>> ret = da9055_regulator_dt_init(pdev, regulator, &config,
>> --
>> 2.9.3
>
> Yes, it's true.
>
> One my colleagues just pointed out why they had déjà vu.
>
> May I refer to the answer that was given back in March,
> https://patchwork.kernel.org/patch/8679771/
>
> Regards,
> Steve
>
>
Apologies for the noise. I lost track of my original patch.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web