From: Stefan Berger <stefanb@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, clg@kaod.org, ninad@linux.ibm.com,
joel@jms.id.au, andrew@aj.id.au
Subject: Re: [PATCH v3 1/3] qtest: Add functions for accessing devices on Aspeed I2C controller
Date: Tue, 28 Mar 2023 13:17:52 -0400 [thread overview]
Message-ID: <ae7bb551-b2c3-0215-d337-44c8402c7ec7@linux.ibm.com> (raw)
In-Reply-To: <601fa241-1b5e-067c-f7b5-7cdd4feaa13f@redhat.com>
On 3/28/23 11:05, Thomas Huth wrote:
> On 28/03/2023 15.51, Stefan Berger wrote:
>> +
>> +void aspeed_i2c_writeb(uint32_t baseaddr, uint8_t slave_addr,
>> + uint8_t reg, uint8_t v)
>> +{
>> + aspeed_i2c_write_n(baseaddr, slave_addr, reg, v, sizeof(v));
>> +}
>
> For helper functions like this, I'd recommend to not use libqtest-single.h and rather pass in a QTestState* as parameter to use qtest_writel() and qtest_readl() instead. That will make the code future-proof in case someone wants to use these function for migration-related tests later.
Done.
>
> Thomas
>
next prev parent reply other threads:[~2023-03-28 17:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 13:51 [PATCH v3 0/3] qtests: tpm: Add test cases for TPM TIS I2C device emulation Stefan Berger
2023-03-28 13:51 ` [PATCH v3 1/3] qtest: Add functions for accessing devices on Aspeed I2C controller Stefan Berger
2023-03-28 15:05 ` Thomas Huth
2023-03-28 15:59 ` Cédric Le Goater
2023-03-28 17:17 ` Stefan Berger [this message]
2023-03-28 13:51 ` [PATCH v3 2/3] qtest: Move tpm_util_tis_transmit() into tpm-tis-utils.c and rename it Stefan Berger
2023-03-28 13:51 ` [PATCH v3 3/3] qtest: Add a test case for TPM TIS I2C connected to Aspeed I2C controller Stefan Berger
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=ae7bb551-b2c3-0215-d337-44c8402c7ec7@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=andrew@aj.id.au \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=marcandre.lureau@redhat.com \
--cc=ninad@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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 NNTP newsgroup(s).