Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2832159ybg; Thu, 24 Oct 2019 16:13:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAFqrLl7zguutjaDKzS4rN/vArNTfMqMsEWONWtFnnrHBqEjcusxHMdHRhgluSUDb4ltsg X-Received: by 2002:a50:d7c9:: with SMTP id m9mr718248edj.93.1571958782431; Thu, 24 Oct 2019 16:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571958782; cv=none; d=google.com; s=arc-20160816; b=RQvA4WUnfYXdo5EDXpfZW5zMoMml9n5M1PG/fE3qbSM4hs7dEZ4LjMTeTfwPh1anuo Ai3fcyWF3rIkTm3hmYI9TKPL/280MQy766ecPSZyn86mUdeWcvhi4UMVco1YoZJIlfrB BHyc4WU2cE9/1yip8ElKETz9r3jnxZKTcDTz1rM+IGRtRL2o6ttUHEUJDUp/fASrhgFR JAp/B6jO2nW2kLgAJilQttHsb6XULhzlZscXmtu0EaWGTVXC3YK/KT5+OTqSG/aQLztl 3lBFPqHAsB6DugoOxbNJte5B78J+G5GUJ7+TNZcYJBEUbV/zxUriAjEqxKmTyDn3vZP7 FCjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lbDdmLFp++r+d5P12U3dOVL/guWYHws51pEeMjhAG38=; b=FhP+yirdhwyRhjnDXH9fupC86zMeKTjFt/qzVuOOEo4jBXu5tHpb3ATMjGnvtVgUSv kC7bH0x3Agz+OlTtu5zSnKKAe46BGt0nAqHKO/wMro37uFjike/N5NWmtGXXuXijDnpZ uhnBzkujzvIEBavZ6p9VzTUkJaNkRmXDbQJUMp8gB6YJiqZbWxzBY6zecHDMAub3fnrK tmaFazXaod0Mckcu+O1e+2u0V4ju8ToEBImXXX4hlsOC/DN255IpKDuJ0JQoVVfwd7rx apJjwp6CY5D7+5EJQ7GPdAi1hkcv9kuoDru+ZgKQ2X9FWq5aLaghUTTsr4B82VuHWUGU BTFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p21si125115ejx.364.2019.10.24.16.12.38; Thu, 24 Oct 2019 16:13:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438375AbfJXIuS (ORCPT + 99 others); Thu, 24 Oct 2019 04:50:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:51128 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729514AbfJXIuS (ORCPT ); Thu, 24 Oct 2019 04:50:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E726EB087; Thu, 24 Oct 2019 08:50:15 +0000 (UTC) Date: Thu, 24 Oct 2019 10:50:14 +0200 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Christoph Hellwig Cc: linux-scsi@vger.kernel.org, Jonathan Corbet , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" , Alexander Viro , Mauro Carvalho Chehab , Eric Biggers , "J. Bruce Fields" , Benjamin Coddington , Hannes Reinecke , Omar Sandoval , Ming Lei , Damien Le Moal , Bart Van Assche , Tejun Heo , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 2/8] cdrom: factor out common open_for_* code Message-ID: <20191024085014.GF938@kitsune.suse.cz> References: <20191024021958.GA11485@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024021958.GA11485@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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