Linux kernel staging patches
 help / color / mirror / Atom feed
From: Zicheng Qu <quzicheng@huawei.com>
To: <lars@metafoo.de>, <Michael.Hennerich@analog.com>,
	<jic23@kernel.org>, <gregkh@linuxfoundation.org>,
	<cristina.opriceana@gmail.com>, <daniel.baluta@intel.com>,
	<linux-iio@vger.kernel.org>, <linux-staging@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>
Cc: <tanghui20@huawei.com>, <zhangqiao22@huawei.com>,
	<judy.chenhui@huawei.com>, <quzicheng@huawei.com>
Subject: [PATCH 0/2] Correct Phase Range Check for AD9832 and AD9834 Drivers
Date: Tue, 5 Nov 2024 14:03:57 +0000	[thread overview]
Message-ID: <20241105140359.2465656-1-quzicheng@huawei.com> (raw)

Hi all,

I am submitting two patches to address an issue in the AD9832 and AD9834
IIO drivers. The current implementation allows an invalid phase value of
4096 to pass due to incorrect range checking. The phase registers for
both devices are 12 bits, meaning valid values should range from 0 to
4095.

These patches modify the condition to use a greater-than-or-equal-to
check, ensuring only valid phase values are accepted.

Zicheng Qu (2):
  staging: iio: ad9834: Correct phase range check
  staging: iio: ad9832: Correct phase range check

 drivers/staging/iio/frequency/ad9832.c | 2 +-
 drivers/staging/iio/frequency/ad9834.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-11-05 14:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 14:03 Zicheng Qu [this message]
2024-11-05 14:03 ` [PATCH 1/2] staging: iio: ad9834: Correct phase range check Zicheng Qu
2024-11-05 15:54   ` Dan Carpenter
2024-11-05 14:03 ` [PATCH 2/2] staging: iio: ad9832: " Zicheng Qu
2024-11-05 16:15   ` Dan Carpenter
2024-11-07  1:10 ` [PATCH v2 0/2] Fix phase range check in AD9832 and AD9834 drivers Zicheng Qu
2024-11-07  1:10   ` [PATCH v2 1/2] staging: iio: ad9834: Correct phase range check Zicheng Qu
2024-11-07 10:32     ` Dan Carpenter
2024-11-09 14:41       ` Jonathan Cameron
2024-11-07  1:10   ` [PATCH v2 2/2] staging: iio: ad9832: " Zicheng Qu
2024-11-09 14:39   ` [PATCH v2 0/2] Fix phase range check in AD9832 and AD9834 drivers Jonathan Cameron

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=20241105140359.2465656-1-quzicheng@huawei.com \
    --to=quzicheng@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=cristina.opriceana@gmail.com \
    --cc=daniel.baluta@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=judy.chenhui@huawei.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=tanghui20@huawei.com \
    --cc=zhangqiao22@huawei.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