Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp751232pxb; Thu, 9 Sep 2021 11:06:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyttg4Ubp4FAi7F16MVurSlEU5lBau0XKH4WOiWmZcu6jUbH0tS/z79/mDtbdA/Xpb4xQbS X-Received: by 2002:a02:7355:: with SMTP id a21mr984662jae.53.1631210811871; Thu, 09 Sep 2021 11:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631210811; cv=none; d=google.com; s=arc-20160816; b=uNCdG1zX/bqj7bdZwZcm5WEIpHPApWIz/HvmwHBO4PW5g7zoVl3NdGAEt8F21lJ8k2 OEGvxep2cHC2gEdtCutu+NjavQrePNapZy5WfjgncvxweR84VJwtsJjnNc5y1irrKleU Ct/xc8+TVr4O0HlMMZk//rlXundIOyIT002RffvWP1YRzkk8koZ3cnEQHVFyZCSfcpYJ vY32+8wl5OSO3FGa2pJ30V/Pn0TM4QZTnBtH5Yd6IFy8uyGqmPYn+Tp8c1537xINcxSH G5oJQjx87OqEYgVqy7xv03gmx7lpZeNWv8hm4Wtn7JS3CYH+nYxqMebVbjhVG7QeoTJ3 zO8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rEji2iFIXeCGsXueUll7QztaqtHdhJ8QEUQEfTvQZ/0=; b=nKDhc88+v09U5EbmOZsJo0wIngE0yamQbtTxtYvA7KjlZRn8TLEO4h4xAwDMhQtNN1 lwaSQ8os1zvB9fe+3nawfL0witdW6cf+A2EqwDefCb2jG6+AePnopG7Uywbin2y4ZTN0 eGq+82TlbLttKsZkLfqmFdqz1ADCN3IyAkDm0uaJ3gJlJKy5WEj86BwIS5nOEiYO2KwQ /deT45sRSL7gG6796eAT/+pO/g57EeNj3reloYZ+6rWqkdlbC0/WZD08epPsknKsjsz+ BcC0z6a1S+Zybkxuu/ZwvS8f3r+KAUj1W1/53o5Ka3+B91cq/dY4yQUyH9MgfFZeB+zS cfUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i31si2692310jac.56.2021.09.09.11.06.31; Thu, 09 Sep 2021 11:06:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242867AbhIISGQ (ORCPT + 99 others); Thu, 9 Sep 2021 14:06:16 -0400 Received: from smtprelay07.ispgateway.de ([134.119.228.97]:11510 "EHLO smtprelay07.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237229AbhIISGQ (ORCPT ); Thu, 9 Sep 2021 14:06:16 -0400 Received: from [87.92.210.171] (helo=lumip-notebook.fritz.box) by smtprelay07.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mOOPx-0004df-UV; Thu, 09 Sep 2021 20:04:58 +0200 From: Lukas Prediger To: phil@philpotter.co.uk Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, lumip@lumip.de Subject: Re: [PATCH v2] drivers/cdrom: improved ioctl for media change detection Date: Thu, 9 Sep 2021 21:04:28 +0300 Message-Id: <20210909180427.8100-1-lumip@lumip.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Df-Sender: bHVrYXMucHJlZGlnZXJAbHVtaXAuZGU= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Phil, thanks for taking the time to look at this and give feedback. > Dear Lukas, > > Thank you for the patch, much appreciated and looks great. One very > minor thing though has jumped out at me after running checkpatch though: > > > --- a/include/uapi/linux/cdrom.h > > +++ b/include/uapi/linux/cdrom.h > > @@ -147,6 +147,8 @@ > > #define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */ > > #define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */ > > > > +#define CDROM_TIMED_MEDIA_CHANGE 0x5396 /* get the timestamp of the last media change */ > > + > > /******************************************************* > > * CDROM IOCTL structures > > *******************************************************/ > > @@ -295,6 +297,19 @@ struct cdrom_generic_command > > }; > > }; > > > > +/* This struct is used by CDROM_TIMED_MEDIA_CHANGE */ > > +struct cdrom_timed_media_change_info > > +{ > > This opening brace should be on the same line as the struct definition > as per current style rules. I also noted that checkpatch reported this and that it is technically a style breach, however I kept the brace in the newline to be consistent with all the other cdrom ioctl structs defined above this in the same file for consistency. I have no strong feelings about this, though, so we could change this. > I also got a checkpatch warning about ENOSYS being used as an error > value, but I can see this usage is standard in the driver and not a > problem so no issue with that. > > I will review and test properly after work tomorrow (being new to the > role I'd like to make sure I'm taking the proper time), but I have no > doubt it will work fine. Assuming it does I will be happy to accept the > patch with the above brace change. Thanks again. > Regards, > Phil Best regards, Lukas