Re: [PATCH v12] staging: fbtft: add tearing signal detect

From: Dan Carpenter
Date: Thu Jan 28 2021 - 10:27:46 EST


On Thu, Jan 28, 2021 at 04:33:02PM +0200, Andy Shevchenko wrote:
> > + init_completion(&spi_panel_te);
> > + rc = devm_request_irq(dev,
>
> > + gpiod_to_irq(par->gpio.te),
>
> ...and here simply use irq.
>
> > + spi_panel_te_handler, IRQF_TRIGGER_RISING,
> > + "TE_GPIO", par);
>
> > + if (IS_ERR(rc))
>
> This is wrong. rc is integer no IS_ERR() is required. Ditto for
> PTR_ERR(). Have you even looked for these macros implementations?
>

Yeah... It leads to a compile warning:

warning: passing argument 1 of ‘IS_ERR’ makes pointer from integer without a cast [-Wint-conversion]

regards,
dan carpenter