From: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
Janosch Frank <frankja@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v6 1/3] s390x: Give name to return value of tprot()
Date: Wed, 27 Apr 2022 14:04:52 +0200 [thread overview]
Message-ID: <9869b838-0070-ae67-737f-2bd3d0e21d60@linux.ibm.com> (raw)
In-Reply-To: <20220427131449.61cce697@p-imbrenda>
On 4/27/22 13:14, Claudio Imbrenda wrote:
> On Wed, 27 Apr 2022 12:06:09 +0200
> Janis Schoetterl-Glausch <scgl@linux.ibm.com> wrote:
>
>> Improve readability by making the return value of tprot() an enum.
>>
>> No functional change intended.
>
> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
>
> but see nit below
>
>>
>> Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
>> ---
>> lib/s390x/asm/arch_def.h | 11 +++++++++--
>> lib/s390x/sclp.c | 6 +++---
>> s390x/tprot.c | 24 ++++++++++++------------
>> 3 files changed, 24 insertions(+), 17 deletions(-)
[...]
>> diff --git a/s390x/tprot.c b/s390x/tprot.c
>> index 460a0db7..8eb91c18 100644
>> --- a/s390x/tprot.c
>> +++ b/s390x/tprot.c
>> @@ -20,26 +20,26 @@ static uint8_t pagebuf[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
>>
>> static void test_tprot_rw(void)
>> {
>> - int cc;
>> + enum tprot_permission permission;
>>
>> report_prefix_push("Page read/writeable");
>>
>> - cc = tprot((unsigned long)pagebuf, 0);
>> - report(cc == 0, "CC = 0");
>> + permission = tprot((unsigned long)pagebuf, 0);
>> + report(permission == TPROT_READ_WRITE, "CC = 0");
>
> here and in all similar cases below: does it still make sense to have
> "CC = 0" as message at this point? Maybe a more descriptive one would
> be better
I thought about it, but decided against it. Firstly, because I preferred
not to do any functional changes and secondly, I could not think of anything
better. The prefix already tells you the meaning of the cc, so I don't know
what to print that would not be redundant.
[...]
next prev parent reply other threads:[~2022-04-27 12:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220427100611.2119860-1-scgl@linux.ibm.com>
2022-04-27 10:06 ` [kvm-unit-tests PATCH v6 1/3] s390x: Give name to return value of tprot() Janis Schoetterl-Glausch
2022-04-27 11:14 ` Claudio Imbrenda
2022-04-27 12:04 ` Janis Schoetterl-Glausch [this message]
2022-04-27 12:39 ` Claudio Imbrenda
2022-04-27 12:42 ` Janosch Frank
2022-04-27 10:06 ` [kvm-unit-tests PATCH v6 2/3] s390x: Test effect of storage keys on some instructions Janis Schoetterl-Glausch
2022-04-27 11:18 ` Claudio Imbrenda
2022-04-27 10:06 ` [kvm-unit-tests PATCH v6 3/3] Disable s390x skey test in GitLab CI Janis Schoetterl-Glausch
2022-04-27 11:12 ` Claudio Imbrenda
2022-04-27 11:16 ` Thomas Huth
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=9869b838-0070-ae67-737f-2bd3d0e21d60@linux.ibm.com \
--to=scgl@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.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