Received: by 10.192.165.148 with SMTP id m20csp799842imm; Fri, 27 Apr 2018 07:43:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoyucnJ2GqlxvlTExUbRbv2QG/3snr5tUJEVakcH56JMzTCAOUPqjn4wjAb79PFrcrVCMtw X-Received: by 2002:a63:6887:: with SMTP id d129-v6mr2442942pgc.128.1524840195629; Fri, 27 Apr 2018 07:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524840195; cv=none; d=google.com; s=arc-20160816; b=rFzSuaA4qqVEgxkk8kVL+4DmZ8HrFO7beNApyb5cNG1t1DRVc6cAzKX/y4baYxqrKJ c3fbvxf5cF6963xJQAxzmUweqc0bv8xo/ORICJcahpRbobNqeAEEqsAxJlL1xYSzelCn ftuk3p/0UyKdY9ac76iUO0nDTsjZuU2WckzprdSk0mVZ9AWZodD8EIPPuZXMPQX/NMYY TfLptLAbC2wpFp9GlT/1BolGY4/jmcSppH8ZQDWzABauBWAbM76VjDmh2xXVsmOLSYC9 hVhnIC9oFU6S0OOTaduDQ8uwzwyZc9U777GCwcgrTckJtMxiEqTlI6sZATbsD0sQqzwy BkfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=fO1TumWz13SRbQ1jQI6eaPuSAaJ44WohMm03gXiAhfc=; b=EH6CmZuzGEYZS5/sBQStlz6nSIkHXZ3D6QTGMosQW0FEj2M3Xfap5FiDTQlcUs3otg SKm0EJpMBlCs3IjaC73Kbap2sLABrLS+n85KohGQRnDtPi0FBUf9A3+m8xmGvgWRsOuI BtODvIX09lzb88tkxmkAcmG0qw9Id4gchV2K7m6Vy0y9QqjlfzNrwaVIBES24wVlPsvY DdH/MJvF5pZD/Ehoc7Ov+Qve7z8j3j8/yl5IdezLRIDh2iz/ygtSuL1eOujsjeBRJGt1 a43n3hwyAce8LyU/cWkb/SdtrAXqacMD6Xgw0q/k4Jjx2l+j8RfKRGZ1JDBQriW52+5a +X7Q== 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 d14si1364524pfl.122.2018.04.27.07.43.01; Fri, 27 Apr 2018 07:43:15 -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 S934259AbeD0OIy (ORCPT + 99 others); Fri, 27 Apr 2018 10:08:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:54314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934230AbeD0OIr (ORCPT ); Fri, 27 Apr 2018 10:08:47 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 917F321864; Fri, 27 Apr 2018 14:08:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 917F321864 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Vivier , Jens Axboe , Stan Johnson , Finn Thain , Geert Uytterhoeven Subject: [PATCH 4.14 70/80] block/swim: Dont log an error message for an invalid ioctl Date: Fri, 27 Apr 2018 15:59:03 +0200 Message-Id: <20180427135736.527909791@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135732.928644313@linuxfoundation.org> References: <20180427135732.928644313@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Finn Thain commit 8e2ab5a4efaac77fb93e5b5b109d0b3976fdd3a0 upstream. The 'eject' shell command may send various different ioctl commands. This leads to error messages on the console even though the FDEJECT ioctl succeeds. ~# eject floppy SWIM floppy_ioctl: unknown cmd 21257 SWIM floppy_ioctl: unknown cmd 1 Don't log an error message for an invalid ioctl, just do as the swim3 driver does and return -ENOTTY. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Reviewed-by: Geert Uytterhoeven Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/block/swim.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -727,14 +727,9 @@ static int floppy_ioctl(struct block_dev if (copy_to_user((void __user *) param, (void *) &floppy_type, sizeof(struct floppy_struct))) return -EFAULT; - break; - - default: - printk(KERN_DEBUG "SWIM floppy_ioctl: unknown cmd %d\n", - cmd); - return -ENOSYS; + return 0; } - return 0; + return -ENOTTY; } static int floppy_getgeo(struct block_device *bdev, struct hd_geometry *geo)