From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Christian Marangi" <ansuelsmth@gmail.com>
Cc: "Ilia Lin" <ilia.lin@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Raag Jadav" <raag.jadav@intel.com>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] err.h: add ERR_PTR_CONST macro
Date: Thu, 30 Oct 2025 15:15:25 +0100 [thread overview]
Message-ID: <9f41aee8-49a1-4029-8b21-e4eafaa2e224@app.fastmail.com> (raw)
In-Reply-To: <aQNvjqJGqFO30JTx@smile.fi.intel.com>
On Thu, Oct 30, 2025, at 15:00, Andy Shevchenko wrote:
> On Thu, Oct 30, 2025 at 11:22:11AM +0100, Christian Marangi wrote:
>> On Thu, Oct 30, 2025 at 10:27:38AM +0200, Andy Shevchenko wrote:
>> > On Wed, Oct 29, 2025 at 04:38:53PM +0100, Christian Marangi wrote:
>> drivers/soc/qcom/smem.c:361:35: error: initializer element is not constant
>> 361 | static struct qcom_smem *__smem = ERR_PTR(-EPROBE_DEFER);
>> | ^~~~~~~
>> make[9]: *** [scripts/Makefile.build:229: drivers/soc/qcom/smem.o] Error 1
>>
>> You want me to add this to the commit? Or any hint to better reword this
>> so it's more understandable?
>
> Just the first line would be enough.
> And perhaps better naming for the macro, but I have no ideas from top of my
> head right now. Ah, actually I do. We call those either INIT_*() or DEFINE_*()
> with the difference that INIT_*() works like your proposed idea. i.e. returns
> a suitable value, but DEFINE_*() incorporates a variable and a type.
>
> I think the INIT_ERR_PTR() is what we want as a name.
Agreed, that seems better than ERR_PTR_CONST(). I'm still not sure
there is much benefit in using this in static initializers, but
I don't mind it either.
Arnd
prev parent reply other threads:[~2025-10-30 14:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 13:33 [PATCH 1/3] err.h: add ERR_PTR_CONST macro Christian Marangi
2025-10-29 13:33 ` [PATCH 2/3] soc: qcom: smem: better track SMEM uninitialized state Christian Marangi
2025-10-29 15:27 ` Andy Shevchenko
2025-10-29 15:32 ` Christian Marangi
2025-10-29 16:11 ` Bjorn Andersson
2025-10-29 13:33 ` [PATCH 3/3] cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM Christian Marangi
2025-10-29 15:30 ` Andy Shevchenko
2025-10-30 8:56 ` Konrad Dybcio
2025-10-30 10:28 ` Christian Marangi
2025-10-30 10:54 ` Konrad Dybcio
2025-10-30 11:11 ` Christian Marangi
2025-10-30 11:16 ` Konrad Dybcio
2025-10-29 15:32 ` [PATCH 1/3] err.h: add ERR_PTR_CONST macro Andy Shevchenko
2025-10-29 15:38 ` Christian Marangi
2025-10-30 8:27 ` Andy Shevchenko
2025-10-30 8:37 ` Andy Shevchenko
2025-10-30 10:22 ` Christian Marangi
2025-10-30 14:00 ` Andy Shevchenko
2025-10-30 14:15 ` Arnd Bergmann [this message]
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=9f41aee8-49a1-4029-8b21-e4eafaa2e224@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andersson@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ansuelsmth@gmail.com \
--cc=ilia.lin@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=raag.jadav@intel.com \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.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