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

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

 



>  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..

>  			} 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?

>  			if ((ret == CDS_NO_DISC) || (ret==CDS_TRAY_OPEN)) {

If you touch the whole area please remove the inner braces and add the
proper spaces around the second ==.

> +static
> +int open_for_data(struct cdrom_device_info *cdi)

Same issue with the static here.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux