fs/fat: remove distractive message in file_fat_read_at()
[platform/kernel/u-boot.git] / fs / fat / fat.c
index 7fe7843..1283818 100644 (file)
@@ -1106,7 +1106,7 @@ int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
        if (ret)
                goto out_free_both;
 
-       printf("reading %s\n", filename);
+       debug("reading %s\n", filename);
        ret = get_contents(&fsdata, itr->dent, pos, buffer, maxsize, actread);
 
 out_free_both:
@@ -1149,11 +1149,13 @@ typedef struct {
 
 int fat_opendir(const char *filename, struct fs_dir_stream **dirsp)
 {
-       fat_dir *dir = calloc(1, sizeof(*dir));
+       fat_dir *dir;
        int ret;
 
+       dir = malloc_cache_aligned(sizeof(*dir));
        if (!dir)
                return -ENOMEM;
+       memset(dir, 0, sizeof(*dir));
 
        ret = fat_itr_root(&dir->itr, &dir->fsdata);
        if (ret)