linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vignesh Raghavendra <vigneshr@ti.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Dirk Behme <dirk.behme@de.bosch.com>,
	<linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: hyperbus: Add proper error message for missing compatible
Date: Tue, 4 Feb 2020 10:16:59 +0530	[thread overview]
Message-ID: <b3d5a2ce-0088-27a1-f02b-9ead1c6adce5@ti.com> (raw)
In-Reply-To: <ede8426d-82d3-9c2b-1d6a-6259067ef256@cogentembedded.com>

Hi,

On 04/02/20 12:07 am, Sergei Shtylyov wrote:
> On 02/03/2020 10:55 AM, Dirk Behme wrote:
> 
>> In case the compatible "cypress,hyperflash" is not given
>> output a proper error message. Do it the same way as some
>> lines above.
>>
>> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
>> ---
>>  drivers/mtd/hyperbus/hyperbus-core.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/hyperbus/hyperbus-core.c b/drivers/mtd/hyperbus/hyperbus-core.c
>> index 6af9ea34117d..61b0f686a6dc 100644
>> --- a/drivers/mtd/hyperbus/hyperbus-core.c
>> +++ b/drivers/mtd/hyperbus/hyperbus-core.c
>> @@ -73,8 +73,10 @@ int hyperbus_register_device(struct hyperbus_device *hbdev)
>>  
>>  	np = hbdev->np;
>>  	ctlr = hbdev->ctlr;
>> -	if (!of_device_is_compatible(np, "cypress,hyperflash"))
>> +	if (!of_device_is_compatible(np, "cypress,hyperflash")) {
>> +		pr_err("hyperbus: 'cypress,hyperflash' compatible missing\n");
> 
>    Traditionally, the string prop values are enclosed in "", not ''.
> 

Also, please use dev_err() here. ctlr->dev should have a valid device
pointer at this point.


-- 
Regards
Vignesh

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2020-02-04  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03  7:55 [PATCH] mtd: hyperbus: Add proper error message for missing compatible Dirk Behme
2020-02-03 18:37 ` Sergei Shtylyov
2020-02-04  4:46   ` Vignesh Raghavendra [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=b3d5a2ce-0088-27a1-f02b-9ead1c6adce5@ti.com \
    --to=vigneshr@ti.com \
    --cc=dirk.behme@de.bosch.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sergei.shtylyov@cogentembedded.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;
as well as URLs for NNTP newsgroup(s).