public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Lokesh Vutla <lokeshvutla@ti.com>, <nm@ti.com>, <t-kristo@ti.com>,
	<ssantosh@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] firmware: ti_sci: Parse all resource ranges even if some is not available
Date: Tue, 4 Jun 2019 13:24:57 +0300	[thread overview]
Message-ID: <1b9ae4f2-e971-9e06-f4fa-a962b1086587@ti.com> (raw)
In-Reply-To: <b7608cee-68fd-3406-9390-b94f53aaac8b@ti.com>



On 04/06/2019 13.23, Lokesh Vutla wrote:
> 
> 
> On 04/06/19 3:51 PM, Peter Ujfalusi wrote:
>>
>>
>> On 04/06/2019 13.13, Lokesh Vutla wrote:
>>>
>>>
>>> On 04/06/19 3:40 PM, Peter Ujfalusi wrote:
>>>> Do not fail if any of the requested subtypes are not availabe, but set the
>>>> number of resources to 0 and continue parsing the resource ranges.
>>>>
>>>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>>> ---
>>>>  drivers/firmware/ti_sci.c | 11 +++++++++--
>>>>  1 file changed, 9 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
>>>> index af3ebcdeab18..5d13ed724ff0 100644
>>>> --- a/drivers/firmware/ti_sci.c
>>>> +++ b/drivers/firmware/ti_sci.c
>>>> @@ -2783,6 +2783,7 @@ devm_ti_sci_get_of_resource(const struct ti_sci_handle *handle,
>>>>  	struct ti_sci_resource *res;
>>>>  	u32 resource_subtype;
>>>>  	int i, ret;
>>>> +	bool valid_set = false;
>>>
>>> Minor nit: Can you maintain the reverse Christmas tree here? It looks good :) No
>>> strong feelings though
>>
>> bool no_valid_sets = true;
>>
>> and when we have at least one valid set flip it to false? That's equally
>> twisted if not worst. imho
> 
> No no. I mean to add the change like below instead of adding the declaration at
> the end.

Ah, sure. will send it asap

> 
> 
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -2383,6 +2383,7 @@ devm_ti_sci_get_of_resource(const struct ti_sci_handle
> *handle,
>  			    struct device *dev, u32 dev_id, char *of_prop)
>  {
>  	struct ti_sci_resource *res;
> +	bool valid_set = false;
>  	u32 resource_subtype;
>  	int i, ret;
> 
> Thanks and regards,
> Lokesh
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2019-06-04 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 10:10 [PATCH] firmware: ti_sci: Parse all resource ranges even if some is not available Peter Ujfalusi
2019-06-04 10:13 ` Lokesh Vutla
2019-06-04 10:21   ` Peter Ujfalusi
2019-06-04 10:23     ` Lokesh Vutla
2019-06-04 10:24       ` Peter Ujfalusi [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=1b9ae4f2-e971-9e06-f4fa-a962b1086587@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=ssantosh@kernel.org \
    --cc=t-kristo@ti.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