From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 01/23] fs: fat: guard the content of include/fat.h
Date: Wed, 5 Sep 2018 10:54:47 +0900 [thread overview]
Message-ID: <20180905015446.GC18483@linaro.org> (raw)
In-Reply-To: <67cc9114-18bb-6c7e-37c0-f75170ccdd8b@gmx.de>
Hi Heinrich, Alex,
On Tue, Sep 04, 2018 at 12:46:58PM +0200, Heinrich Schuchardt wrote:
>
>
> On 09/04/2018 10:52 AM, Alexander Graf wrote:
> >
> >
> > On 04.09.18 09:49, AKASHI Takahiro wrote:
> >> The whole content of include/fat.h is private to FAT implementation
> >> and then should be guarded with CONFIG_FS_FAT.
>
> Hello Takahiro,
>
> doesn't this imply that building common/spl/spl_sata.c without FAT will
> fail for CONFIG_SPL_SATA_SUPPORT=y (e.g. cm_t54_defconfig with FAT
> disabled).
Yes, you're right, but this is a matter of cm_t54_defconfig.
spl_sta.c uses spl_load_image_fat[_os]() which are implemented
in spl_fat.c which replies on CONFIG_SPL_FAT_SUPPORT, which
will in turn select CONFIG_FS_FAT.
The problem is that cm_t54_defconfig doesn't enable
CONFIG_SPL_FAT_SUPPORT.
To fix this issue, we should add "depends on SPL_FAT_SUPPORT"
to SPL_SATA_SUPPORT (and SPL_USB_SUPPORT) as well.
> Did you run Travis CI on your patch series?
No. Is everybody required to run Travis CI for u-boot
before any submission?
> >>
> >> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >> ---
> >> include/fat.h | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/include/fat.h b/include/fat.h
> >> index 09e142368585..c02839dcb040 100644
> >> --- a/include/fat.h
> >> +++ b/include/fat.h
> >> @@ -9,6 +9,8 @@
> >> #ifndef _FAT_H_
> >> #define _FAT_H_
> >>
> >> +#ifdef CONFIG_FS_FAT
> >
> > Isn't this missing an include of at least common.h to actually propagate
> > the config define?
> >
> > Also, you want to use #if CONFIG_IS_ENABLED(...) here to guard against
> > SPL builds too.
>
> Probably not:
As I'm saying, CONFIG_SPL_FAT_SUPPORT selects CONFIG_FS_FAT
and so either "ifdef CONFIG_FS_FAT" or "if CONFIG_IS_ENABLED(FS_FAT)" will
turn into True although CONFIG_SPL_FS_FAT actually doesn't exist.
Therefore, I don't think we need a change Alex suggested.
Thanks,
-Takahiro AKASHI
> common/spl/spl_fat.c:14:#include <fat.h>
>
> Best regards
>
> Heinrich Schuchardt
>
> >
> > However, I don't fully grasp why you need this patch. Please describe in
> > your commit message what the incentive is for creating it. What errors
> > are you trying to protect against?
> >
> >
> > Alex
> >
> >> +
> >> #include <asm/byteorder.h>
> >> #include <fs.h>
> >>
> >> @@ -202,4 +204,5 @@ int fat_opendir(const char *filename, struct fs_dir_stream **dirsp);
> >> int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp);
> >> void fat_closedir(struct fs_dir_stream *dirs);
> >> void fat_close(void);
> >> +#endif /* CONFIG_FS_FAT */
> >> #endif /* _FAT_H_ */
> >>
> >
next prev parent reply other threads:[~2018-09-05 1:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 7:49 [U-Boot] [PATCH v2 00/23] subject: fs: fat: extend FAT write operations AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 01/23] fs: fat: guard the content of include/fat.h AKASHI Takahiro
2018-09-04 8:52 ` Alexander Graf
2018-09-04 10:46 ` Heinrich Schuchardt
2018-09-05 1:54 ` AKASHI Takahiro [this message]
2018-09-05 5:53 ` Heinrich Schuchardt
2018-09-05 1:14 ` AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 02/23] fs: fat: extend get_fs_info() for write use AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 03/23] fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve() AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 04/23] fs: fat: make directory iterator global for write use AKASHI Takahiro
2018-09-04 9:01 ` Alexander Graf
2018-09-04 10:50 ` Heinrich Schuchardt
2018-09-04 10:57 ` Alexander Graf
2018-09-05 2:14 ` AKASHI Takahiro
2018-09-05 8:16 ` Alexander Graf
2018-09-06 2:29 ` AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 05/23] fs: fat: assure iterator's ->dent belongs to ->clust AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 06/23] Revert "fs: fat: cannot write to subdirectories" AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 07/23] fs: fat: check and normailze file name AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 08/23] fs: fat: write returns error code instead of -1 AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 09/23] fs: fat: support write with sub-directory path AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 10/23] fs: fat: refactor write interface for a file offset AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 11/23] fs: fat: support write with non-zero offset AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 12/23] cmd: fat: add offset parameter to fatwrite AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 13/23] fs: add mkdir interface AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 14/23] fs: fat: remember the starting cluster number of directory AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 15/23] fs: fat: support mkdir AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 16/23] cmd: fat: add fatmkdir command AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 17/23] efi_loader: file: support creating a directory AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 18/23] efi_loader: implement a pseudo "file delete" AKASHI Takahiro
2018-09-04 9:16 ` Alexander Graf
2018-09-05 2:51 ` AKASHI Takahiro
2018-09-05 8:22 ` Alexander Graf
2018-09-06 2:43 ` AKASHI Takahiro
2018-09-06 6:09 ` Alexander Graf
2018-09-04 7:49 ` [U-Boot] [PATCH v2 19/23] fs-test: fix false positive error at Test Case 12 AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 20/23] fs-test: update the test result as of v2018.09 AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 21/23] test/py: convert fs-test.sh to pytest AKASHI Takahiro
2018-09-14 10:54 ` Simon Glass
2018-09-25 4:47 ` AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 22/23] test/py: fs: add extended write operation test AKASHI Takahiro
2018-09-04 7:49 ` [U-Boot] [PATCH v2 23/23] test/py: fs: add fstest/mkdir test AKASHI Takahiro
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=20180905015446.GC18483@linaro.org \
--to=takahiro.akashi@linaro.org \
--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.