Re: [PATCH v4 linux-kselftest-test 2/6] kunit: hide unexported try-catch interface in try-catch-impl.h

From: Stephen Boyd
Date: Sat Nov 16 2019 - 20:36:09 EST


Quoting Alan Maguire (2019-11-15 02:16:08)
> diff --git a/lib/kunit/try-catch-impl.h b/lib/kunit/try-catch-impl.h
> new file mode 100644
> index 0000000..e308d5c
> --- /dev/null
> +++ b/lib/kunit/try-catch-impl.h
> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * An API to allow a function, that may fail, to be executed, and recover in a

This file is not an API. Maybe just say "Internal kunit try catch
implementation details to be shared with tests".

> + * controlled manner.
> + *
> + * Copyright (C) 2019, Google LLC.
> + * Author: Brendan Higgins <brendanhiggins@xxxxxxxxxx>
> + */
> +
> +#ifndef _KUNIT_TRY_CATCH_IMPL_H
> +#define _KUNIT_TRY_CATCH_IMPL_H
> +
> +#include <kunit/try-catch.h>
> +#include <linux/types.h>
> +
> +struct kunit;
> +
> +static inline void kunit_try_catch_init(struct kunit_try_catch *try_catch,
> + struct kunit *test,
> + kunit_try_catch_func_t try,