devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	Krzysztof Kozlowski
	<k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Abhilash Kesavan
	<kesavan.abhilash-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v5 5/5] regulator: of: Add support for parsing initial and suspend modes
Date: Fri, 07 Nov 2014 17:15:38 +0100	[thread overview]
Message-ID: <545CF02A.9060500@collabora.co.uk> (raw)
In-Reply-To: <20141107154743.GT8509-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

On 11/07/2014 04:47 PM, Mark Brown wrote:
> On Fri, Nov 07, 2014 at 02:00:05PM +0100, Javier Martinez Canillas wrote:
> 
>> +	if (!of_property_read_u32(np, "regulator-initial-mode", &pval)) {
>> +		if (desc && desc->map_modes)
>> +			constraints->initial_mode = desc->map_modes(pval);
>> +		else
>> +			pr_warn("%s: failed to parse regulator-initial-mode\n",
>> +				np->name);
>> +	}
> 
> This is ignoring any error return from map_modes(), it's possible the DT
> might have an invalid value.  The error message could also use some
> improvement, it's more that the kernel doesn't understand how to parse
> it even if it is valid.
> 

Right, as I mentioned to Krzysztof in a previous email, I'll remove the
warning message and add an error message instead if the map mode callback
function fails and also show the error code as you suggest.

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-11-07 16:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 13:00 [PATCH v5 0/5] regulator: of: Add initial and suspend modes support Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 1/5] regulator: Document binding for initial and suspend modes Javier Martinez Canillas
     [not found]   ` <1415365205-27630-2-git-send-email-javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-11-07 14:58     ` Mark Brown
2014-11-07 15:38       ` Javier Martinez Canillas
     [not found]         ` <545CE75C.8000408-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-11-07 16:10           ` Mark Brown
2014-11-07 16:19             ` Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 2/5] regulator: Add function to map modes to struct regulator_desc Javier Martinez Canillas
2014-11-07 15:54   ` Mark Brown
2014-11-07 16:17     ` Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data() Javier Martinez Canillas
2014-11-07 15:07   ` Mark Brown
     [not found]     ` <20141107150743.GR8509-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-11-07 15:49       ` Javier Martinez Canillas
2014-11-07 15:23   ` Krzysztof Kozlowski
2014-11-07 16:11     ` Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 4/5] regulator: of: Pass the regulator description in the match table Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 5/5] regulator: of: Add support for parsing initial and suspend modes Javier Martinez Canillas
2014-11-07 15:47   ` Mark Brown
     [not found]     ` <20141107154743.GT8509-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-11-07 16:15       ` Javier Martinez Canillas [this message]
     [not found]         ` <545CF02A.9060500-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-11-07 16:21           ` Mark Brown
2014-11-07 15:26 ` [PATCH v5 0/5] regulator: of: Add initial and suspend modes support Krzysztof Kozlowski

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=545CF02A.9060500@collabora.co.uk \
    --to=javier.martinez-zgy8ohtn/8ppycu2f3hruq@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=kesavan.abhilash-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).