Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Alexander Gordeev <agordeev@linux.ibm.com>
To: "Jason J. Herne" <jjherne@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	pasic@linux.ibm.com, akrowiak@linux.ibm.com,
	borntraeger@de.ibm.com, gor@linux.ibm.com, hca@linux.ibm.com,
	Matthew Rosato <mjrosato@linux.ibm.com>
Subject: Re: [PATCH v4 4/5] s390/vfio-ap: Add write support to sysfs attr ap_config
Date: Mon, 8 Apr 2024 16:22:32 +0200	[thread overview]
Message-ID: <ZhP9qHs6tjPbh1/J@tuxmaker.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20240326164706.29167-5-jjherne@linux.ibm.com>

On Tue, Mar 26, 2024 at 12:47:05PM -0400, Jason J. Herne wrote:

Hi Jason,

This series still has some issues.

> +	newbuf = rest = kstrndup(buf, AP_CONFIG_STRLEN, GFP_KERNEL);

This line triggers a checkpatch warning. Would it make sense
to turn it into below instead?

	newbuf = kstrndup(buf, AP_CONFIG_STRLEN, GFP_KERNEL);
> +	if (!newbuf)
> +		return -ENOMEM;
	rest = newbuf;

Also, please address other checkpatch suggestions.

> +	/* Save old state */
> +	/* The volatile cast here is to work around a gcc false positive
> +	 * Wstringop-overread-warning.
> +	 */
> +	ap_matrix_copy(&m_old, (*(struct ap_matrix * volatile *)(&matrix_mdev->matrix)));

Could you please come up with a different workaround? This issue has already
been resolved in the past in different ways. See commit 34186b48d29b ("ARM:
sharpsl_param: work around -Wstringop-overread warning") for example.

Thanks!

  reply	other threads:[~2024-04-08 14:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 16:47 [PATCH v4 0/5] s390/vfio-ap: ap_config sysfs attribute for mdevctl automation Jason J. Herne
2024-03-26 16:47 ` [PATCH v4 1/5] s390/ap: Externalize AP bus specific bitmap reading function Jason J. Herne
2024-03-26 16:47 ` [PATCH v4 2/5] s390/vfio-ap: Add sysfs attr, ap_config, to export mdev state Jason J. Herne
2024-03-26 16:47 ` [PATCH v4 3/5] s390/vfio-ap: Ignore duplicate link requests in vfio_ap_mdev_link_queue Jason J. Herne
2024-03-26 16:47 ` [PATCH v4 4/5] s390/vfio-ap: Add write support to sysfs attr ap_config Jason J. Herne
2024-04-08 14:22   ` Alexander Gordeev [this message]
2024-04-12 12:29     ` Jason J. Herne
2024-04-12 14:18       ` Alexander Gordeev
2024-03-26 16:47 ` [PATCH v4 5/5] docs: Update s390 vfio-ap doc for ap_config sysfs attribute Jason J. Herne

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=ZhP9qHs6tjPbh1/J@tuxmaker.boeblingen.de.ibm.com \
    --to=agordeev@linux.ibm.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=jjherne@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@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