All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sven Schnelle" <svens@linux.ibm.com>
Cc: "Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>
Subject: Re: [PATCH 1/2] ptp: ptp_s390: Add missing CC check for ptff()
Date: Wed, 15 Jul 2026 08:49:41 +0000	[thread overview]
Message-ID: <20260715084941.B3C671F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714084921.3926697-2-svens@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message explicitly states "returning EIO if it is not zero", but the implementation actually returns `-EOPNOTSUPP`.
--

--- Patch [1]: [PATCH 1/2] ptp: ptp_s390: Add missing CC check for ptff() ---
commit 1da4a31377dcdb1f0789c86ae0f57516f6c5caf1
Author: Sven Schnelle <svens@linux.ibm.com>

ptp: ptp_s390: Add missing CC check for ptff()

This commit updates ptp_s390_qpt_gettime to check the condition code
returned by ptff. It adds an error path to handle non-zero returns from
the hardware call.

> The code doesn't honor the returned condition code when issuing
> the PTFF_QPT call. Fix this by checking the return code and returning
> EIO if it is not zero.

[Severity: Medium]
Is the description in the commit message accurate? The message states the
code returns EIO, but the implementation actually returns -EOPNOTSUPP:

> diff --git a/drivers/ptp/ptp_s390.c b/drivers/ptp/ptp_s390.c
> index 29618eb9bf442..7299c3aae65f6 100644
> --- a/drivers/ptp/ptp_s390.c
> +++ b/drivers/ptp/ptp_s390.c
> @@ -48,7 +48,8 @@ static int ptp_s390_qpt_gettime(struct ptp_clock_info *ptp,
>  {
>  	unsigned long tod;
>  
> -	ptff(&tod, sizeof(tod), PTFF_QPT);
> +	if (ptff(&tod, sizeof(tod), PTFF_QPT) != 0)
> +		return -EOPNOTSUPP;
>  	*ts = tod_to_timespec64(tod);
>  	return 0;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260714084921.3926697-1-svens@linux.ibm.com?part=1

  reply	other threads:[~2026-07-15  8:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  8:49 [PATCH 0/2] Fix two issues in ptp_s390 driver Sven Schnelle
2026-07-14  8:49 ` [PATCH 1/2] ptp: ptp_s390: Add missing CC check for ptff() Sven Schnelle
2026-07-15  8:49   ` sashiko-bot [this message]
2026-07-14  8:49 ` [PATCH 2/2] ptp: ptp_s390: Add missing facility check Sven Schnelle
2026-07-14  9:39   ` 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=20260715084941.B3C671F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.