[PATCH 1/1] fs: fat: usage basename in file_fat_write_at, fat_mkdir

Simon Glass sjg at chromium.org
Mon Feb 1 21:44:16 CET 2021


On Sat, 30 Jan 2021 at 02:22, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> This patch involves no functional change. It is just about code
> readability.
>
> Both in file_fat_write_at() and fat_mkdir() the incoming file or directory
> path are split into two parts: the parent directory and the base name.
>
> In file_fat_write_at() the value of the variable basename is assigned to
> the filename parameter and afterwards the variable filename is used instead
> of basename. It is more readable to use the variable basename and leave
> filename unchanged.
>
> In fat_mkdir() the base name variable is called directory. This is
> confusing. Call it basename like in file_fat_write_at(). This allows to
> rename parameter new_directory to directory in the implementation of
> fat_mkdir() to match the function declaration.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  fs/fat/fat_write.c | 27 +++++++++++++--------------
>  1 file changed, 13 insertions(+), 14 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list