public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] fs/fat: Remove two statements without effect
Date: Mon, 12 Sep 2016 12:43:33 +0200	[thread overview]
Message-ID: <20160912124333.41eb59e8@amdc2363> (raw)
In-Reply-To: <ebd7da8b37cd4c33be0426a3675f3dcf@rwthex-w2-b.rwth-ad.de>

Hi Stefan,

> fatlength is a local variable which is no more used after the
> assignment. s_name is not used in the function, save the strncpy.
> 
> Signed-off-by: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
> ---
>  fs/fat/fat_write.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
> index eb3a916..961ccd8 100644
> --- a/fs/fat/fat_write.c
> +++ b/fs/fat/fat_write.c
> @@ -183,7 +183,6 @@ static __u32 get_fatent_value(fsdata *mydata,
> __u32 entry) if (getsize > fatlength)
>  			getsize = fatlength;
>  
> -		fatlength *= mydata->sect_size;	/* We want it
> in bytes now */ startblock += mydata->fat_sect;	/* Offset from
> start of disk */ 
>  		/* Write back the fatbuf to the disk */
> @@ -326,10 +325,8 @@ fill_dir_slot(fsdata *mydata, dir_entry
> **dentptr, const char *l_name) dir_slot *slotptr = (dir_slot
> *)get_contents_vfatname_block; __u8 counter = 0, checksum;
>  	int idx = 0, ret;
> -	char s_name[16];
>  
> -	/* Get short file name and checksum value */
> -	strncpy(s_name, (*dentptr)->name, 16);
> +	/* Get short file name checksum value */
>  	checksum = mkcksum((*dentptr)->name, (*dentptr)->ext);
>  
>  	do {

Acked-by: Lukasz Majewski <l.majewski@samsung.com>

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

  reply	other threads:[~2016-09-12 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160911205142.4259-1-stefan.bruens@rwth-aachen.de>
2016-09-11 20:51 ` [U-Boot] [PATCH 1/4] fs/fat: Remove two statements without effect Stefan Brüns
2016-09-12 10:43   ` Lukasz Majewski [this message]
2016-09-12 18:48   ` Stephen Warren
2016-09-12 20:15   ` Benoît Thébaudeau
2016-09-23 19:55   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-11 20:51 ` [U-Boot] [PATCH 2/4] fs/fat: Do not write unmodified fat entries to disk Stefan Brüns
2016-09-12 10:56   ` Lukasz Majewski
2016-09-23 19:55   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-11 20:51 ` [U-Boot] [PATCH 3/4] fs/fat: Correct description of determine_fatent function Stefan Brüns
2016-09-12 11:04   ` Lukasz Majewski
2016-09-23 19:55   ` [U-Boot] [U-Boot, " Tom Rini
2016-09-11 20:51 ` [U-Boot] [PATCH 4/4] cmd/fat: Do not crash on write when <bytes> is not specified Stefan Brüns
2016-09-19  0:57   ` Simon Glass
2016-09-23 19:55   ` [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=20160912124333.41eb59e8@amdc2363 \
    --to=l.majewski@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox