From: Shuah Khan <skhan@linuxfoundation.org>
To: Wang Hai <wanghai38@huawei.com>, shuah@kernel.org, pintu.ping@gmail.com
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2] android/ion: fix error return code in opensocket()
Date: Wed, 18 Nov 2020 10:08:53 -0700 [thread overview]
Message-ID: <f0c54d6d-2b3a-2053-edfe-6fff32feed41@linuxfoundation.org> (raw)
In-Reply-To: <20201118104742.62817-1-wanghai38@huawei.com>
On 11/18/20 3:47 AM, Wang Hai wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 47a18c42d992 ("android/ion: userspace test utility for ion buffer sharing")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---
> v1->v2: add missing ";"
> tools/testing/selftests/android/ion/ipcsocket.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/android/ion/ipcsocket.c b/tools/testing/selftests/android/ion/ipcsocket.c
> index 7dc521002095..13b3455ba39c 100644
> --- a/tools/testing/selftests/android/ion/ipcsocket.c
> +++ b/tools/testing/selftests/android/ion/ipcsocket.c
> @@ -28,8 +28,9 @@ int opensocket(int *sockfd, const char *name, int connecttype)
> }
>
> *sockfd = ret;
> - if (setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR,
> - (char *)&temp, sizeof(int)) < 0) {
> + ret = setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&temp,
> + sizeof(int));
> + if (ret < 0) {
> fprintf(stderr, "<%s>: Failed setsockopt: <%s>\n",
> __func__, strerror(errno));
> goto err;
>
This test is slated removal and I have stopped accepting patches that
aren't critical fixes at this time.
thanks,
-- Shuah
prev parent reply other threads:[~2020-11-18 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 10:47 [PATCH v2] android/ion: fix error return code in opensocket() Wang Hai
2020-11-18 17:08 ` Shuah Khan [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=f0c54d6d-2b3a-2053-edfe-6fff32feed41@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=pintu.ping@gmail.com \
--cc=shuah@kernel.org \
--cc=wanghai38@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