All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>, Roger Quadros <rogerq@ti.com>
Cc: Alexander Shiyan <shc_work@mail.ru>,
	Tony Lindgren <tony@atomide.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Alexandre Courbot <gnurou@gmail.com>
Subject: Re: [PATCH] gpio: twl4030: Remove redundant assignment
Date: Thu, 27 Feb 2014 11:32:30 +0200	[thread overview]
Message-ID: <530F062E.9030202@ti.com> (raw)
In-Reply-To: <CACRpkdbgr5_i2XCCeTDUw3SVsEJ4Q3BjHh++0BSSYSzkxPa8iA@mail.gmail.com>

On 02/27/2014 11:24 AM, Linus Walleij wrote:
> On Mon, Feb 24, 2014 at 4:34 PM, Roger Quadros <rogerq@ti.com> wrote:
>> On 02/24/2014 04:25 PM, Linus Walleij wrote:
>>> On Sat, Feb 15, 2014 at 2:34 PM, Alexander Shiyan <shc_work@mail.ru> wrote:
>>>
>>>> -       status = twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
>>>> -                                 TWL4030_LED_LEDEN_REG);
>>>> +
>>>> +       twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
>>>> +                        TWL4030_LED_LEDEN_REG);
>>>
>>> Isn't the right fix to actually *check* this status instead?
>>>
>>> TI dudes?
>>
>> Yes we should check for error. But the only action we can take is maybe print an error message
>> as all the users of this function return void. e.g. twl_set().
>>
>> It seems the set() hook of struct gpio_chip also doesn't expect any return value. Wondering if that should change.
> 
> I think in this case simply printing an error and bailing out is
> just fine, people will be able to debug from there.

FWIW: if a write to twl4030 fails we are anyways in a big trouble. This is the
PMIC in the system, so it is likely that we do not even boot in such case.

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-02-27  9:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 13:34 [PATCH] gpio: twl4030: Remove redundant assignment Alexander Shiyan
2014-02-24 14:25 ` Linus Walleij
2014-02-24 15:34   ` Roger Quadros
2014-02-27  9:24     ` Linus Walleij
2014-02-27  9:32       ` Peter Ujfalusi [this message]
2014-02-27 10:59       ` Alexander Shiyan
  -- strict thread matches above, loose matches on Subject: below --
2014-03-22  8:32 Alexander Shiyan
2014-03-27  9:07 ` Linus Walleij

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=530F062E.9030202@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=rogerq@ti.com \
    --cc=shc_work@mail.ru \
    --cc=tony@atomide.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 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.