Re: [PATCH v2 2/8] cdrom: factor out common open_for_* code

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

 



On Wed, Oct 23, 2019 at 07:19:58PM -0700, Christoph Hellwig wrote:
> >  static
> > -int open_for_data(struct cdrom_device_info *cdi)
> > +int open_for_common(struct cdrom_device_info *cdi, tracktype *tracks)
> 
> Please fix the coding style.  static never should be on a line of its
> own..

That's fine.

> 
> >  			} else {
> >  				cd_dbg(CD_OPEN, "bummer. this drive can't close the tray.\n");
> > -				ret=-ENOMEDIUM;
> > -				goto clean_up_and_return;
> > +				return -ENOMEDIUM;
> 
> Can you revert the polarity of the if opening the block before and
> return early for the -ENOMEDIUM case to save on leven of indentation?

Then I will get complaints I do unrelated changes and it's hard to
review. The code gets removed later anyway.

Thanks

Michal



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux