From patchwork Sun May 15 20:58:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Potter X-Patchwork-Id: 12850111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACD41C433F5 for ; Sun, 15 May 2022 20:58:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229491AbiEOU6j (ORCPT ); Sun, 15 May 2022 16:58:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiEOU6i (ORCPT ); Sun, 15 May 2022 16:58:38 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8727A2C108 for ; Sun, 15 May 2022 13:58:37 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id w4so18050221wrg.12 for ; Sun, 15 May 2022 13:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZjW+cu9gNic3DXhYu0fnSojGWu00ohKV4jtFet5Mj/I=; b=gzhY5ER5NmYm8JS3F0lR3f5PpeZ1AZ4nBTeB6S5BK6ZxJXU7ChEqNnL9IR7qoCi7xB L9JJ3VSB/QghtaSIjk0NnbYcWVFCJLYp8FSLnNUF9zMlB3ztztqfTPlOsMNzMh6uQkQZ xFmC+MjgmhqGvH5uWNBzvbA5IzsbAo0qlgdEjxix6F63cxGvbGO53UWP/WoQrnF6QdRE b19AQ9yBbAJrZ0AdErfqjQjwHZfdna3zTxP+TRnIsOb4QcQn4+AV9uarXKN289peWkgT okQVaO4Ukcr8w++q5v5M4kBA3Xrsrqy873r7KkEhTAxTxZ4PKlnoouaUQfNj3sDXXaiB qU6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZjW+cu9gNic3DXhYu0fnSojGWu00ohKV4jtFet5Mj/I=; b=JL/ki1Lg/wUhtaHEvompbnzpTzP4JqrZ5hNBZyZXIuUYR0rZ79BUY+KUgIznizeYSp buZH4OyFVQ2udhUUw+y+5iDyOn6Dr10HDwKQefo5AFDr7ztgvfmNWzH5s0n6ahcbZQN4 vR7xaVDs0C0GUC9ZP50txQjpADDVj+RRPO9lIOz5JMB5C0MApI/VZ1/vMTuCLSYXvYO0 Idzic9lH71oTvrCwV4/UHxB7ZYI0LwbmsvCVnQxQvcPfG8gQf2U2gGSQ/3oVTShAMBxn DBjJsmpRJ17aK06aJX1xCLM52EiiMaSq1rovL9SrjaN1Fj9kuKjRB+OU7CG4csJvCZjL 1ZOg== X-Gm-Message-State: AOAM533RM7OHFukLgbCJkwO4QJGvsvTrqfnLJ4SCyeUlXzW2h8YpFBgm 8rrpWSylYzInMcfHIn7Izxj6Pg== X-Google-Smtp-Source: ABdhPJwfDb1RJiu2T8CSba8iYadg/KUjWOQswGqvg0ninL6jf853cEDd4egYqPpXuOc9WLyrKOkBew== X-Received: by 2002:a5d:4a86:0:b0:20c:c5e4:11f0 with SMTP id o6-20020a5d4a86000000b0020cc5e411f0mr11244252wrq.454.1652648316046; Sun, 15 May 2022 13:58:36 -0700 (PDT) Received: from localhost.localdomain (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id r17-20020adfbb11000000b0020c5253d920sm8922074wrg.108.2022.05.15.13.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 13:58:35 -0700 (PDT) From: Phillip Potter To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH 1/5] cdrom: make EXPORT_SYMBOL follow exported function Date: Sun, 15 May 2022 21:58:29 +0100 Message-Id: <20220515205833.944139-2-phil@philpotter.co.uk> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220515205833.944139-1-phil@philpotter.co.uk> References: <20220515205833.944139-1-phil@philpotter.co.uk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Enze Li Currently, some EXPORT_SYMBOL declarations do not follow the exported function, which affects the readability of the code. To maintain consistency, move these EXPORT_SYMBOL declarations to the correct position to improve the readability of the code. Signed-off-by: Enze Li Link: https://lore.kernel.org/all/20220406090337.1116708-1-lienze@kylinos.cn Signed-off-by: Phillip Potter --- drivers/cdrom/cdrom.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 2dc9da683a13..7e2174f597f3 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -648,6 +648,7 @@ int register_cdrom(struct gendisk *disk, struct cdrom_device_info *cdi) mutex_unlock(&cdrom_mutex); return 0; } +EXPORT_SYMBOL(register_cdrom); #undef ENSURE void unregister_cdrom(struct cdrom_device_info *cdi) @@ -663,6 +664,7 @@ void unregister_cdrom(struct cdrom_device_info *cdi) cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name); } +EXPORT_SYMBOL(unregister_cdrom); int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med) @@ -690,6 +692,7 @@ int cdrom_get_media_event(struct cdrom_device_info *cdi, memcpy(med, &buffer[sizeof(*eh)], sizeof(*med)); return 0; } +EXPORT_SYMBOL(cdrom_get_media_event); static int cdrom_get_random_writable(struct cdrom_device_info *cdi, struct rwrt_feature_desc *rfd) @@ -1206,6 +1209,7 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev, cdi->use_count--; return ret; } +EXPORT_SYMBOL(cdrom_open); /* This code is similar to that in open_for_data. The routine is called whenever an audio play operation is requested. @@ -1301,6 +1305,7 @@ void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode) cdo->tray_move(cdi, 1); } } +EXPORT_SYMBOL(cdrom_release); static int cdrom_read_mech_status(struct cdrom_device_info *cdi, struct cdrom_changer_info *buf) @@ -1382,6 +1387,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi) kfree(info); return nslots; } +EXPORT_SYMBOL(cdrom_number_of_slots); /* If SLOT < 0, unload the current slot. Otherwise, try to load SLOT. */ @@ -1581,6 +1587,7 @@ void init_cdrom_command(struct packet_command *cgc, void *buf, int len, cgc->data_direction = type; cgc->timeout = CDROM_DEF_TIMEOUT; } +EXPORT_SYMBOL(init_cdrom_command); /* DVD handling */ @@ -1999,6 +2006,7 @@ int cdrom_mode_sense(struct cdrom_device_info *cdi, cgc->data_direction = CGC_DATA_READ; return cdo->generic_packet(cdi, cgc); } +EXPORT_SYMBOL(cdrom_mode_sense); int cdrom_mode_select(struct cdrom_device_info *cdi, struct packet_command *cgc) @@ -2014,6 +2022,7 @@ int cdrom_mode_select(struct cdrom_device_info *cdi, cgc->data_direction = CGC_DATA_WRITE; return cdo->generic_packet(cdi, cgc); } +EXPORT_SYMBOL(cdrom_mode_select); static int cdrom_read_subchannel(struct cdrom_device_info *cdi, struct cdrom_subchnl *subchnl, int mcn) @@ -2892,6 +2901,7 @@ int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written) *last_written = toc.cdte_addr.lba; return 0; } +EXPORT_SYMBOL(cdrom_get_last_written); /* return the next writable block. also for udf file system. */ static int cdrom_get_next_writable(struct cdrom_device_info *cdi, @@ -3429,18 +3439,7 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev, return -ENOSYS; } - -EXPORT_SYMBOL(cdrom_get_last_written); -EXPORT_SYMBOL(register_cdrom); -EXPORT_SYMBOL(unregister_cdrom); -EXPORT_SYMBOL(cdrom_open); -EXPORT_SYMBOL(cdrom_release); EXPORT_SYMBOL(cdrom_ioctl); -EXPORT_SYMBOL(cdrom_number_of_slots); -EXPORT_SYMBOL(cdrom_mode_select); -EXPORT_SYMBOL(cdrom_mode_sense); -EXPORT_SYMBOL(init_cdrom_command); -EXPORT_SYMBOL(cdrom_get_media_event); #ifdef CONFIG_SYSCTL From patchwork Sun May 15 20:58:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Potter X-Patchwork-Id: 12850112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12168C433FE for ; Sun, 15 May 2022 20:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229511AbiEOU6k (ORCPT ); Sun, 15 May 2022 16:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbiEOU6j (ORCPT ); Sun, 15 May 2022 16:58:39 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 326E12C109 for ; Sun, 15 May 2022 13:58:38 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id u3so18120779wrg.3 for ; Sun, 15 May 2022 13:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o7UgcRxa6R7yPbSvN+oP7olg7rDsqP0whKsr2ay+0og=; b=mIhV95ic6915yaiHdhr8kPbISQq64OSAT1Rx+oKacjY89LYBmayR1HPan/Qu28ty5X iyALrvBH6S+3oBFJ7XKeziOWmdYFtPR4QXM1ylclF9VcE1hG372fq6LjcXBC7zjSNCuu kwLjBZeO++LpJ9NEy6r80PdOdqoaTOczc9/N6GcvH77omGgEa0oy2JVBEqoG3oFszlyK j6zD9T6iDMloxeoW5+Tnm78/gkGXEtB2NPpiS7uiDwg8vP6IUjm+IMLAblPE7JEEuund WoqbGA12FrdPfeBEizr6LRkTJdjVI2SPKaynoDXgYKldqTEcDEIzQ3XcQdd6C69LHgaL djyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o7UgcRxa6R7yPbSvN+oP7olg7rDsqP0whKsr2ay+0og=; b=P3SG4LwZXmFooY0wcNjBWOPG5HPA1Jv5IHzr58A74VV5PTBxUR0HIaQsZ60F34L2k4 7Kr7l/VQFkEb5DlU64xaEbw0TjZ+Ur2n7ohIFajKh8MSiteaZQMIYgXjTo4cegM9OJ+4 +cKSjTx7um37O5N1q4fIQC9mETCB9tWUHcu5xUkNsL0G54rxEH75h5ShpCXlkkthRzew DYIP2RIkFMlseHe0C4OVsT4a4SnTlUrWKEC+2RLBlteWcbO2UO0/2C9Qs+XiAHram6ki n28L0ZP96gJxtMkuKl9MlY8NO4oEIVyBA2vrhXCzeYJWa9fcgLKXi0R0JE8BDAbqwZFx R0ng== X-Gm-Message-State: AOAM53304tSTQQBI2amgrZgPb6jk6EEQ0WVpeVyowlP+IaVfT7kkxqbv tixfkm+BUN/V1Ptz6rHxGEYZvA== X-Google-Smtp-Source: ABdhPJzMn0hiBqmMGroZCfe1j9XH1JZvMDNvyTmah/QWSU2ZFU6+7dk/bSb/5tv3zi7UeM4UTM1xmA== X-Received: by 2002:a5d:620c:0:b0:20c:f50a:dafa with SMTP id y12-20020a5d620c000000b0020cf50adafamr8813288wru.460.1652648316782; Sun, 15 May 2022 13:58:36 -0700 (PDT) Received: from localhost.localdomain (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id r17-20020adfbb11000000b0020c5253d920sm8922074wrg.108.2022.05.15.13.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 13:58:36 -0700 (PDT) From: Phillip Potter To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH 2/5] cdrom: remove the unused driver specific disc change ioctl Date: Sun, 15 May 2022 21:58:30 +0100 Message-Id: <20220515205833.944139-3-phil@philpotter.co.uk> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220515205833.944139-2-phil@philpotter.co.uk> References: <20220515205833.944139-1-phil@philpotter.co.uk> <20220515205833.944139-2-phil@philpotter.co.uk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Paul Gortmaker This was only used by the ide-cd driver, which went away in commit b7fb14d3ac63 ("ide: remove the legacy ide driver") so we might as well take advantage of that and get rid of this hook as well. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Phillip Potter Signed-off-by: Paul Gortmaker Link: https://lore.kernel.org/all/20220427132436.12795-2-paul.gortmaker@windriver.com Signed-off-by: Phillip Potter --- Documentation/cdrom/cdrom-standard.rst | 10 ---------- drivers/cdrom/cdrom.c | 8 -------- include/linux/cdrom.h | 1 - 3 files changed, 19 deletions(-) diff --git a/Documentation/cdrom/cdrom-standard.rst b/Documentation/cdrom/cdrom-standard.rst index 52ea7b6b2fe8..7964fe134277 100644 --- a/Documentation/cdrom/cdrom-standard.rst +++ b/Documentation/cdrom/cdrom-standard.rst @@ -218,7 +218,6 @@ current *struct* is:: int (*tray_move)(struct cdrom_device_info *, int); int (*lock_door)(struct cdrom_device_info *, int); int (*select_speed)(struct cdrom_device_info *, int); - int (*select_disc)(struct cdrom_device_info *, int); int (*get_last_session) (struct cdrom_device_info *, struct cdrom_multisession *); int (*get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *); @@ -419,15 +418,6 @@ this `auto-selection` capability, the decision should be made on the current disc loaded and the return value should be positive. A negative return value indicates an error. -:: - - int select_disc(struct cdrom_device_info *cdi, int number) - -If the drive can store multiple discs (a juke-box) this function -will perform disc selection. It should return the number of the -selected disc on success, a negative value on error. Currently, only -the ide-cd driver supports this functionality. - :: int get_last_session(struct cdrom_device_info *cdi, diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 7e2174f597f3..e43bb071fe92 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -2452,14 +2452,6 @@ static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, return -EINVAL; } - /* - * ->select_disc is a hook to allow a driver-specific way of - * seleting disc. However, since there is no equivalent hook for - * cdrom_slot_status this may not actually be useful... - */ - if (cdi->ops->select_disc) - return cdi->ops->select_disc(cdi, arg); - cd_dbg(CD_CHANGER, "Using generic cdrom_select_disc()\n"); return cdrom_select_disc(cdi, arg); } diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 0a89f111e00e..67caa909e3e6 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -77,7 +77,6 @@ struct cdrom_device_ops { int (*tray_move) (struct cdrom_device_info *, int); int (*lock_door) (struct cdrom_device_info *, int); int (*select_speed) (struct cdrom_device_info *, int); - int (*select_disc) (struct cdrom_device_info *, int); int (*get_last_session) (struct cdrom_device_info *, struct cdrom_multisession *); int (*get_mcn) (struct cdrom_device_info *, From patchwork Sun May 15 20:58:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Potter X-Patchwork-Id: 12850113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE8C5C433EF for ; Sun, 15 May 2022 20:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbiEOU6l (ORCPT ); Sun, 15 May 2022 16:58:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbiEOU6j (ORCPT ); Sun, 15 May 2022 16:58:39 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEC272C10A for ; Sun, 15 May 2022 13:58:38 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id d5so18107504wrb.6 for ; Sun, 15 May 2022 13:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QQrx6xhXSM16wrTkkyMiWLyUMIKMm9Gd98cm7zuwaYE=; b=ewh/32bVg3iJAUpl6kKCgsWrxg6bJay9w6xmBghNC6CKL7yFBRi7azVe74db1zuvSt Fdmm1DmGr3ydfRC0d9jDk8pq8K+bpTlZBODeqtPpwi52mliS8pOemiB85gnU1+DxE+ex ASSxrY0X6QfoIIFlphmHZG1b1ie1I0/jfC980vKw0VdO0FB5pwYiNleYqsmRPfwaF00K ftpOaEjf+fW1YGWuJj8K9dbaWy6DAP4Bv69BTtf493tXIk+TSpkMFo/Z9AVZin71yb2j MoRtFbb0ywaZKLPsZ8eGUYSz8Cfi7JDFtstUtPVwP+j/7e0KcDJlF57iCDwcJFX7lzkK 1vxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QQrx6xhXSM16wrTkkyMiWLyUMIKMm9Gd98cm7zuwaYE=; b=EoCSW5EerB/yQ+OkvvT/X7E2+lfX1lB3+YkTo25//DanYjPp8niWKmFE4hvCjGeHXk qUrjYPFpaEWKmjNPfIC7q9wGsMJU7tAuYf/9atWJ6lQk/5YOGUmD0eIYWLBSqra4d50W r2yU2yJXUaFImJL1IfHj05VTGl62+yr6JxdF70xnO53mV8BKofOBYZ4up1UQTt13dxcB 1nJJ+osM9c0bZ7nu/TAt1dhr5qoxvAlvK5F1kK//kY7GUYg3JZSQ4bD6riq0jdWRyJnW QVexS+VECwb+S8fDRW7K1boZLZVDEHzWJRdrosHyNif4v+pzrIkRkMTPfDq7Jfxt5GFl jF5g== X-Gm-Message-State: AOAM530RXUv9AJ3knLB3mRHFJpTMqfBhuECVoWnY+wIsmu6BtLaXR4Ho LhRjhr2f+kffBMjiyjAHNW9sCHhfvcvsXA== X-Google-Smtp-Source: ABdhPJwJeNC+SfsBdNLBzoJOOgxxyn1esbajj/S11sKB3eQKFaeq2UiuaLUdBxxv3sMYSoess+yXXQ== X-Received: by 2002:a5d:594e:0:b0:20d:bb7:72b3 with SMTP id e14-20020a5d594e000000b0020d0bb772b3mr280511wri.702.1652648317445; Sun, 15 May 2022 13:58:37 -0700 (PDT) Received: from localhost.localdomain (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id r17-20020adfbb11000000b0020c5253d920sm8922074wrg.108.2022.05.15.13.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 13:58:37 -0700 (PDT) From: Phillip Potter To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH 3/5] cdrom: mark CDROMGETSPINDOWN/CDROMSETSPINDOWN obsolete Date: Sun, 15 May 2022 21:58:31 +0100 Message-Id: <20220515205833.944139-4-phil@philpotter.co.uk> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220515205833.944139-3-phil@philpotter.co.uk> References: <20220515205833.944139-1-phil@philpotter.co.uk> <20220515205833.944139-2-phil@philpotter.co.uk> <20220515205833.944139-3-phil@philpotter.co.uk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Paul Gortmaker These were only implemented by the IDE CD driver, which has since been removed. Given that nobody is likely to create new CD/DVD hardware (and associated drivers) we can mark these appropriately. Cc: Jens Axboe Cc: Christoph Hellwig Cc: Phillip Potter Signed-off-by: Paul Gortmaker Link: https://lore.kernel.org/all/20220427132436.12795-3-paul.gortmaker@windriver.com Signed-off-by: Phillip Potter --- Documentation/userspace-api/ioctl/cdrom.rst | 6 ++++++ include/uapi/linux/cdrom.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/ioctl/cdrom.rst b/Documentation/userspace-api/ioctl/cdrom.rst index 682948fc88a3..2ad91dbebd7c 100644 --- a/Documentation/userspace-api/ioctl/cdrom.rst +++ b/Documentation/userspace-api/ioctl/cdrom.rst @@ -718,6 +718,9 @@ CDROMPLAYBLK CDROMGETSPINDOWN + Obsolete, was ide-cd only + + usage:: char spindown; @@ -736,6 +739,9 @@ CDROMGETSPINDOWN CDROMSETSPINDOWN + Obsolete, was ide-cd only + + usage:: char spindown diff --git a/include/uapi/linux/cdrom.h b/include/uapi/linux/cdrom.h index 804ff8d98f71..011e594e4a0d 100644 --- a/include/uapi/linux/cdrom.h +++ b/include/uapi/linux/cdrom.h @@ -103,7 +103,7 @@ #define CDROMREADALL 0x5318 /* read all 2646 bytes */ /* - * These ioctls are (now) only in ide-cd.c for controlling + * These ioctls were only in (now removed) ide-cd.c for controlling * drive spindown time. They should be implemented in the * Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10, * GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE... From patchwork Sun May 15 20:58:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Potter X-Patchwork-Id: 12850115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 970BBC4332F for ; Sun, 15 May 2022 20:58:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231975AbiEOU6n (ORCPT ); Sun, 15 May 2022 16:58:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231190AbiEOU6l (ORCPT ); Sun, 15 May 2022 16:58:41 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6C3C2C108 for ; Sun, 15 May 2022 13:58:39 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id j24so2830746wrb.1 for ; Sun, 15 May 2022 13:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FzWYnzR5DitOZzkYTOMPHOcR1Svm9co17qXIK6ZPIYY=; b=Pj0O85d51ofD/JrTYdYR+FtivnWPY5vizMBtZvzLGUFErgT/wbh150YCfQ7aDzLVZb FtddbPrApipJxn4PWLsH35oAI3OPcD6ibKKH3aOVmOiPx0gr0EY19qS4nQ7co/nVxr5e BNGkjJdI0JMlm2beZ0UmCTH5mw26PDscQ/fwzWZi3VT6Ry5X56KiTVcz4ElUEC+RZHn/ +EZRAfkS45xiBVY/FBVICii7jkprEl/gUtAn0HNL+WVhioeb/6rjhcEQBDo4Q34R+Vwa RkSpi8kufkEfVTfM/BlXfrmqru2xQiXTAwRMXfbtRGZupoPfUeYaMJdCNPsMMzF7JmAl zUig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FzWYnzR5DitOZzkYTOMPHOcR1Svm9co17qXIK6ZPIYY=; b=yexVWELPZ0xEZwcKigkxWcdFWbdVRlrGvw/Xtz17L0faSM32q0iiACBW+Pg0nlJhtS L8M4fhRTTZB2h6/oXzV8lZ82YNkqcKqkqVmmJT+1+azJoabS2h6PVpIXmQ8S75imhXhf Pp8h1IiQ6Z7LegrSI4ke1J8jleOChpoHdklWw1Chrs2cVAkcocKD7f4L5pfSIhtMpMtE Pgs0qmmUz7UCLycSfhcIOtkjspSIcgp6JdUitYX6JaYtfkdcbFfjpA1o2BHsekHXu4ps 9aPsKJKkX9VmVhJcWiE0QrDb/aKcNcur6fm4TRP916q6+yTx/xaaTQryDHFVaVEd3P7v +Xlw== X-Gm-Message-State: AOAM5324BsYprz6IjcgLfowQ4tQw/yIU5y5SEhh1ZmI54oyRCeQANknX 9YPiJgGJutv9Jh5fQoRvXoABfA== X-Google-Smtp-Source: ABdhPJwltSNMKlGjZXqMMKfW4y9VhnARvk4nv0X6RooTgy1XA7ffJDSkpnedUugk66FVicx+jbZHrw== X-Received: by 2002:a5d:4e0d:0:b0:20d:88e:c8b1 with SMTP id p13-20020a5d4e0d000000b0020d088ec8b1mr1698802wrt.18.1652648318252; Sun, 15 May 2022 13:58:38 -0700 (PDT) Received: from localhost.localdomain (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id r17-20020adfbb11000000b0020c5253d920sm8922074wrg.108.2022.05.15.13.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 13:58:37 -0700 (PDT) From: Phillip Potter To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH 4/5] block: remove last remaining traces of IDE documentation Date: Sun, 15 May 2022 21:58:32 +0100 Message-Id: <20220515205833.944139-5-phil@philpotter.co.uk> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220515205833.944139-4-phil@philpotter.co.uk> References: <20220515205833.944139-1-phil@philpotter.co.uk> <20220515205833.944139-2-phil@philpotter.co.uk> <20220515205833.944139-3-phil@philpotter.co.uk> <20220515205833.944139-4-phil@philpotter.co.uk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Paul Gortmaker The last traces of the IDE driver went away in commit b7fb14d3ac63 ("ide: remove the legacy ide driver") but it left behind some traces of old documentation. As luck would have it Randy and I would submit similar changes within a week of each other to address this. As Randy's commit is in the doc tree already - this delta is just the stuff my removal contained that was not in Randy's IDE doc removal. Cc: Jens Axboe Cc: Christoph Hellwig Cc: Jonathan Corbet Cc: Phillip Potter Cc: Randy Dunlap Cc: Damien Le Moal Signed-off-by: Paul Gortmaker Link: https://lore.kernel.org/all/20220427165917.GE12977@windriver.com [phil@philpotter.co.uk: removed diffs already added by others] Signed-off-by: Phillip Potter --- Documentation/filesystems/proc.rst | 92 +++--------------------------- drivers/block/pktcdvd.c | 2 +- 2 files changed, 8 insertions(+), 86 deletions(-) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index cfec3cab0f9a..1bc91fb8c321 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -1225,85 +1225,7 @@ Provides counts of softirq handlers serviced since boot time, for each CPU. HRTIMER: 0 0 0 0 RCU: 1678 1769 2178 2250 - -1.3 IDE devices in /proc/ide ----------------------------- - -The subdirectory /proc/ide contains information about all IDE devices of which -the kernel is aware. There is one subdirectory for each IDE controller, the -file drivers and a link for each IDE device, pointing to the device directory -in the controller specific subtree. - -The file 'drivers' contains general information about the drivers used for the -IDE devices:: - - > cat /proc/ide/drivers - ide-cdrom version 4.53 - ide-disk version 1.08 - -More detailed information can be found in the controller specific -subdirectories. These are named ide0, ide1 and so on. Each of these -directories contains the files shown in table 1-6. - - -.. table:: Table 1-6: IDE controller info in /proc/ide/ide? - - ======= ======================================= - File Content - ======= ======================================= - channel IDE channel (0 or 1) - config Configuration (only for PCI/IDE bridge) - mate Mate name - model Type/Chipset of IDE controller - ======= ======================================= - -Each device connected to a controller has a separate subdirectory in the -controllers directory. The files listed in table 1-7 are contained in these -directories. - - -.. table:: Table 1-7: IDE device information - - ================ ========================================== - File Content - ================ ========================================== - cache The cache - capacity Capacity of the medium (in 512Byte blocks) - driver driver and version - geometry physical and logical geometry - identify device identify block - media media type - model device identifier - settings device setup - smart_thresholds IDE disk management thresholds - smart_values IDE disk management values - ================ ========================================== - -The most interesting file is ``settings``. This file contains a nice -overview of the drive parameters:: - - # cat /proc/ide/ide0/hda/settings - name value min max mode - ---- ----- --- --- ---- - bios_cyl 526 0 65535 rw - bios_head 255 0 255 rw - bios_sect 63 0 63 rw - breada_readahead 4 0 127 rw - bswap 0 0 1 r - file_readahead 72 0 2097151 rw - io_32bit 0 0 3 rw - keepsettings 0 0 1 rw - max_kb_per_request 122 1 127 rw - multcount 0 0 8 rw - nice1 1 0 1 rw - nowerr 0 0 1 rw - pio_mode write-only 0 255 w - slow 0 0 1 rw - unmaskirq 0 0 1 rw - using_dma 0 0 1 rw - - -1.4 Networking info in /proc/net +1.3 Networking info in /proc/net -------------------------------- The subdirectory /proc/net follows the usual pattern. Table 1-8 shows the @@ -1382,7 +1304,7 @@ It will contain information that is specific to that bond, such as the current slaves of the bond, the link status of the slaves, and how many times the slaves link has failed. -1.5 SCSI info +1.4 SCSI info ------------- If you have a SCSI host adapter in your system, you'll find a subdirectory @@ -1445,7 +1367,7 @@ AHA-2940 SCSI adapter:: Total transfers 0 (0 reads and 0 writes) -1.6 Parallel port info in /proc/parport +1.5 Parallel port info in /proc/parport --------------------------------------- The directory /proc/parport contains information about the parallel ports of @@ -1470,7 +1392,7 @@ These directories contain the four files shown in Table 1-10. number or none). ========= ==================================================================== -1.7 TTY info in /proc/tty +1.6 TTY info in /proc/tty ------------------------- Information about the available and actually used tty's can be found in the @@ -1505,7 +1427,7 @@ To see which tty's are currently in use, you can simply look into the file unknown /dev/tty 4 1-63 console -1.8 Miscellaneous kernel statistics in /proc/stat +1.7 Miscellaneous kernel statistics in /proc/stat ------------------------------------------------- Various pieces of information about kernel activity are available in the @@ -1578,7 +1500,7 @@ softirqs serviced; each subsequent column is the total for that particular softirq. -1.9 Ext4 file system parameters +1.8 Ext4 file system parameters ------------------------------- Information about mounted ext4 file systems can be found in @@ -1594,7 +1516,7 @@ in Table 1-12, below. mb_groups details of multiblock allocator buddy cache of free blocks ============== ========================================================== -1.10 /proc/consoles +1.9 /proc/consoles ------------------- Shows registered system console lines. diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index f270080f1478..789093375344 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -12,7 +12,7 @@ * Theory of operation: * * At the lowest level, there is the standard driver for the CD/DVD device, - * typically ide-cd.c or sr.c. This driver can handle read and write requests, + * such as drivers/scsi/sr.c. This driver can handle read and write requests, * but it doesn't know anything about the special restrictions that apply to * packet writing. One restriction is that write requests must be aligned to * packet boundaries on the physical media, and the size of a write request From patchwork Sun May 15 20:58:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phillip Potter X-Patchwork-Id: 12850114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D085C433F5 for ; Sun, 15 May 2022 20:58:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbiEOU6m (ORCPT ); Sun, 15 May 2022 16:58:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231975AbiEOU6l (ORCPT ); Sun, 15 May 2022 16:58:41 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54FF12C107 for ; Sun, 15 May 2022 13:58:40 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id r23so2063457wrr.2 for ; Sun, 15 May 2022 13:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philpotter-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0TRMEe/cLouPt9bGN7FdOWr+01EnoUUS94d9Z9TLQUA=; b=4M5OpNUdf/T8l6zgcdCNTx5WLvCYTlcrKsETceI0nEF2YBirtRZ4oVRqPHDjfgxq39 uv29FDCRObd/JuFkByCmlRKiZaMb2s+CUX1zeDmXnxjCt/SiXMsFBTe1yac9fvOb5/tW +idg43Z9MSGtUs2/PVE4U1siAym3gOCEwsCWeiVW1kjo4FyskE1/SHNVDUxQoqOaYQdO vtSozxVvT0nZ3q0godVB79oYul2wJO7TR3PaoavVfT5BPzDqXsUBAoZ8uaQPepUduiBO ZT/xm4PvXa/LrkWowqRLWNWmgfIT9AuxEtfxDolJDS6aj810qxd49Cdz4/Mpd32KW8pc uD3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0TRMEe/cLouPt9bGN7FdOWr+01EnoUUS94d9Z9TLQUA=; b=3+xETBXBJ/Hkm/68GGjht5x/PErNyBXMINdy+ekn3ovMrRF/4l7L6eQDi36wfkLAcH wqAiCGh1jKridWD7OK36QaYIklZW6kIr691sxbPRZLiXem1ubIhs8UWQCOz5PXBbfjfr 1IeRXlRAPJFDWJDH5rjnKbjp9qcC0mqlscfjWwYZlzzRl1iKROqsJ6VEbPq4U83V2BMq Dl9xqfnRFh+8FjWwVwKfznB2E94HCFaXVpnlHx4v3ruBLcgNEHWn1JLV/XvgMIdyWMUQ til/hYelQ7cGlEKeUEpTR6d9YVZfuSRrJOpgkilvh8nfwV8ncGD23EV4MPCNso+vzZy/ hMiw== X-Gm-Message-State: AOAM533sB02JeSt8a/TsxkS8BlECs+gMKCRfwyiHkG37w3Ij61aWPMUt xBdHnBwP7UnLxj52T5/EXQHbgCsIWDQtNA== X-Google-Smtp-Source: ABdhPJw85atDjQED7e5UMraPOUd6hXNnr9QjeSIDLLV88EVjCFMKtjdhUPmcU2+v8QFAUZH4LPep+Q== X-Received: by 2002:adf:efcb:0:b0:20d:24e:a1ce with SMTP id i11-20020adfefcb000000b0020d024ea1cemr5180848wrp.159.1652648318979; Sun, 15 May 2022 13:58:38 -0700 (PDT) Received: from localhost.localdomain (2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.1.e.e.d.f.d.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:dfde:e1a0::2]) by smtp.gmail.com with ESMTPSA id r17-20020adfbb11000000b0020c5253d920sm8922074wrg.108.2022.05.15.13.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 13:58:38 -0700 (PDT) From: Phillip Potter To: axboe@kernel.dk Cc: linux-block@vger.kernel.org Subject: [PATCH 5/5] cdrom: remove obsolete TODO list Date: Sun, 15 May 2022 21:58:33 +0100 Message-Id: <20220515205833.944139-6-phil@philpotter.co.uk> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220515205833.944139-5-phil@philpotter.co.uk> References: <20220515205833.944139-1-phil@philpotter.co.uk> <20220515205833.944139-2-phil@philpotter.co.uk> <20220515205833.944139-3-phil@philpotter.co.uk> <20220515205833.944139-4-phil@philpotter.co.uk> <20220515205833.944139-5-phil@philpotter.co.uk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The TODO list in drivers/cdrom/cdrom.c has a single entry containing obsolete information, unchanged since the first git commit over 17 years ago, and probably longer. Remove this list from the comment to prevent confusion in future. Signed-off-by: Phillip Potter --- drivers/cdrom/cdrom.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index e43bb071fe92..416f723a2dbb 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -14,15 +14,6 @@ actually talk to the hardware. Suggestions are welcome. Patches that work are more welcome though. ;-) - To Do List: - ---------------------------------- - - -- Modify sysctl/proc interface. I plan on having one directory per - drive, with entries for outputing general drive information, and sysctl - based tunable parameters such as whether the tray should auto-close for - that drive. Suggestions (or patches) for this welcome! - - Revision History ---------------------------------- 1.00 Date Unknown -- David van Leeuwen