From: "Arnd Bergmann" <arnd@arndb.de> To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>, "Arnd Bergmann" <arnd@kernel.org> Cc: "Patrice Chotard" <patrice.chotard@foss.st.com>, "Mauro Carvalho Chehab" <mchehab@kernel.org>, "Hans Verkuil" <hverkuil-cisco@xs4all.nl>, "Hugues Fruchet" <hugues.fruchet@st.com>, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: c8sectpfe: convert to gpio descriptors Date: Mon, 30 Jan 2023 19:17:32 +0100 [thread overview] Message-ID: <14e7d2ba-1a24-42a1-b19e-842e0fd8286e@app.fastmail.com> (raw) In-Reply-To: <Y9f7/q3aS5nlY7nJ@smile.fi.intel.com> On Mon, Jan 30, 2023, at 18:18, Andy Shevchenko wrote: > On Mon, Jan 30, 2023 at 02:09:47PM +0100, Arnd Bergmann wrote: >> + ret = PTR_ERR_OR_ZERO(tsin->rst_gpio); >> if (ret && ret != -EBUSY) { >> - dev_err(dev, "Can't request tsin%d reset gpio\n" >> - , fei->channel_data[index]->tsin_id); >> + dev_err_probe(dev, ret, >> + "reset gpio for tsin%d not valid\n", >> + tsin->tsin_id); >> goto err_node_put; >> } >> >> if (!ret) { > > Can be > > if (IS_ERR() && PTR_ERR() != -EBUSY) { > ret = dev_err_probe(dev, PTR_ERR(), ...); > ... > } > > if (!IS_ERR()) > > (Up to you) I prefer the version that only has one PTR_ERR(), but either way is fine with me. > But -EBUSY check seems strange to me. What was the motivation behind? > (As far as I can read the code the possibility to get this if and only > if we have requested GPIO too early at initcall level. Would it be > ever a possibility to get it in real life?) I noticed this part as being odd as well, no idea why the code is like this. I just left the logic unchanged here. Arnd
WARNING: multiple messages have this Message-ID (diff)
From: "Arnd Bergmann" <arnd@arndb.de> To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>, "Arnd Bergmann" <arnd@kernel.org> Cc: "Patrice Chotard" <patrice.chotard@foss.st.com>, "Mauro Carvalho Chehab" <mchehab@kernel.org>, "Hans Verkuil" <hverkuil-cisco@xs4all.nl>, "Hugues Fruchet" <hugues.fruchet@st.com>, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: c8sectpfe: convert to gpio descriptors Date: Mon, 30 Jan 2023 19:17:32 +0100 [thread overview] Message-ID: <14e7d2ba-1a24-42a1-b19e-842e0fd8286e@app.fastmail.com> (raw) In-Reply-To: <Y9f7/q3aS5nlY7nJ@smile.fi.intel.com> On Mon, Jan 30, 2023, at 18:18, Andy Shevchenko wrote: > On Mon, Jan 30, 2023 at 02:09:47PM +0100, Arnd Bergmann wrote: >> + ret = PTR_ERR_OR_ZERO(tsin->rst_gpio); >> if (ret && ret != -EBUSY) { >> - dev_err(dev, "Can't request tsin%d reset gpio\n" >> - , fei->channel_data[index]->tsin_id); >> + dev_err_probe(dev, ret, >> + "reset gpio for tsin%d not valid\n", >> + tsin->tsin_id); >> goto err_node_put; >> } >> >> if (!ret) { > > Can be > > if (IS_ERR() && PTR_ERR() != -EBUSY) { > ret = dev_err_probe(dev, PTR_ERR(), ...); > ... > } > > if (!IS_ERR()) > > (Up to you) I prefer the version that only has one PTR_ERR(), but either way is fine with me. > But -EBUSY check seems strange to me. What was the motivation behind? > (As far as I can read the code the possibility to get this if and only > if we have requested GPIO too early at initcall level. Would it be > ever a possibility to get it in real life?) I noticed this part as being odd as well, no idea why the code is like this. I just left the logic unchanged here. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-30 18:18 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-30 13:09 [PATCH] media: c8sectpfe: convert to gpio descriptors Arnd Bergmann 2023-01-30 13:09 ` Arnd Bergmann 2023-01-30 17:18 ` Andy Shevchenko 2023-01-30 17:18 ` Andy Shevchenko 2023-01-30 18:17 ` Arnd Bergmann [this message] 2023-01-30 18:17 ` Arnd Bergmann 2023-02-03 23:10 ` Dmitry Torokhov 2023-02-03 23:10 ` Dmitry Torokhov 2023-02-01 3:29 ` Dmitry Torokhov 2023-02-01 3:29 ` Dmitry Torokhov 2023-02-01 18:35 ` Andy Shevchenko 2023-02-01 18:35 ` Andy Shevchenko 2023-05-17 18:21 ` Sakari Ailus 2023-05-17 18:21 ` Sakari Ailus 2023-05-17 19:12 ` Dmitry Torokhov 2023-05-17 19:12 ` Dmitry Torokhov 2023-05-17 19:26 ` Sakari Ailus 2023-05-17 19:26 ` Sakari Ailus 2023-05-19 1:05 ` Dmitry Torokhov 2023-05-19 1:05 ` Dmitry Torokhov
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=14e7d2ba-1a24-42a1-b19e-842e0fd8286e@app.fastmail.com \ --to=arnd@arndb.de \ --cc=andriy.shevchenko@linux.intel.com \ --cc=arnd@kernel.org \ --cc=hugues.fruchet@st.com \ --cc=hverkuil-cisco@xs4all.nl \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=mchehab@kernel.org \ --cc=patrice.chotard@foss.st.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: linkBe 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.