Re: [PATCH v3 4/4] HID: touchscreen: Add initial support for Himax HID-over-SPI
From: Krzysztof Kozlowski
Date: Tue Oct 17 2023 - 13:03:32 EST
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