Received: by 10.213.65.68 with SMTP id h4csp1079532imn; Sat, 31 Mar 2018 18:44:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+RgNzm/SU0fFhQpwGbhSbxJk1uHdmJkw1EDA7ZWfOosvFho4qOy25SfwmnYRFZ3Oxxr4de X-Received: by 2002:a17:902:8f8b:: with SMTP id z11-v6mr4869086plo.316.1522547088387; Sat, 31 Mar 2018 18:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522547088; cv=none; d=google.com; s=arc-20160816; b=JaNt0GQUYg29gVIm4612SGodXy4V752IDadRkISlMtAqa6DajW4G1X8uqX5sWkDvbV MpvX8IyO3qp+/hgfXCbMYEl35dyjrk+vaM7ot8Zgs/MfY0uuT/2n/v9u9Js/woaZlRuc qrVASTKgRZkmYMggtgRNLrUZCGcwebbuX44EHWYlhl4T/TuuoJVeY5uvls+wuqwByuF9 910G9w/eF+/S03pYDRIQQHAmk4yw6e0j+J4JrlLRk0RCpKggFrRNMJLzz3h37RovtfI4 UO1S5hDAdDdivRBGdqjveOpsSTjf1cOzfIv624lihMhZdL6ZsQ1DClIFvRkMN/lkDrYO ntVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to:arc-authentication-results; bh=XD0ISx7NGYzxAjSmyLwVuq51kyBew2TWK16tCMh+Rqc=; b=G9niwBlMtfxjkzNZTovWye5M9EO2kJu84TwKjtLP8Y6HcgPXWznrzDTJQaigFUjufS H/xAFbbe3kT7rF065Izh/hQV9OBXoagWQoJ9OHDsf56/kZMyVPX0LYNWMftD0Z3UAsBW Tvmn81X7DLCfHmHF9Q/3ioPoAs/AIeNPHoLzHm4vvQLHwUNlMpaiVB+3tEHerg/rbOdm 0ToZJrc6FUx8r8QPhPo3/w+1ogNPdNTglNr7N6dd/zHGwgmSOIKnjlsfk4kSKEEOyD// ycHaQaFjwkyACLT8L0OkM2xFUmBVomuI8xLx/mMnHPtaS2cr9P7UwQ+eUjowSMKnM8H0 dY5A== 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 n7si6727541pgv.75.2018.03.31.18.44.35; Sat, 31 Mar 2018 18:44:48 -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 S1753404AbeDABmK (ORCPT + 99 others); Sat, 31 Mar 2018 21:42:10 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:47382 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753064AbeDABlI (ORCPT ); Sat, 31 Mar 2018 21:41:08 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 418F622925; Sat, 31 Mar 2018 21:41:05 -0400 (EDT) To: Geert Uytterhoeven Cc: Laurent Vivier , Jens Axboe , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Message-Id: <803fabab1f0349bafe52b5589eff3edc077eee2d.1522546571.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH 08/12] block/swim: Don't log an error message for an invalid ioctl Date: Sat, 31 Mar 2018 21:41:05 -0400 (EDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/block/swim.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 19d7d27468c7..8be0d92bc431 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -739,14 +739,9 @@ static int floppy_ioctl(struct block_device *bdev, fmode_t mode, 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) -- 2.16.1