All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] FAT: make FAT compile without VFAT
Date: Tue, 04 Dec 2012 17:16:12 +0100	[thread overview]
Message-ID: <50BE21CC.4030603@denx.de> (raw)
In-Reply-To: <1354626246-9613-1-git-send-email-richard.genoud@gmail.com>

On 04/12/2012 14:04, Richard Genoud wrote:
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> ---
>  fs/fat/fat.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/fat/fat.c b/fs/fat/fat.c
> index 393c378..defdd74 100644
> --- a/fs/fat/fat.c
> +++ b/fs/fat/fat.c
> @@ -589,7 +589,9 @@ static dir_entry *get_dentfromdir(fsdata *mydata, int startsect,
>  				  char *filename, dir_entry *retdent,
>  				  int dols)
>  {
> +#ifdef CONFIG_SUPPORT_VFAT
>  	__u16 prevcksum = 0xffff;
> +#endif

You can declare the variable __maybe_unused without adding the #ifdef

>  	__u32 curclust = START(retdent);
>  	int files = 0, dirs = 0;
>  
> @@ -828,7 +830,9 @@ do_fat_read_at(const char *filename, unsigned long pos, void *buffer,
>  	fsdata datablock;
>  	fsdata *mydata = &datablock;
>  	dir_entry *dentptr = NULL;
> +#ifdef CONFIG_SUPPORT_VFAT
>  	__u16 prevcksum = 0xffff;
> +#endif

Ditto

> +#ifdef CONFIG_SUPPORT_VFAT
>  			csum = mkcksum(dentptr->name, dentptr->ext);
> +#endif

I think this is the only place where #ifdef is necessary

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  parent reply	other threads:[~2012-12-04 16:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 13:04 [U-Boot] [PATCH] FAT: make FAT compile without VFAT Richard Genoud
2012-12-04 14:24 ` Marek Vasut
2012-12-04 15:32   ` Richard Genoud
2012-12-04 16:16 ` Stefano Babic [this message]
2012-12-13 10:47   ` [U-Boot] [PATCH 0/2] clean some FAT code Richard Genoud
2012-12-13 12:45     ` Marek Vasut
2012-12-13 12:57       ` Richard Genoud
2012-12-13 10:47   ` [U-Boot] [PATCH 1/2] FAT: remove ifdefs to make the code more readable Richard Genoud
2012-12-13 12:46     ` Marek Vasut
2012-12-13 13:00       ` Richard Genoud
2012-12-13 13:12         ` Marek Vasut
2012-12-13 13:16           ` Richard Genoud
2012-12-13 13:19             ` Marek Vasut
2012-12-13 13:30               ` [U-Boot] [PATCHv2] " Richard Genoud
2013-02-04 16:42                 ` [U-Boot] [U-Boot, PATCHv2] " Tom Rini
2012-12-13 13:09     ` [U-Boot] [PATCH 1/2] " Tom Rini
2012-12-13 13:15       ` Richard Genoud
2012-12-13 13:51       ` Marek Vasut
2012-12-13 14:24         ` Richard Genoud
2012-12-13 14:41           ` Tom Rini
2012-12-13 10:47   ` [U-Boot] [PATCH 2/2] FAT: use toupper/tolower instead of recoding them Richard Genoud
2012-12-13 12:47     ` Marek Vasut
2012-12-14  8:56     ` Stefano Babic
2013-02-04 16:41     ` [U-Boot] [U-Boot, " Tom Rini

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-all 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=50BE21CC.4030603@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.