public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type
Date: Fri, 6 Jan 2017 08:54:06 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B876712@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1483692650-33668-1-git-send-email-hao.a.wu@intel.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

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 <hao.a.wu@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
>Subject: [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned 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 <ruiyu.ni@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Hao Wu <hao.a.wu@intel.com>
>---
> 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.<BR>
>+Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials are licensed and made available
> 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, EITHER 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.<BR>
>+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
>
> This program and the accompanying materials are licensed and made available
> under the terms and conditions of the BSD License which accompanies this
>@@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 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



      reply	other threads:[~2017-01-06  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06  8:50 [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type Hao Wu
2017-01-06  8:54 ` Ni, Ruiyu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=734D49CCEBEEF84792F5B80ED585239D5B876712@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox