From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Anvesh Jain P" <anvesh.p@oss.qualcomm.com>
Cc: Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Hans de Goede <hansg@kernel.org>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
platform-driver-x86@vger.kernel.org,
Maya Matuszczyk <maccraft123mc@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Akhil P Oommen <akhilpo@oss.qualcomm.com>
Subject: Re: [PATCH v8 2/6] platform: arm64: Add driver for EC found on Qualcomm reference devices
Date: Mon, 11 May 2026 14:13:47 +0200 [thread overview]
Message-ID: <b98deaf5-b6af-4774-a5e5-4f0d6cfbc077@oss.qualcomm.com> (raw)
In-Reply-To: <88ce2f85-5d8f-9845-cdb8-77051989e57f@linux.intel.com>
On 5/11/26 2:07 PM, Ilpo Järvinen wrote:
> On Mon, 11 May 2026, Anvesh Jain P wrote:
[...]
>>>> +static int qcom_ec_sci_evt_control(struct device *dev, bool enable)
>>>> +{
>>>> + struct i2c_client *client = to_i2c_client(dev);
>>>> +
>>>> + return i2c_smbus_write_byte_data(client, EC_SCI_EVT_CONTROL_CMD, !!enable);
>>>
>>> This converts bool -> u8 using C's implicit conversion rules (plus on top
>>> of that does unnecessary !!). Please write the conversion explicitly, you
>>> can use ?: syntax for brevity.
>>>
>>
>> The original v4 code used `enable ? 1 : 0` explicitly, but Konrad Dybcio
>> suggested switching to `!!enable` during his review [1]. Happy to revert
>> to the explicit form if that's the preferred style — just want to flag
>> the conflict so everyone is aligned.
>>
>> [1]
>> https://lore.kernel.org/all/6eb3a173-c364-431f-93e4-7bbb7a32431e@oss.qualcomm.com/
>
> I prefer to have the boolean to binary conversion done explicitly
> (with the platform drivers maintainer hat on).
And I won't object if you prefer that
Konrad
next prev parent reply other threads:[~2026-05-11 12:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260427-add-driver-for-ec-v8-0-702f74e495f7@oss.qualcomm.com>
[not found] ` <20260427-add-driver-for-ec-v8-2-702f74e495f7@oss.qualcomm.com>
2026-05-05 8:50 ` [PATCH v8 2/6] platform: arm64: Add driver for EC found on Qualcomm reference devices Anvesh Jain P
2026-05-08 17:33 ` Ilpo Järvinen
2026-05-11 5:45 ` Anvesh Jain P
2026-05-11 12:07 ` Ilpo Järvinen
2026-05-11 12:13 ` Konrad Dybcio [this message]
2026-05-11 12:26 ` Anvesh Jain P
[not found] ` <20260427-add-driver-for-ec-v8-6-702f74e495f7@oss.qualcomm.com>
2026-05-11 13:40 ` [PATCH v8 6/6] arm64: defconfig: Enable Qualcomm reference device EC driver Dmitry Baryshkov
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=b98deaf5-b6af-4774-a5e5-4f0d6cfbc077@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=akhilpo@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=anvesh.p@oss.qualcomm.com \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maccraft123mc@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=robh@kernel.org \
--cc=sibi.sankar@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox