Re: [PATCH v5 3/4] iommufd: Add IOMMU_GET_HW_INFO

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

 



On Mon, Aug 07, 2023 at 08:49:27AM +0000, Liu, Yi L wrote:

> > > > +	/* driver has hw_info callback should have a unique hw_info_type */
> > > > +	if (WARN_ON_ONCE(hw_info_type == IOMMU_HW_INFO_TYPE_NONE)) {
> > > > +		rc = -ENODEV;
> > > > +		goto out_err;
> > > > +	}
> > > > +
> > > > +	length = min(cmd->data_len, data_len);
> > > > +	if (copy_to_user(user_ptr, data, length)) {
> > > > +		rc = -EFAULT;
> > > > +		goto out_err;
> > > > +	}
> > > > +
> > > > +done:
> > 
> > No label here, put it in a if {}
> 
> How about below?

Looks better

You could also consider putting the content of the if {} in a function

Jason



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux