From: Nico Boehr <nrb@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Cc: imbrenda@linux.ibm.com, thuth@redhat.com
Subject: Re: [kvm-unit-tests PATCH v3 1/4] lib: s390x: add support for SCLP console read
Date: Fri, 22 Apr 2022 09:50:11 +0200 [thread overview]
Message-ID: <b7044e507dc7828f4c75d737b190a33800645666.camel@linux.ibm.com> (raw)
In-Reply-To: <d8e6d465-3a8a-db75-1244-ed574efd9f59@linux.ibm.com>
On Thu, 2022-04-21 at 16:29 +0200, Janosch Frank wrote:
>
[...]
> > diff --git a/lib/s390x/sclp-console.c b/lib/s390x/sclp-console.c
> > index fa36a6a42381..8c4bf68cbbab 100644
> > --- a/lib/s390x/sclp-console.c
> > +++ b/lib/s390x/sclp-console.c
[...]
> > + read_buf_end = sccb->ebh.length -
> > event_buffer_ascii_recv_header_len;
>
> Isn't this more like a length of the current read buffer contents?
Right, thanks, length is a much better name.
[...]
> > diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h
> > index fead007a6037..e48a5a3df20b 100644
> > --- a/lib/s390x/sclp.h
> > +++ b/lib/s390x/sclp.h
> > @@ -313,6 +313,14 @@ typedef struct ReadEventData {
> > uint32_t mask;
> > } __attribute__((packed)) ReadEventData;
> >
> > +#define SCLP_EVENT_ASCII_TYPE_DATA_STREAM_FOLLOWS 0
>
> Hrm, I'm not completely happy with the naming here since I confused
> it
> to the ebh->type when looking up the constants. But now I understand
> why
> you chose it.
Yeah, it sure is confusing.
Maybe it is better if we leave out the "type" entirely, but this might
make it harder to understand where it's coming from:
SCLP_ASCII_RECEIVE_DATA_STREAM_FOLLOWS
Another alternative I thought about is using enums, it won't fix the
naming, but at least it might be clearer to which type it belongs.
Let me know what you think.
next prev parent reply other threads:[~2022-04-22 7:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 13:45 [kvm-unit-tests PATCH v3 0/4] s390x: add migration test support Nico Boehr
2022-04-20 13:45 ` [kvm-unit-tests PATCH v3 1/4] lib: s390x: add support for SCLP console read Nico Boehr
2022-04-20 14:16 ` Claudio Imbrenda
2022-04-21 14:29 ` Janosch Frank
2022-04-22 7:50 ` Nico Boehr [this message]
2022-04-22 8:01 ` Janosch Frank
2022-04-20 13:45 ` [kvm-unit-tests PATCH v3 2/4] s390x: add support for migration tests Nico Boehr
2022-04-20 13:45 ` [kvm-unit-tests PATCH v3 3/4] s390x: don't run migration tests under PV Nico Boehr
2022-04-20 13:45 ` [kvm-unit-tests PATCH v3 4/4] s390x: add basic migration test Nico Boehr
2022-04-20 14:22 ` Claudio Imbrenda
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=b7044e507dc7828f4c75d737b190a33800645666.camel@linux.ibm.com \
--to=nrb@linux.ibm.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