Re: [RFC PATCH net-next 2/6] net: ethernet: add mac-phy interrupt support with reset complete handling

From: Andrew Lunn
Date: Tue Sep 12 2023 - 08:11:04 EST


> > +int oa_tc6_deinit(struct oa_tc6 *tc6)
> > {
> > - kfree(tc6);
> > + int ret;
> > +
> > + devm_free_irq(&tc6->spi->dev, tc6->spi->irq, tc6);
> > + ret = kthread_stop(tc6->tc6_task);
>
> kthread_stop() will the result of threadfn(). Here mean that if threadfn()
> return non-zero, deinit() will fail. But the KTHREAD_SHOULD_STOP already be set.
> And oa_tc6_handler() will end. Please check it is what you want.

Hi Ziyang

Please trim emails when replying to just the relevant text. Otherwise
you need to page down, page down, page down again and again and might
miss parts of your reply.

Andrew