Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3389470ybx; Sun, 3 Nov 2019 17:47:18 -0800 (PST) X-Google-Smtp-Source: APXvYqz4WRZYl0psrUkoYCk8nDnRPNGcYDB6tdvl8Jd55fVt7WbqTSZXfrGaC9h5oVtFxBN2VnYu X-Received: by 2002:a17:907:426e:: with SMTP id nx22mr13909152ejb.139.1572832038051; Sun, 03 Nov 2019 17:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572832038; cv=none; d=google.com; s=arc-20160816; b=1GTXau+ZByzimWiM9YnjF6jEHz6amMhqF/ZKVvKSGR4/8CR4TAeMmGT6BY+mDtrbnK 5l3nFFBuPOS2SX3xqrJG5AgCMyz+fDE+oPsXHjAlSYOhPxtE9+H5VIndrcFltf9JtJVv Xr/N63rKuTuS8AySS3X3Y6RrdqiVVKd0hDeS0LJr4v8apDcWwy1LAsXOVU3389UoRXal vK78NzmdvdebmDYyzj4L8hnJgjOnZKUDTFJAUiOlcGwvWwjxP/UpqI9qiGNFRyErP+PA 1a11jtd041J/jgMehzacV/tKP2Zn1w/tVMUuDxDvTKenXQkk4Z+9EJyojwuQcI4D0eHB MvwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=v4VlzHRnLSC3b1EjzBkiWjmC1bP42YDPnuAdgZvBprM=; b=Ft3b0CZnRHDCQHtrVn0AMcYufiniBzwz/AgIJa5xw/5oBjiggaEVHKG6z4RVc/Fxcy 0IZ5iVu0ZciOwp9DrDP+ZbBoTs80++sML/uPP+9e2Jb89J9/MQA85BivxjPLNx/CCQXm Y0fQ/jCnsyVEr2CbLtg8bjPQOZ2xScILqAh3kahB3nT1OZFjjcOQDubXyY26mxDfLBn+ HLgDWv2WWXX57BTo0CU25gZySym7lLQxB+tgRhHnxO/p9GCde+7JwNBW7k+w+AMMjmlm cBYXUpmSzaS+IMJUYjaUBHddcaoSamgVn4nDr4O6ha+F/JacPnuE5KXxkaLK8SCnt8u8 SUpg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si6576093ede.121.2019.11.03.17.46.55; Sun, 03 Nov 2019 17:47:18 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vt.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728910AbfKDBqH (ORCPT + 99 others); Sun, 3 Nov 2019 20:46:07 -0500 Received: from outbound.smtp.vt.edu ([198.82.183.121]:35566 "EHLO omr2.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728877AbfKDBqG (ORCPT ); Sun, 3 Nov 2019 20:46:06 -0500 Received: from mr4.cc.vt.edu (mr4.cc.ipv6.vt.edu [IPv6:2607:b400:92:8300:0:7b:e2b1:6a29]) by omr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id xA41k5Hr009911 for ; Sun, 3 Nov 2019 20:46:05 -0500 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mr4.cc.vt.edu (8.14.7/8.14.7) with ESMTP id xA41k0Xt026062 for ; Sun, 3 Nov 2019 20:46:05 -0500 Received: by mail-qt1-f199.google.com with SMTP id k9so17423721qtg.2 for ; Sun, 03 Nov 2019 17:46:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=v4VlzHRnLSC3b1EjzBkiWjmC1bP42YDPnuAdgZvBprM=; b=LJasfQ/ElOwriHLsNArRUeyBXiBPCymiR9qkzi9sc5LVTu+vB2x4go8xzV2P3Xda/7 2X+atW8dWfwN+QkgKG9PTtTaFBkvRr9ukMJx+TgutYHjDYpkF7O74Gk7piGAVO3Fr/hD TBmdcrVaWzCnevI3nT1uxwzAC+PiKayWjogFjolUjCjvvdtnpz+WFvumtjSTCu2bFg2O bvf/6xmeRyE1ZQpI3l56an0KImAdQLONxJZGf39rLC7JzuDMFI1mObzF3ACOv3Mo9i7B IggARBq9eOy7FUpN6UeEdTDpHy6bM+E+zr7mBk1fE2Kp+KEN7PJnaXfADzn/1TdXH7n9 ACMA== X-Gm-Message-State: APjAAAWd76WvuVlNFwKe9LtsQJa4nJYgx6TodJsn0Vi0gROMxLvI6Usf vJ0exxARZuDocyupnEp3Uj7Pjjb0YKh+1WZz7aUfNXraf/rijkfQPvoaThhpgA2bkIXo8qXnkVC bsceRSoXfmHw0OBvfU3qVxFG/QuVFSRaCZNY= X-Received: by 2002:ad4:5429:: with SMTP id g9mr20440308qvt.27.1572831959968; Sun, 03 Nov 2019 17:45:59 -0800 (PST) X-Received: by 2002:ad4:5429:: with SMTP id g9mr20440300qvt.27.1572831959712; Sun, 03 Nov 2019 17:45:59 -0800 (PST) Received: from turing-police.lan ([2601:5c0:c001:c9e1::359]) by smtp.gmail.com with ESMTPSA id d2sm8195354qkg.77.2019.11.03.17.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2019 17:45:58 -0800 (PST) From: Valdis Kletnieks X-Google-Original-From: Valdis Kletnieks To: Valdis Kletnieks Cc: Valdis Kletnieks , Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 03/10] staging: exfat: Clean up return codes - FFS_EOF Date: Sun, 3 Nov 2019 20:44:59 -0500 Message-Id: <20191104014510.102356-4-Valdis.Kletnieks@vt.edu> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191104014510.102356-1-Valdis.Kletnieks@vt.edu> References: <20191104014510.102356-1-Valdis.Kletnieks@vt.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert FFS_EOF to return 0 for a zero-length read() as per 'man 2 read'. Signed-off-by: Valdis Kletnieks --- drivers/staging/exfat/exfat.h | 1 - drivers/staging/exfat/exfat_super.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h index 286605262345..292af85e3cd2 100644 --- a/drivers/staging/exfat/exfat.h +++ b/drivers/staging/exfat/exfat.h @@ -217,7 +217,6 @@ static inline u16 get_row_index(u16 i) #define FFS_INVALIDFID 8 #define FFS_NOTOPENED 12 #define FFS_MAXOPENED 13 -#define FFS_EOF 15 #define FFS_ERROR 19 #define NUM_UPCASE 2918 diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index d6d5f0fd47fd..7c99d1f8cba8 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -723,7 +723,7 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer, if (count == 0) { if (rcount) *rcount = 0; - ret = FFS_EOF; + ret = 0; goto out; } -- 2.24.0.rc1