Re: [PATCH 1/2] usb: misc: xapea00x: add driver for Xaptum ENF Access Card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 22, 2018 at 8:28 AM, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Jan 10, 2018 at 10:58:29AM -0600, David R. Bild wrote:
> > +/**
> > + * xapea00x_spi_cleanup
> > + *
> > + * Context: !in_interrupt()
> > + */
>
> No need to have kerneldoc formatting for static functions, nor the whole
> Context thing, but it's your code to maintain over time, not mine :)

It's somewhat helpful for new folks on our team who need to follow the
code, although rather verbose afterwards. If you think it's too
verbose by kernel standards, I'm happy to de-kerneldoc the static
functions.

>
>
> > +static void xapea00x_spi_cleanup(struct spi_device *spi)
> > +{
> > +     dev_dbg(&spi->dev, "%s\n", __func__);
> > +}
>
> Why?  Why is this function here at all?

I'll remove this method in v2 when addressing Oliver's comments.  The
SPI subsystem does allow a null pointer for the cleanup callback. I
didn't think it did based on some examples I'd been looking at ---
hence the no-op function.

> Shouldn't you be actually cleaning up some memory or reference count
> here?

In this case, there's nothing to free or decrement.  All cleanup is
done when the USB device is unregistered.

Thanks,
David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux