diff mbox

[U-Boot,3/4] fs/fat: Correct description of determine_fatent function

Message ID 4be1a696305f4df097068cbe965d7ae4@rwthex-w2-b.rwth-ad.de
State Accepted
Commit ae1755be37e3d51af631ff2df12189c9fdc3e1d7
Delegated to: Tom Rini
Headers show

Commit Message

Stefan Brüns Sept. 11, 2016, 8:51 p.m. UTC
Current description does not match the function behaviour.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
---
 fs/fat/fat_write.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Łukasz Majewski Sept. 12, 2016, 11:04 a.m. UTC | #1
Hi Stefan,

> Current description does not match the function behaviour.
> 
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> ---
>  fs/fat/fat_write.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
> index babe9c8..0583af3 100644
> --- a/fs/fat/fat_write.c
> +++ b/fs/fat/fat_write.c
> @@ -528,7 +528,8 @@ static int set_fatent_value(fsdata *mydata, __u32
> entry, __u32 entry_value) }
>  
>  /*
> - * Determine the entry value at index 'entry' in a FAT (16/32) table
> + * Determine the next free cluster after 'entry' in a FAT (16/32)
> table
> + * and link it to 'entry'. EOC marker is not set on returned entry.
>   */
>  static __u32 determine_fatent(fsdata *mydata, __u32 entry)
>  {
> @@ -537,6 +538,7 @@ static __u32 determine_fatent(fsdata *mydata,
> __u32 entry) while (1) {
>  		next_fat = get_fatent_value(mydata, next_entry);
>  		if (next_fat == 0) {
> +			/* found free entry, link to entry */
>  			set_fatent_value(mydata, entry, next_entry);
>  			break;
>  		}

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tom Rini Sept. 23, 2016, 7:55 p.m. UTC | #2
On Sun, Sep 11, 2016 at 10:51:41PM +0200, Stefan Brüns wrote:

> Current description does not match the function behaviour.
> 
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index babe9c8..0583af3 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -528,7 +528,8 @@  static int set_fatent_value(fsdata *mydata, __u32 entry, __u32 entry_value)
 }
 
 /*
- * Determine the entry value at index 'entry' in a FAT (16/32) table
+ * Determine the next free cluster after 'entry' in a FAT (16/32) table
+ * and link it to 'entry'. EOC marker is not set on returned entry.
  */
 static __u32 determine_fatent(fsdata *mydata, __u32 entry)
 {
@@ -537,6 +538,7 @@  static __u32 determine_fatent(fsdata *mydata, __u32 entry)
 	while (1) {
 		next_fat = get_fatent_value(mydata, next_entry);
 		if (next_fat == 0) {
+			/* found free entry, link to entry */
 			set_fatent_value(mydata, entry, next_entry);
 			break;
 		}