[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtYsXvi9WfdLFCiu@google.com>
Date: Tue, 19 Jul 2022 04:00:30 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Guenter Roeck <groeck@...gle.com>
Cc: Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
"open list:CHROME HARDWARE PLATFORM SUPPORT"
<chrome-platform@...ts.linux.dev>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 01/10] platform/chrome: cros_kunit_util: add default
value for `msg->result`
On Mon, Jul 18, 2022 at 06:35:42AM -0700, Guenter Roeck wrote:
> On Sun, Jul 17, 2022 at 10:10 PM Tzung-Bi Shih <tzungbi@...nel.org> wrote:
> > +int cros_kunit_ec_xfer_mock_default_result;
> > +EXPORT_SYMBOL_GPL(cros_kunit_ec_xfer_mock_default_result);
>
> Is this needed as a global variable and, if so, does it really have to
> be exported ?
>
> > int cros_kunit_ec_xfer_mock_default_ret;
> > EXPORT_SYMBOL_GPL(cros_kunit_ec_xfer_mock_default_ret);
>
> Same here, really, only I didn't notice before.
Global variables: I'm afraid yes. They should be accessible to test cases
(e.g. drivers/platform/chrome/cros_ec_proto_test.c).
Exported: I'm not sure if I fixed it in a proper way. They were added for
fixing https://lkml.org/lkml/2022/6/2/452. When CONFIG_CROS_KUNIT=m and
CONFIG_CROS_EC_PROTO_KUNIT_TEST=m, cros_ec_proto_test.c still needs to access
them (in cros_kunit_util.c).
Powered by blists - more mailing lists