mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: "Farber, Eliav" <farbere@amazon.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH v4 1/3] pps: clients: gpio: propagate probe error codes
Date: Tue, 22 Sep 2026 10:22:47 +0200	[thread overview]
Message-ID: <235b34e3-2eee-4904-9cdb-490859dabda7@enneenne.com> (raw)
In-Reply-To: <BY3PR18MB4722454B7A78A0E47345EBE8C6832@BY3PR18MB4722.namprd18.prod.outlook.com>

On Tue, Sep 22, 2026 at 08:08:09AM +0000, Farber, Eliav wrote:
> Agreed on silencing the deferral spam. I avoided return dev_err_probe()
> because patch 3 turns both returns into goto err_release_pins, and
> dev_err_probe()'s idiom is to return the error, not goto.

You don't have to return it.  Calling it just for the message and then
jumping is fine, and ret already carries the code the label needs:

	if (ret < 0) {
		dev_err_probe(dev, ret, "failed to map GPIO to IRQ\n");
		goto err_release_pins;
	}

But please don't open-code it: on the -EPROBE_DEFER branch it also
calls device_set_deferred_probe_reason(), so the hand-written version
silently drops the reason from /sys/kernel/debug/devices_deferred.

One more thing: dev_err_probe() already prints the code as %pe, so drop
the ": %d" from both messages -- data->irq of course stays in the second
one.

In this patch it can still be a plain

	return dev_err_probe(dev, ret, "failed to map GPIO to IRQ\n");

and patch 3 turns it into the goto form above.  Same for the request_irq
one.

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming


  reply	other threads:[~2026-09-22  8:22 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 13:47 [PATCH 0/2] pps-gpio: restore pin mux on unbind and shutdown Eliav Farber
2026-09-16 13:47 ` [PATCH 1/2] dt-bindings: pps: pps-gpio: document optional idle pinctrl state Eliav Farber
2026-09-16 13:47 ` [PATCH 2/2] pps: clients: gpio: release pins to idle state on remove and shutdown Eliav Farber
2026-09-16 16:48 ` [PATCH 0/2] pps-gpio: restore pin mux on unbind " Rodolfo Giometti
2026-09-16 18:25   ` Farber, Eliav
2026-09-16 18:26 ` [PATCH v2 " Eliav Farber
2026-09-16 18:26   ` [PATCH v2 1/2] dt-bindings: pps: pps-gpio: document optional pinctrl states Eliav Farber
2026-09-17  7:13     ` Rodolfo Giometti
2026-09-17  7:48       ` Farber, Eliav
2026-09-16 18:26   ` [PATCH v2 2/2] pps: clients: gpio: release pins to an inactive state on remove and shutdown Eliav Farber
2026-09-17  7:14     ` Rodolfo Giometti
2026-09-17  7:52       ` Farber, Eliav
2026-09-17  7:56   ` [PATCH v3 0/3] pps-gpio: restore pin mux on unbind " Eliav Farber
2026-09-17  7:56     ` [PATCH v3 1/3] pps: clients: gpio: propagate probe error codes Eliav Farber
2026-09-17  9:58       ` Bartosz Golaszewski
2026-09-18  7:50       ` Rodolfo Giometti
2026-09-17  7:56     ` [PATCH v3 2/3] dt-bindings: pps: pps-gpio: document optional pinctrl states Eliav Farber
2026-09-17 15:35       ` Rob Herring (Arm)
2026-09-17 16:13       ` Rob Herring
2026-09-18  7:50       ` Rodolfo Giometti
2026-09-18 15:43         ` Rob Herring
2026-09-17  7:56     ` [PATCH v3 3/3] pps: clients: gpio: release pins to an inactive state on remove and shutdown Eliav Farber
2026-09-19 17:11     ` [PATCH v4 0/3] pps-gpio: restore pin mux on unbind " Eliav Farber
2026-09-22  7:40       ` Rodolfo Giometti
2026-09-22 10:08         ` Farber, Eliav
2026-09-22 10:30       ` [PATCH v5 0/4] " Eliav Farber
2026-09-22 10:30         ` [PATCH v5 1/4] pps: clients: gpio: propagate probe error codes Eliav Farber
2026-09-22 10:30         ` [PATCH v5 2/4] pps: clients: gpio: only tear down the echo timer when it exists Eliav Farber
2026-09-22 10:30         ` [PATCH v5 3/4] dt-bindings: pps: pps-gpio: document optional pinctrl states Eliav Farber
2026-09-22 12:46           ` Rodolfo Giometti
2026-09-22 10:30         ` [PATCH v5 4/4] pps: clients: gpio: release pins to an inactive state on remove and shutdown Eliav Farber
2026-09-22 12:46           ` Rodolfo Giometti
2026-09-22 14:55             ` Farber, Eliav
2026-09-19 17:11     ` [PATCH v4 1/3] pps: clients: gpio: propagate probe error codes Eliav Farber
2026-09-22  7:40       ` Rodolfo Giometti
2026-09-22  8:08         ` Farber, Eliav
2026-09-22  8:22           ` Rodolfo Giometti [this message]
2026-09-22 10:06             ` Farber, Eliav
2026-09-19 17:11     ` [PATCH v4 2/3] dt-bindings: pps: pps-gpio: document optional pinctrl states Eliav Farber
2026-09-22  7:40       ` Rodolfo Giometti
2026-09-22 10:11         ` Farber, Eliav
2026-09-19 17:11     ` [PATCH v4 3/3] pps: clients: gpio: release pins to an inactive state on remove and shutdown Eliav Farber
2026-09-22  7:40       ` Rodolfo Giometti
2026-09-22 10:13         ` Farber, Eliav

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=235b34e3-2eee-4904-9cdb-490859dabda7@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=akpm@linux-foundation.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=farbere@amazon.com \
    --cc=festevam@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=robh@kernel.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

all inboxes | Powered by JetHome®