Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1024759ybx; Tue, 5 Nov 2019 09:06:33 -0800 (PST) X-Google-Smtp-Source: APXvYqzisGLs29A6QPL+Ees13eA4QUk410KiC10mpHjSIhiUw169w1rYY9NLk9zeoocHC1j5EUC5 X-Received: by 2002:a1c:544b:: with SMTP id p11mr47419wmi.46.1572973593655; Tue, 05 Nov 2019 09:06:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572973593; cv=none; d=google.com; s=arc-20160816; b=QUlxmFBx8rQkNULEH5+Am5falLZPVcwCqtHLbsrtSXNpr86jBnaPHJuJ8NPBgXkOCO +Z9Bweouz26Vt9aWuhWOWoMrrM7jzsvnBrwBB79MoRfZ7gjgnI+EfQEnRxEwvJrGwoN5 1ZRoHD7kB3ahxGMdb4AL7QNaPCDE97Iug0Z4rGl71Ue6ZWoDYYxf67wWgHMC9TTlj9B8 MT06d136ogUbvQCVaem30PsRnvy3XiKpJDQxSzSjQ3dbROHqIwAt6fC1hG7KpzPe28Nb +ny+mDYfQWPhBjivGVv4qcILZM71gVCCj45O0RScxLBNUUxu+FP0dBW+CMPLaXQn0ejA 19RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XnUxuotJFd9eQ0b+PiiQK37pT7mAhfEfOi5SH4CSETg=; b=lvTVCM+UE6KngWTHs6ZdaeDP5oR5Mep3Vh7TADMpToFjnJlvID63GwS7KYrsK5Gc1g zOZ94nTHqc1BertbXVdhTnkIgXVOB67QceTcPl/wZI59nc9zs/XWak9TLAU0xpxdnTxK XN26WOX5KUQDymkwZEegMjVh/W742slNP7sgOHtaV5AJ1JeMXopeBVK37R/BBPkX/zXD OXDAaFe0ebSgNL5iHIi5jHCxQiqjteXqAmMRqefQ6LekE2pedc8OHIDslKHzhb94VEg+ jX3igrx15o1mLarDc1JPahykq/46oNc4SFZiJvgiFnpVeCsPR/sehOSO/vunXvKhky2S ykDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HeBSfHog; 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 l64si11472583edl.306.2019.11.05.09.06.10; Tue, 05 Nov 2019 09:06:33 -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; dkim=pass header.i=@kernel.org header.s=default header.b=HeBSfHog; 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 S2390181AbfKERFW (ORCPT + 99 others); Tue, 5 Nov 2019 12:05:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:43254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388958AbfKERFV (ORCPT ); Tue, 5 Nov 2019 12:05:21 -0500 Received: from localhost (unknown [62.119.166.9]) (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 46DDE2087E; Tue, 5 Nov 2019 17:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572973520; bh=jTO8reKcT4C5kCnNyyvTf8GTELx7dazG4WitwpYdsJE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HeBSfHogBHebaNjOYUBn6YSGujIWYFpHH6SK1/G8DvZ0qXliA7nwXkgqvwd+LvWrl C4JGrsF4eNG0U2wVB0iEpgseqXIB4ewsamhCfis3ZYbB1m43kZXPCZE3zpJ5qUOi0b 2vLj3xuNAgfGmmG9t3FtgOqvC+uzwLvY5Oa09w4Y= Date: Tue, 5 Nov 2019 18:05:15 +0100 From: Greg Kroah-Hartman To: Valdis Kletnieks Cc: linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 01/10] staging: exfat: Clean up return codes - FFS_FORMATERR Message-ID: <20191105170515.GA2788121@kroah.com> References: <20191104014510.102356-1-Valdis.Kletnieks@vt.edu> <20191104014510.102356-2-Valdis.Kletnieks@vt.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191104014510.102356-2-Valdis.Kletnieks@vt.edu> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 03, 2019 at 08:44:57PM -0500, Valdis Kletnieks wrote: > Convert FFS_FORMATERR to -EFSCORRUPTED > > Signed-off-by: Valdis Kletnieks > --- > drivers/staging/exfat/exfat.h | 3 ++- > drivers/staging/exfat/exfat_core.c | 8 ++++---- > 2 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h > index acb73f47a253..4f9ba235d967 100644 > --- a/drivers/staging/exfat/exfat.h > +++ b/drivers/staging/exfat/exfat.h > @@ -30,6 +30,8 @@ > #undef DEBUG > #endif > > +#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ > + > #define DENTRY_SIZE 32 /* dir entry size */ > #define DENTRY_SIZE_BITS 5 > > @@ -209,7 +211,6 @@ static inline u16 get_row_index(u16 i) > /* return values */ > #define FFS_SUCCESS 0 > #define FFS_MEDIAERR 1 > -#define FFS_FORMATERR 2 > #define FFS_MOUNTED 3 > #define FFS_NOTMOUNTED 4 > #define FFS_ALIGNMENTERR 5 > diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c > index b23fbf3ebaa5..e90b54a17150 100644 > --- a/drivers/staging/exfat/exfat_core.c > +++ b/drivers/staging/exfat/exfat_core.c > @@ -573,7 +573,7 @@ s32 load_alloc_bitmap(struct super_block *sb) > return FFS_MEDIAERR; > } > > - return FFS_FORMATERR; > + return -EFSCORRUPTED; > } > > void free_alloc_bitmap(struct super_block *sb) > @@ -3016,7 +3016,7 @@ s32 fat16_mount(struct super_block *sb, struct pbr_sector_t *p_pbr) > struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info); > > if (p_bpb->num_fats == 0) > - return FFS_FORMATERR; > + return -EFSCORRUPTED; > > num_root_sectors = GET16(p_bpb->num_root_entries) << DENTRY_SIZE_BITS; > num_root_sectors = ((num_root_sectors - 1) >> > @@ -3078,7 +3078,7 @@ s32 fat32_mount(struct super_block *sb, struct pbr_sector_t *p_pbr) > struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info); > > if (p_bpb->num_fats == 0) > - return FFS_FORMATERR; > + return -EFSCORRUPTED; > > p_fs->sectors_per_clu = p_bpb->sectors_per_clu; > p_fs->sectors_per_clu_bits = ilog2(p_bpb->sectors_per_clu); > @@ -3157,7 +3157,7 @@ s32 exfat_mount(struct super_block *sb, struct pbr_sector_t *p_pbr) > struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info); > > if (p_bpb->num_fats == 0) > - return FFS_FORMATERR; > + return -EFSCORRUPTED; > > p_fs->sectors_per_clu = 1 << p_bpb->sectors_per_clu_bits; > p_fs->sectors_per_clu_bits = p_bpb->sectors_per_clu_bits; This patch breaks the build: drivers/staging/exfat/exfat_super.c: In function ‘ffsMountVol’: drivers/staging/exfat/exfat_super.c:387:9: error: ‘FFS_FORMATERR’ undeclared (first use in this function) 387 | ret = FFS_FORMATERR; | ^~~~~~~~~~~~~ Did you test-build this thing? thanks, greg k-h