Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp562542pxr; Mon, 11 Apr 2022 00:56:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxukF29ABsTqi1LkCVfrUI9cg81i/Vu5OT0FZTwHdOGaaCTe8xf2avLPPKOdQ2YfJCXcw3y X-Received: by 2002:a17:902:9001:b0:156:a567:2683 with SMTP id a1-20020a170902900100b00156a5672683mr31202384plp.164.1649663809379; Mon, 11 Apr 2022 00:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649663809; cv=none; d=google.com; s=arc-20160816; b=Nu3IMhbPc2WscHUfiN5chcBo1Z6woou/a8WIcMv6d5DT23nAe3ei1sSUXM76ysytYY VPR6BNSUq0YF+cYhmJzWMBGVNbS6ZvVrvSUkZhwCPV3pdKIluiOoof1g1TAqzLlnSFx8 rWYqMirhkGFbC4I7Yj8IHr2/QxPA0SgQELuDxWNIw6uFMCgmZa53zq9UMd0txWcC2fuV fTIJ+wr0QnNLUu3qNRltZGoFj2eWSS23+4Cd+xCu6NTWhDSWKSyt8wwaPF+FNNRwtnIW czRaNJy4SdeMBVRKFvu8lZhBzx29IPrO/pvjotBkzVc+Z8jHapnEEOK/Lb788JdhG6iB YUZw== 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:subject:cc:to:from:date; bh=9hJxcaHBmPW4hEIbc0B7S+eepGk1MUmsR5eg4VzBhps=; b=mnmJCbXqXVg882JfxIwIfVyzvz6i3fYOAHyotHlAe48gXwe4y6GnlPWP/XjxUXpXBi NM5iaEIJ4G6v/ECxQpHCkHwXzHA7Ekhe81ihtXFQsmKjKTlr99XbHzaSV3nQHeVGf08+ /8bN3QpoB5yBstLToTjF8Wsxu+h4wY/xYrc/cRAonWuTEwWjS3xXmADSxjgBZK/tZrf/ VvtofLhWzEoH64o3G/+JcQju9w8EbPekrxqhUMLzziFxhP2KFztJYVxZm0bzIGGDw7Cz MA5kufqy8a9eEIOj3BkdPDgfe8LPSwwnVtkfMDFPo226eQXt6pDcZX5QnvkUvlqS1jDy I1Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a056a00151600b004fabd831538si9198754pfu.196.2022.04.11.00.56.37; Mon, 11 Apr 2022 00:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236180AbiDIE2d (ORCPT + 99 others); Sat, 9 Apr 2022 00:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240861AbiDIE1r (ORCPT ); Sat, 9 Apr 2022 00:27:47 -0400 Received: from nksmu.kylinos.cn (mailgw.kylinos.cn [123.150.8.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845412E1627; Fri, 8 Apr 2022 21:25:39 -0700 (PDT) X-UUID: ba5dd6ec4e194e7e858000d3602be3bc-20220409 X-CPASD-INFO: dfdc728120ed4e33ae419e466acbcd6f@rbaeg2RkZmFeUKewg6h-bYGWZGFpkVS FeJuDkpGUYoaVhH5xTWVlZ15UfYBqVWVbZV9ZenRqUmFeaFxTi3akdmpQYIRkXW10qrWmnVdiZmE= X-CLOUD-ID: dfdc728120ed4e33ae419e466acbcd6f X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,OB:0.0,URL:0.6,TVAL:179 .0,ESV:0.0,ECOM:0.0,ML:0.0,FD:0.0,CUTS:110.0,IP:-2.0,MAL:-5.0,PHF:0.0,PHC:0.0 ,SPF:4.0,EDMS:-5,IPLABEL:-2.0,FROMTO:0,AD:0,FFOB:0.0,CFOB:0.0,SPC:0,SIG:-5,AU F:10,DUF:36647,ACD:248,DCD:350,SL:0,EISP:0,AG:0,CFC:0.324,CFSR:0.2,UAT:1,RAF: 2,IMG:-5.0,DFA:0,DTA:0,IBL:-2.0,ADI:-5,SBL:0,REDM:0,REIP:0,ESB:0,ATTNUM:0,EAF :0,CID:-5.0,VERSION:2.3.17 X-CPASD-ID: ba5dd6ec4e194e7e858000d3602be3bc-20220409 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1 X-UUID: ba5dd6ec4e194e7e858000d3602be3bc-20220409 X-User: lienze@kylinos.cn Received: from asus [(61.48.215.124)] by nksmu.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 1212242366; Sat, 09 Apr 2022 12:24:25 +0800 Date: Sat, 9 Apr 2022 12:25:30 +0800 From: Enze Li To: Jens Axboe Cc: phil@philpotter.co.uk, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH] cdrom: do not print info list when there is no cdrom device Message-ID: <20220409122530.60353fcd@asus> In-Reply-To: <25390602-cfa0-dba3-bfbc-a35ed6b44bcf@kernel.dk> References: <20220408084221.1681592-1-lienze@kylinos.cn> <25390602-cfa0-dba3-bfbc-a35ed6b44bcf@kernel.dk> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Apr 2022 06:34:04 -0600 Jens Axboe wrote: > On 4/8/22 2:42 AM, Enze Li wrote: > > There is no need to print a list of cdrom entries with blank info > > when no cdrom device exists. With this patch applied, we get: > > > > ================================================ > > $ cat /proc/sys/dev/cdrom/info > > CD-ROM information, Id:cdrom.c 3.20 2003/12/17 > > > > No device found. > > > > ================================================ Hi Jens, Thanks for your review. > > And what did we get before? Without the patch, we get: ================================================ $ cat /proc/sys/dev/cdrom/info CD-ROM information, Id: cdrom.c 3.20 2003/12/17 drive name: drive speed: drive # of slots: Can close tray: Can open tray: Can lock tray: Can change speed: Can select disk: Can read multisession: Can read MCN: Reports media changed: Can play audio: Can write CD-R: Can write CD-RW: Can read DVD: Can write DVD-R: Can write DVD-RAM: Can read MRW: Can write MRW: Can write RAM: ================================================ > > Will this potentially break applications that parse it? > I dunno, is there any way to confirm this thing? And if this is really a possibility, does it mean that we cannot make changes? BTW, could you pls help review the following patch? I forgot to cc you and linux-block@list. :) https://lore.kernel.org/lkml/20220406090337.1116708-1-lienze@kylinos.cn/ Thanks, Enze