[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9da94b23-cfcb-4086-a080-7e6e59866d25@linaro.org>
Date: Tue, 17 Oct 2023 19:03:22 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Tylor Yang <tylor_yang@...ax.corp-partner.google.com>,
dmitry.torokhov@...il.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
jikos@...nel.org, benjamin.tissoires@...hat.com,
linux-input@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: poyuan_chang@...ax.corp-partner.google.com,
jingyliang@...omium.org, hbarnor@...omium.org, wuxy23@...ovo.com,
luolm1@...ovo.com, poyu_hung@...ax.corp-partner.google.com
Subject: Re: [PATCH v3 4/4] HID: touchscreen: Add initial support for Himax
HID-over-SPI
On 17/10/2023 11:19, Tylor Yang wrote:
...
> +
> +#if defined(CONFIG_FB)
> +int fb_notifier_callback(struct notifier_block *self,
> + unsigned long event, void *data)
> +{
> + const struct fb_event *evdata = data;
> + int *blank;
> + struct himax_ts_data *ts =
> + container_of(self, struct himax_ts_data, fb_notif);
> +
> + I("entered");
> +
> + if (!ts) {
> + E("ts is NULL");
> + return -ECANCELED;
> + }
There are so many wrong things with this.... First, tell me, how
container of valid pointer can be NULL?
Second, this is not Linux coding style.
Best regards,
Krzysztof
Powered by blists - more mailing lists