Re: [PATCH net-next v2 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

From: Greg KH
Date: Wed Apr 07 2021 - 13:48:46 EST


On Wed, Apr 07, 2021 at 01:33:35PM -0400, min.li.xe@xxxxxxxxxxx wrote:
> +static int
> +rsmu_open(struct inode *iptr, struct file *fptr)
> +{
> + return 0;
> +}
> +
> +static int
> +rsmu_release(struct inode *iptr, struct file *fptr)
> +{
> + return 0;
> +}

If you do nothing in an open/release function, then there is no need to
have them at all, you can remove them.

But this feels odd, how do you know what device you are using in your
ioctl command?

thanks,

greg k-h