lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191024021958.GA11485@infradead.org>
Date:   Wed, 23 Oct 2019 19:19:58 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Michal Suchanek <msuchanek@...e.de>
Cc:     linux-scsi@...r.kernel.org, Jonathan Corbet <corbet@....net>,
        Jens Axboe <axboe@...nel.dk>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Eric Biggers <ebiggers@...gle.com>,
        "J. Bruce Fields" <bfields@...hat.com>,
        Benjamin Coddington <bcodding@...hat.com>,
        Hannes Reinecke <hare@...e.com>,
        Omar Sandoval <osandov@...com>, Ming Lei <ming.lei@...hat.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Bart Van Assche <bvanassche@....org>,
        Tejun Heo <tj@...nel.org>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2 2/8] cdrom: factor out common open_for_* code

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ