Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Mete Durlu <meted@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH v4] s390/diag204: Introduce diag204 rework
Date: Tue, 27 Oct 2026 12:32:42 +0100	[thread overview]
Message-ID: <20261027113242.11789A2c-hca@linux.ibm.com> (raw)
In-Reply-To: <20261027-diag204ioctl-v4-1-d5e90b56112b@linux.ibm.com>

On Tue, Oct 27, 2026 at 11:40:25AM +0100, Mete Durlu wrote:
> +static struct diag204_cache g_cache;

Before you send yet another version: what is "g_cache"? That seems to
be a horrible name for a global variable. What does that even stand
for? Please change the name to something more descriptive.

> +/*
> + * diag204_store() provides users data retrieved from the diag204 facility.
> + * Since diag204 is an expensive call to make, it is limited to a call per
> + * second for now.
> + * diag204_store() first checks if diag204 cache is present and valid. If the
> + * cache is valid, it copies the contents to the users buffer.
> + * If the cache is expired, it first updates the cache and then proceeds with
> + * the same copy operation.
> + *
> + * @buf: Users have to manage their own buffers by using
> + * diag204_allocate_buffer() and diag204_free_buffer().
> + *
> + * @allow_busy: If diag204 supports busy indication facility(bif), users can
> + * specify diag204 to  return BUSY instead of blocking until data becomes ready.
> + *
> + * @allow_busy_wait: If users allow diag204 to use bif, they would also get
> + * the option to specify an interruptible wait behavior by allowing busy wait.
> + * This enables users to interrupt diag204 waiting period via signals.
> + */

Is that AI generated text? That doesn't read like normal kernel documentation.
And since this looks close to kernel-doc format you could also make that
kernel-doc. But make it shorter and don't describe the implementation details.

> + * diag204_init() has to find out, which type of diagnose 204 implementation
> + * we have on the machine. Currently there are three possible scanarios:
> + *   - subcode 4   + simple data format (only one page)
> + *   - subcode 4-6 + extended data format
> + *   - subcode 4-7 + extended data format
> + *
> + * Subcode 5 is used to retrieve the size of the data, provided by subcodes
> + * 6 and 7. Subcode 7 basically has the same function as subcode 6. In addition
> + * to subcode 6 it provides also information about secondary cpus.
> + * In order to get as much information as possible, we first try
> + * subcode 7, then 6 and if both fail, we use subcode 4.
> + */

This looks like it was copied from the old code: please fix the documentation
convert to use imperative mood when you move it.

  parent reply	other threads:[~2026-10-27 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 10:40 [PATCH v4] s390/diag204: Introduce diag204 rework Mete Durlu
2026-10-27 10:55 ` sashiko-bot
2026-10-27 11:32 ` Heiko Carstens [this message]
2026-10-27 11:53   ` Mete Durlu
2026-10-27 14:08     ` Heiko Carstens

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=20261027113242.11789A2c-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=meted@linux.ibm.com \
    --cc=sumanthk@linux.ibm.com \
    --cc=svens@linux.ibm.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