Linux-FPGA Archive mirror
 help / color / mirror / Atom feed
From: Marco Pagani <marpagan@redhat.com>
To: Xu Yilun <yilun.xu@intel.com>
Cc: Moritz Fischer <mdf@kernel.org>, Wu Hao <hao.wu@intel.com>,
	Tom Rix <trix@redhat.com>,
	linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org
Subject: Re: [PATCH 1/4] fpga: add helpers for the FPGA KUnit test suites.
Date: Thu, 28 Sep 2023 19:01:43 +0200	[thread overview]
Message-ID: <b12cc469-a885-223b-c16f-2cd346e8d8ba@redhat.com> (raw)
In-Reply-To: <ZRWjVkMYNosNvlt3@yilunxu-OptiPlex-7050>



On 2023-09-28 18:01, Xu Yilun wrote:
> On 2023-09-26 at 18:39:08 +0200, Marco Pagani wrote:
>> Add helpers to facilitate the registration of minimal platform drivers
>> to support the parent platform devices used for testing.
>>
>> Signed-off-by: Marco Pagani <marpagan@redhat.com>
>> ---
>>  drivers/fpga/tests/fpga-test-helpers.h | 29 ++++++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>  create mode 100644 drivers/fpga/tests/fpga-test-helpers.h
>>
>> diff --git a/drivers/fpga/tests/fpga-test-helpers.h b/drivers/fpga/tests/fpga-test-helpers.h
>> new file mode 100644
>> index 000000000000..fcad3249be68
>> --- /dev/null
>> +++ b/drivers/fpga/tests/fpga-test-helpers.h
>> @@ -0,0 +1,29 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * KUnit test for the FPGA Manager
>> + *
>> + * Copyright (C) 2023 Red Hat, Inc.
>> + *
>> + * Author: Marco Pagani <marpagan@redhat.com>
>> + */
>> +
>> +#ifndef FPGA_KUNIT_HELPERS_
>> +#define FPGA_KUNIT_HELPERS_
> 
> How about _FPGA_KUNIT_HELPERS_H

That's fine with me. I will change it in v2.

> Others LGTM for this series.
> 
> Thanks,
> Yilun
> 
>> +
>> +#define TEST_PDEV_NAME	"fpga-test-pdev"
>> +
>> +#define TEST_PLATFORM_DRIVER(__drv_name)			\
>> +	__TEST_PLATFORM_DRIVER(__drv_name, TEST_PDEV_NAME)
>> +/*
>> + * Helper macro for defining a minimal platform driver that can
>> + * be registered to support the parent platform devices used for
>> + * testing.
>> + */
>> +#define __TEST_PLATFORM_DRIVER(__drv_name, __dev_name)		\
>> +static struct platform_driver __drv_name = {			\
>> +	.driver = {						\
>> +		.name = __dev_name,				\
>> +	},							\
>> +}
>> +
>> +#endif	/* FPGA_KUNIT_HELPERS_ */
>> -- 
>> 2.41.0
>>
> 

Thanks,
Marco


  reply	other threads:[~2023-09-28 17:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 16:39 [PATCH 0/4] fpga: add platform drivers to the FPGA KUnit test suites Marco Pagani
2023-09-26 16:39 ` [PATCH 1/4] fpga: add helpers for " Marco Pagani
2023-09-28 16:01   ` Xu Yilun
2023-09-28 17:01     ` Marco Pagani [this message]
2023-09-26 16:39 ` [PATCH 2/4] fpga: add a platform driver to the FPGA Manager test suite Marco Pagani
2023-09-27  2:55   ` Ruan Jinjie
2023-09-27 16:56     ` Marco Pagani
2023-09-28  3:41       ` Ruan Jinjie
2023-09-26 16:39 ` [PATCH 3/4] fpga: add a platform driver to the FPGA Bridge " Marco Pagani
2023-09-27  2:52   ` Ruan Jinjie
2023-09-26 16:39 ` [PATCH 4/4] fpga: add a platform driver to the FPGA Region " Marco Pagani
2023-09-27  2:58   ` Ruan Jinjie

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=b12cc469-a885-223b-c16f-2cd346e8d8ba@redhat.com \
    --to=marpagan@redhat.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).