All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3 V2] EHCI: Exynos: Add fdt support
Date: Thu, 6 Dec 2012 19:13:24 +0100	[thread overview]
Message-ID: <201212061913.25210.marex@denx.de> (raw)
In-Reply-To: <CAPnjgZ0cE6wzcsJjdSbJ2DP+r9=SayoQcYcnJ1cJ20FQdX4Bbw@mail.gmail.com>

Dear Simon Glass,

> Hi Marek,
> 
> On Thu, Dec 6, 2012 at 10:02 AM, Marek Vasut <marex@denx.de> wrote:
> > Dear Simon Glass,
> > 
> > [...]
> > 
> >> > [...]
> >> > 
> >> > error output should be really puts() or printf() ...
> >> 
> >> Ick that bloats the code badly for an uncommon case. Would really
> >> prefer to avoid this.
> > 
> > What do you mean? Are you saying this debug() is correct and this is
> > triggered often? How come?
> 
> I mean that debug() in a driver does not generate any code unless
> DEBUG is defined in that module. The way I do it is when I have a
> problem in a module I define DEBUG there, which makes all the messages
> work. But then in the normal case (when not debugging) the code size
> is not bloated by messages.
> 
> So I much prefer debug() to printf() for uncommon messages in drivers, etc.

That's true ... and you're right if the FDT is correct, this will all work well. 
Ok, whichever way works for me.

> >> > You can also use errno.h instead of -1.
> >> 
> >> True, it might help debugging, although many times it is hard to map
> >> the error onto a suitable number designed for Linux. This 'return -1'
> >> is pretty common in U-Boot (generic error).
> > 
> > I know, but it'd be nice if this changed. Just a suggestion.
> 
> Yes agreed. I recently had a driver which could fail in about 12
> different places (different stages of hardware init), so I just
> created an enum for 12 errors. It wouldn't have been sensible in that
> case to try and fail to map those onto the errno errors, but in many
> cases (with fewer error conditions) it would be useful.

Yup

Best regards,
Marek Vasut

  reply	other threads:[~2012-12-06 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  6:32 [U-Boot] [PATCH 0/3 V2] EXYNOS5: Add FDT support for USB Rajeshwari Shinde
2012-12-06  6:32 ` [U-Boot] [PATCH 1/3 V2] EHCI: Exynos: Add fdt support Rajeshwari Shinde
2012-12-06 17:39   ` Marek Vasut
2012-12-06 17:57     ` Simon Glass
2012-12-06 18:02       ` Marek Vasut
2012-12-06 18:07         ` Simon Glass
2012-12-06 18:13           ` Marek Vasut [this message]
2012-12-06  6:32 ` [U-Boot] [PATCH 2/3 V2] EXYNOS5: Add devine node for USB Rajeshwari Shinde
2012-12-06 17:40   ` Marek Vasut
2012-12-06  6:32 ` [U-Boot] [PATCH 3/3 V2] EXYNOS5: FDT: Add compatible strings " Rajeshwari Shinde

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=201212061913.25210.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.