forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kunit: hide unexported try-catch interface in try-catch-impl.h
Define function as static inline in try-catch-impl.h to allow it to be used in kunit itself and tests. Also remove unused kunit_generic_try_catch Co-developed-by: Knut Omang <[email protected]> Signed-off-by: Knut Omang <[email protected]> Signed-off-by: Alan Maguire <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Tested-by: Brendan Higgins <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
- Loading branch information
1 parent
109fb06
commit 9bbb11c
Showing
5 changed files
with
32 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* Internal kunit try catch implementation to be shared with tests. | ||
* | ||
* Copyright (C) 2019, Google LLC. | ||
* Author: Brendan Higgins <[email protected]> | ||
*/ | ||
|
||
#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, | ||
kunit_try_catch_func_t catch) | ||
{ | ||
try_catch->test = test; | ||
try_catch->try = try; | ||
try_catch->catch = catch; | ||
} | ||
|
||
#endif /* _KUNIT_TRY_CATCH_IMPL_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters