Re: [PATCH v3 2/2] mdadm: replace container level checking with inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux