All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [RFC PATCH] kunit: mock: one_param can be static
Date: Sat, 19 Sep 2020 06:46:14 +0800	[thread overview]
Message-ID: <20200918224614.GA59321@c23844b1b050> (raw)
In-Reply-To: <20200918183114.2571146-11-dlatypov@google.com>

[-- Attachment #1: Type: text/plain, Size: 2260 bytes --]


Signed-off-by: kernel test robot <lkp@intel.com>
---
 mock-macro-test.c |   10 +++++-----
 mock-test.c       |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/kunit/mock-macro-test.c b/lib/kunit/mock-macro-test.c
index d196dbee2407e7..6ed10383db1c6d 100644
--- a/lib/kunit/mock-macro-test.c
+++ b/lib/kunit/mock-macro-test.c
@@ -21,20 +21,20 @@ struct mock_macro_dummy_struct {
 
 DECLARE_STRUCT_CLASS_MOCK_PREREQS(mock_macro_dummy_struct);
 
-DEFINE_STRUCT_CLASS_MOCK(METHOD(one_param), CLASS(mock_macro_dummy_struct),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(one_param), CLASS(mock_macro_dummy_struct),
 			 RETURNS(int),
 			 PARAMS(struct mock_macro_dummy_struct *));
 
-DEFINE_STRUCT_CLASS_MOCK(METHOD(two_param), CLASS(mock_macro_dummy_struct),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(two_param), CLASS(mock_macro_dummy_struct),
 			 RETURNS(int),
 			 PARAMS(struct mock_macro_dummy_struct *, int));
 
-DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX(METHOD(non_first_slot_param),
+static DEFINE_STRUCT_CLASS_MOCK_HANDLE_INDEX(METHOD(non_first_slot_param),
 			 CLASS(mock_macro_dummy_struct), HANDLE_INDEX(1),
 			 RETURNS(int),
 			 PARAMS(int, struct mock_macro_dummy_struct *));
 
-DEFINE_STRUCT_CLASS_MOCK(METHOD(void_ptr_return),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(void_ptr_return),
 			 CLASS(mock_macro_dummy_struct),
 			 RETURNS(void *),
 			 PARAMS(struct mock_macro_dummy_struct *));
@@ -51,7 +51,7 @@ static int mock_macro_dummy_struct_init(
 	return 0;
 }
 
-DEFINE_STRUCT_CLASS_MOCK_INIT(mock_macro_dummy_struct,
+static DEFINE_STRUCT_CLASS_MOCK_INIT(mock_macro_dummy_struct,
 			      mock_macro_dummy_struct_init);
 
 struct mock_macro_context {
diff --git a/lib/kunit/mock-test.c b/lib/kunit/mock-test.c
index 8a0fa33d087cbd..c5970a6a91bc73 100644
--- a/lib/kunit/mock-test.c
+++ b/lib/kunit/mock-test.c
@@ -25,7 +25,7 @@ static void adder_real_init(struct adder *adder)
 }
 
 DECLARE_STRUCT_CLASS_MOCK_PREREQS(adder);
-DEFINE_STRUCT_CLASS_MOCK(METHOD(mock_add), CLASS(adder), RETURNS(int),
+static DEFINE_STRUCT_CLASS_MOCK(METHOD(mock_add), CLASS(adder), RETURNS(int),
 				     PARAMS(struct adder*, int, int));
 DECLARE_STRUCT_CLASS_MOCK_INIT(adder);
 

  parent reply	other threads:[~2020-09-18 22:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 18:31 [RFC v1 00/12] kunit: introduce class mocking support Daniel Latypov
2020-09-18 18:31 ` [RFC v1 01/12] Revert "kunit: move string-stream.h to lib/kunit" Daniel Latypov
2020-09-18 22:53   ` kernel test robot
2020-09-18 18:31 ` [RFC v1 02/12] kunit: test: add kunit_stream a std::stream like logger Daniel Latypov
2020-09-18 18:31 ` [RFC v1 03/12] kunit: test: add concept of post conditions Daniel Latypov
2020-09-18 18:31 ` [RFC v1 04/12] checkpatch: add support for struct MOCK(foo) syntax Daniel Latypov
2020-09-18 18:31 ` [RFC v1 05/12] kunit: mock: add parameter list manipulation macros Daniel Latypov
2020-09-18 18:31 ` [RFC v1 06/12] kunit: expose kunit_set_failure() for use by mocking Daniel Latypov
2020-09-18 18:31 ` [RFC v1 07/12] kunit: mock: add internal mock infrastructure Daniel Latypov
2020-09-18 18:31 ` [RFC v1 08/12] kunit: mock: add basic matchers and actions Daniel Latypov
2020-09-18 21:27   ` kernel test robot
2020-09-18 21:27   ` [RFC PATCH] kunit: mock: to_mock_u8_matcher can be static kernel test robot
2020-09-19  0:24   ` [RFC v1 08/12] kunit: mock: add basic matchers and actions kernel test robot
2020-09-18 18:31 ` [RFC v1 09/12] kunit: mock: add macro machinery to pick correct format args Daniel Latypov
2020-09-18 18:31 ` [RFC v1 10/12] kunit: mock: add class mocking support Daniel Latypov
2020-09-18 20:27   ` kernel test robot
2020-09-18 22:30   ` kernel test robot
2020-09-18 22:46   ` kernel test robot
2020-09-18 22:46   ` kernel test robot [this message]
2020-09-18 18:31 ` [RFC v1 11/12] kunit: mock: add struct param matcher Daniel Latypov
2020-09-18 18:31 ` [RFC v1 12/12] kunit: mock: implement nice, strict and naggy mock distinctions Daniel Latypov
2020-09-23  0:24 ` [RFC v1 00/12] kunit: introduce class mocking support Daniel Latypov
2020-09-28 23:24   ` Brendan Higgins
2020-10-01 21:49     ` Daniel Latypov

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=20200918224614.GA59321@c23844b1b050 \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.