From: Jonathan Cameron <jic23@kernel.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: lars@metafoo.de, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] iio: light: isl76682: remove unreachable code
Date: Sun, 10 Dec 2023 12:37:04 +0000 [thread overview]
Message-ID: <20231210123704.4be7087e@jic23-huawei> (raw)
In-Reply-To: <20231208021715.32450-1-jiapeng.chong@linux.alibaba.com>
On Fri, 8 Dec 2023 10:17:15 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> The function isl76682_read_raw cannot execute return -EINVAL up to 145
> lines, delete the invalid code.
>
> drivers/iio/light/isl76682.c:145 isl76682_read_raw() warn: ignoring unreachable code.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7698
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/light/isl76682.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/light/isl76682.c b/drivers/iio/light/isl76682.c
> index 0a7c3b09c3c0..cf6ddee44ffc 100644
> --- a/drivers/iio/light/isl76682.c
> +++ b/drivers/iio/light/isl76682.c
> @@ -142,7 +142,6 @@ static int isl76682_read_raw(struct iio_dev *indio_dev,
> default:
> return -EINVAL;
> }
> - return -EINVAL;
> case IIO_CHAN_INFO_SCALE:
> for (i = 0; i < ARRAY_SIZE(isl76682_range_table); i++) {
> if (chip->range != isl76682_range_table[i].range)
prev parent reply other threads:[~2023-12-10 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 2:17 [PATCH] iio: light: isl76682: remove unreachable code Jiapeng Chong
2023-12-10 12:37 ` Jonathan Cameron [this message]
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=20231210123704.4be7087e@jic23-huawei \
--to=jic23@kernel.org \
--cc=abaci@linux.alibaba.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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