From patchwork Fri Feb 17 20:23:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 58770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp53681wrn; Fri, 17 Feb 2023 12:28:56 -0800 (PST) X-Google-Smtp-Source: AK7set9mgQAKMZyQHQ/tKY5D1I2R5g/KgbsND01wtyEyEL6BLaY+/3byRtgXdAVtz+6oe4QH5COF X-Received: by 2002:a17:906:4081:b0:88c:617f:bcf8 with SMTP id u1-20020a170906408100b0088c617fbcf8mr159082ejj.61.1676665736366; Fri, 17 Feb 2023 12:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676665736; cv=none; d=google.com; s=arc-20160816; b=H28huVT11omJejoKyD22aJELdKZ9YiWtdUaiBDP2qbOPbXUGGGppNhJzi9NG7fIFqQ ++9yh50ZGzIzo/bPBP4QXNd7CNa8sl7RXBFTVKOiJVPJbfXLUHhOq6+A814vnwZCbO0p kpphwTHOjdA87rfLurwPbkhqJMOj3z0BY+mdlseaj762JNjSn06xEB6twbIhgGUoCP8o rYgUJF8y7EmzvEESsvx4rX3ApdK1Dg/HIY5sfdAAH3PleH20U4dwxG+NDg73r28mnYWf qFX8OpNlsRHd62Oo1payOs4ivYaBLjtm9WkLGkGkee5wphca2ezZGfeZBmS7Tmzl4oSB ZsJg== 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 :dkim-signature; bh=s8KVm+rH4OiProm3VFkUTkkgWGgDejSqetBx+uMahJ4=; b=PDexV3D9nzO4+SsFUx7AN+OV5e6KxNMzXR8ySQIKyuK8Cekh9FpW/OCuFrFp9cr7bH ZqYXmP00SrLJgEroGOg7pxmJdaV/U1tEma1WZW/oW8wTp+FSbb1cuwfUfaZF0eFvTu03 zsdkxgfqg7yNW3uo+LQc46jESLXrxmHsIkBv0Wpm4J3zijOeX9V51KMLiTTPqr1yR/zo 3WlksAECp+04DZJPgUv0KM2YvZF2hqvZxv1yW/rHsZh9/CGqLfH7dSxMl5rwoJnUHrrv 8uWvQmjSGS/a7qA2SuPm+3K8ldG+gTu1ggmNU0os//Pjr3ZnOEtThFDAzzClTeaEWgoj kdVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dmEp0VQw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a17090610d400b008835feef9a6si8229412ejv.491.2023.02.17.12.28.33; Fri, 17 Feb 2023 12:28:56 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dmEp0VQw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjBQUZN (ORCPT + 99 others); Fri, 17 Feb 2023 15:25:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjBQUZB (ORCPT ); Fri, 17 Feb 2023 15:25:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCA460F83 for ; Fri, 17 Feb 2023 12:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676665420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s8KVm+rH4OiProm3VFkUTkkgWGgDejSqetBx+uMahJ4=; b=dmEp0VQw8Pe4imYBMFoapzPsiGsLfFsDWtXDjRu3kFVvXBnvIWN592Q1SaELE80BKJd/QZ XDj/r+w2WzQ9YHxjuUG8UL9moQsH/zSYMp0b/osEn95m1REAvcujzTJlWgpxWvdYrhKDKW NdjiujSoi6QkIgwIkQSmnOd6fuSz1co= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-533-aZh4fNSdOp27lS4lj24o0A-1; Fri, 17 Feb 2023 15:23:34 -0500 X-MC-Unique: aZh4fNSdOp27lS4lj24o0A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 414092805586; Fri, 17 Feb 2023 20:23:33 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B920C15BA0; Fri, 17 Feb 2023 20:23:28 +0000 (UTC) From: Thomas Huth To: linux-kernel@vger.kernel.org, Arnd Bergmann Cc: linux-arch@vger.kernel.org, Chas Williams <3chas3@gmail.com>, Palmer Dabbelt , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, Andrew Waterman , Albert Ou Subject: [PATCH 4/4] Move USE_WCACHING to drivers/block/pktcdvd.c Date: Fri, 17 Feb 2023 21:23:01 +0100 Message-Id: <20230217202301.436895-5-thuth@redhat.com> In-Reply-To: <20230217202301.436895-1-thuth@redhat.com> References: <20230217202301.436895-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758111451409643527?= X-GMAIL-MSGID: =?utf-8?q?1758111451409643527?= From: Palmer Dabbelt I don't think this was ever intended to be exposed to userspace, but it did require an "#ifdef CONFIG_*". Since the name is kind of generic and was only used in one place, I've moved the definition to the one user. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-11-git-send-email-palmer@dabbelt.com> Signed-off-by: Thomas Huth Reviewed-by: Arnd Bergmann --- drivers/block/pktcdvd.c | 11 +++++++++++ include/uapi/linux/pktcdvd.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 2f1a92509271..1d5ec8d9d1a5 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -90,6 +90,17 @@ do { \ #define MAX_SPEED 0xffff +/* + * use drive write caching -- we need deferred error handling to be + * able to successfully recover with this option (drive will return good + * status as soon as the cdb is validated). + */ +#if defined(CONFIG_CDROM_PKTCDVD_WCACHE) +#define USE_WCACHING 1 +#else +#define USE_WCACHING 0 +#endif + static DEFINE_MUTEX(pktcdvd_mutex); static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; static struct proc_dir_entry *pkt_proc; diff --git a/include/uapi/linux/pktcdvd.h b/include/uapi/linux/pktcdvd.h index 9cbb55d21c94..6a5552dfd6af 100644 --- a/include/uapi/linux/pktcdvd.h +++ b/include/uapi/linux/pktcdvd.h @@ -29,17 +29,6 @@ */ #define PACKET_WAIT_TIME (HZ * 5 / 1000) -/* - * use drive write caching -- we need deferred error handling to be - * able to successfully recover with this option (drive will return good - * status as soon as the cdb is validated). - */ -#if defined(CONFIG_CDROM_PKTCDVD_WCACHE) -#define USE_WCACHING 1 -#else -#define USE_WCACHING 0 -#endif - /* * No user-servicable parts beyond this point -> */