From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D0A79817E2 for ; Fri, 6 Jan 2017 00:54:10 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 06 Jan 2017 00:54:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,323,1477983600"; d="scan'208";a="919546671" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 06 Jan 2017 00:54:10 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 6 Jan 2017 00:54:10 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 6 Jan 2017 00:54:09 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Fri, 6 Jan 2017 16:54:07 +0800 From: "Ni, Ruiyu" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type Thread-Index: AQHSZ/n9wYdwtzWxlEOMB5Pks9PSe6ErJNZw Date: Fri, 6 Jan 2017 08:54:06 +0000 Deferred-Delivery: Fri, 6 Jan 2017 08:54:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B876712@SHSMSX104.ccr.corp.intel.com> References: <1483692650-33668-1-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1483692650-33668-1-git-send-email-hao.a.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWQ1Y2Y1MDItMDBiMi00NmM0LWEwMWQtZWExYjFmZDY1NWQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiIwVG1HaGxSeWRaQTVmeWhKR056eXlJQUZSeGJpcmFndGV3blhxKzJ5Mmp3PSJ9 x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 08:54:10 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Regards, Ray >-----Original Message----- >From: Wu, Hao A >Sent: Friday, January 6, 2017 4:51 PM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Ni, Ruiyu >Subject: [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigne= d type > >In FatPkg, cluster-related varibles are declared as unsigned type (e.g. >UINT32/UINTN). To keep the comparisions involving those variables >type-matched, declare the definition FAT_CLUSTER_SPECIAL as unsigned type >explicitly. > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Hao Wu >--- > FatPkg/EnhancedFatDxe/FatFileSystem.h | 4 ++-- > FatPkg/FatPei/FatLiteFmt.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/FatPkg/EnhancedFatDxe/FatFileSystem.h b/FatPkg/EnhancedFatDxe= /FatFileSystem.h >index a4d4405..80cb802 100644 >--- a/FatPkg/EnhancedFatDxe/FatFileSystem.h >+++ b/FatPkg/EnhancedFatDxe/FatFileSystem.h >@@ -1,7 +1,7 @@ > /** @file > Definitions for on-disk FAT structures. > >-Copyright (c) 2005, Intel Corporation. All rights reserved.
>+Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
> This program and the accompanying materials are licensed and made availab= le > under the terms and conditions of the BSD License which accompanies this > distribution. The full text of the license may be found at >@@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHE= R EXPRESS OR IMPLIED. > // > // FAT entry values > // >-#define FAT_CLUSTER_SPECIAL_EXT (-1 & (~0xF)) >+#define FAT_CLUSTER_SPECIAL_EXT (MAX_UINTN & (~0xF)) > #define FAT_CLUSTER_SPECIAL ((FAT_CLUSTER_SPECIAL_EXT) | 0x07) > #define FAT_CLUSTER_FREE 0 > #define FAT_CLUSTER_RESERVED (FAT_CLUSTER_SPECIAL) >diff --git a/FatPkg/FatPei/FatLiteFmt.h b/FatPkg/FatPei/FatLiteFmt.h >index d4f26f3..9872200 100644 >--- a/FatPkg/FatPei/FatLiteFmt.h >+++ b/FatPkg/FatPei/FatLiteFmt.h >@@ -1,7 +1,7 @@ > /** @file > FAT format data structures > >-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
>+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> > This program and the accompanying materials are licensed and made availab= le > under the terms and conditions of the BSD License which accompanies this >@@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHE= R EXPRESS OR IMPLIED. > #define FAT_ATTR_ARCHIVE 0x20 > #define FAT_ATTR_LFN (FAT_ATTR_READ_ONLY | FAT_ATTR_= HIDDEN | FAT_ATTR_SYSTEM | >FAT_ATTR_VOLUME_ID) > >-#define FAT_CLUSTER_SPECIAL ((-1 &~0xF) | 0x7) >+#define FAT_CLUSTER_SPECIAL ((MAX_UINT32 &~0xF) | 0x7) > #define FAT_CLUSTER_FREE 0 > #define FAT_CLUSTER_RESERVED (FAT_CLUSTER_SPECIAL) > #define FAT_CLUSTER_BAD (FAT_CLUSTER_SPECIAL) >-- >1.9.5.msysgit.0