> 2022年8月25日 00:03,Jes Sorensen <jes@xxxxxxxxxxxxxxxxxx> 写道: > > On 8/18/22 20:55, Kinga Tanska wrote: >> To unify all containers checks in code, is_container() function is >> added and propagated. >> >> Signed-off-by: Kinga Tanska <kinga.tanska@xxxxxxxxx> >> --- >> Assemble.c | 5 ++--- >> Create.c | 6 +++--- >> Grow.c | 6 +++--- >> Incremental.c | 4 ++-- >> mdadm.h | 14 ++++++++++++++ >> super-ddf.c | 6 +++--- >> super-intel.c | 4 ++-- >> super0.c | 2 +- >> super1.c | 2 +- >> sysfs.c | 2 +- >> 10 files changed, 32 insertions(+), 19 deletions(-) > > This one fails to apply for me from patcheworks. That said, a minor nit > below. > > Mind fixing this and posting an updated version? > > Thanks, > Jes > > >> diff --git a/mdadm.h b/mdadm.h >> index c7268a71..72abfc50 100644 >> --- a/mdadm.h >> +++ b/mdadm.h >> @@ -1885,3 +1885,17 @@ enum r0layout { >> * This is true for native and DDF, IMSM allows 16. >> */ >> #define MD_NAME_MAX 32 >> + >> +/** >> + * is_container() - check if @level is &LEVEL_CONTAINER >> + * @level: level value >> + * >> + * return: >> + * 1 if level is equal to &LEVEL_CONTAINER, 0 otherwise. >> + */ >> +static inline int is_container(const int level) >> +{ >> + if (level == LEVEL_CONTAINER) >> + return 1; >> + return 0; >> +} >> \ No newline at end of file > > Please add the lost newline Hi Jes, This one was fixed in my previous post to you. And it can be found from the mdadm-CI tree (git://git.kernel.org/pub/scm/linux/kernel/git/colyli/mdadm.git) at commit 1065f521f833ebaac1bce934e8dea91fcd8221ae If you want, I can post a v4 version for this patch. Coly Li