From: "Jason J. Herne" <jjherne@linux.ibm.com>
To: Alexander Gordeev <agordeev@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: Fri, 12 Apr 2024 08:29:44 -0400 [thread overview]
Message-ID: <95b551f1-7599-96e1-b528-0701465baf5a@linux.ibm.com> (raw)
In-Reply-To: <ZhP9qHs6tjPbh1/J@tuxmaker.boeblingen.de.ibm.com>
On 4/8/24 10:22 AM, Alexander Gordeev wrote:
> 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;
Yes, I can make that change. My checkpatch.pl script does not point this
issue out with --strict. Should I be running checkpatch with --strict?
> Also, please address other checkpatch suggestions.
>
Yep, I'll run with --strict and address everything.
>> + /* 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.
Sure, I like this solution way better than using volatile. Thanks for
providing the pointer to this.
next prev parent reply other threads:[~2024-04-12 12:29 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
2024-04-12 12:29 ` Jason J. Herne [this message]
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=95b551f1-7599-96e1-b528-0701465baf5a@linux.ibm.com \
--to=jjherne@linux.ibm.com \
--cc=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=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