linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Frederic Danis <frederic.danis.oss@gmail.com>,
	Loic Poulain <loic.poulain@linaro.org>,
	Hans de Goede <hdegoede@redhat.com>, Max Shavrick <mxms@me.com>,
	Leif Liddy <leif.liddy@gmail.com>,
	Daniel Roschka <danielroschka@phoenitydawn.de>,
	Ronald Tschalaer <ronald@innovation.ch>,
	"Peter Y. Chuang" <peteryuchuang@gmail.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/3] Bluetooth: hci_bcm: Support Apple GPIO handling
Date: Thu, 28 Dec 2017 08:15:51 +0100	[thread overview]
Message-ID: <20171228071551.GA31236@wunner.de> (raw)
In-Reply-To: <6E039068-0B7D-4E69-B0BB-A240FAE12089@holtmann.org>

On Tue, Dec 26, 2017 at 09:50:30PM +0100, Marcel Holtmann wrote:
> > +}
> > +
> > +static int bcm_apple_set_power(struct bcm_device *dev, bool enable)
> > +{
> > +	return ACPI_SUCCESS(acpi_evaluate_object(enable ? dev->btpu : dev->btpd,
> > +						 NULL, NULL, NULL))
> > +								 ? 0 : -EFAULT;
> 
> Same here. Trying to mush everything in a single statement seems overkill.
> And btw. why -EFAULT? Is that standard error practice with ACPI?

-EFAULT was just chosen as a generic error because we don't really know
what went wrong with the ACPI call.  It seems there's no function to
convert an ACPI exception code to an errno, only a function to convert it
to a human-readable string, acpi_format_exception().  If you have a
different preference than -EFAULT I'd be happy to change it.

D'accord on all your other comments, will respin in the coming days.

Thanks,

Lukas

  parent reply	other threads:[~2017-12-28  7:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 15:07 [PATCH 1/3] Bluetooth: hci_bcm: Support Apple GPIO handling Lukas Wunner
2017-12-26 15:07 ` [PATCH 2/3] Bluetooth: hci_bcm: Streamline runtime PM code Lukas Wunner
2017-12-26 20:57   ` Marcel Holtmann
2017-12-26 15:07 ` [PATCH 3/3] Bluetooth: Avoid WARN splat due to missing GPIOLIB Lukas Wunner
2017-12-26 20:57   ` Marcel Holtmann
2017-12-28  8:41   ` Andy Shevchenko
2017-12-28  9:18     ` Lukas Wunner
2017-12-28  9:26       ` Andy Shevchenko
2017-12-28 12:29         ` Linus Walleij
2017-12-28 12:40           ` Andy Shevchenko
2017-12-28 12:45             ` Linus Walleij
2017-12-29  9:51               ` Lukas Wunner
2017-12-29 14:18                 ` Loic Poulain
2017-12-29 15:12                   ` Lukas Wunner
2017-12-29 15:18                     ` Andy Shevchenko
2017-12-29 15:28                     ` Lukas Wunner
2018-01-01 15:23                 ` Linus Walleij
2018-01-02 15:27                   ` Marcel Holtmann
2018-01-02 16:58                     ` Lukas Wunner
2018-01-02 17:10                       ` Marcel Holtmann
2017-12-26 17:08 ` [PATCH 1/3] Bluetooth: hci_bcm: Support Apple GPIO handling Lukas Wunner
2017-12-26 20:50 ` Marcel Holtmann
2017-12-27 14:17   ` Lukas Wunner
2017-12-28  7:15   ` Lukas Wunner [this message]
2017-12-28 12:40     ` Hans de Goede
2017-12-28  7:38   ` Andy Shevchenko

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=20171228071551.GA31236@wunner.de \
    --to=lukas@wunner.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=danielroschka@phoenitydawn.de \
    --cc=frederic.danis.oss@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=johan.hedberg@gmail.com \
    --cc=leif.liddy@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=marcel@holtmann.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mxms@me.com \
    --cc=peteryuchuang@gmail.com \
    --cc=ronald@innovation.ch \
    /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).