From patchwork Thu Sep 16 05:50:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang wangx X-Patchwork-Id: 513521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A691AC433FE for ; Thu, 16 Sep 2021 05:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77DB5611C8 for ; Thu, 16 Sep 2021 05:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234413AbhIPFwd (ORCPT ); Thu, 16 Sep 2021 01:52:33 -0400 Received: from smtpbg587.qq.com ([113.96.223.105]:49437 "EHLO smtpbg587.qq.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbhIPFwc (ORCPT ); Thu, 16 Sep 2021 01:52:32 -0400 X-QQ-mid: bizesmtp54t1631771465t8hhry8y Received: from localhost.localdomain (unknown [182.148.15.91]) by esmtp6.qq.com (ESMTP) with id ; Thu, 16 Sep 2021 13:50:52 +0800 (CST) X-QQ-SSF: 0100000000800010B000000A0000000 X-QQ-FEAT: Gq6/1HjPYVUeBdoHG0ZxohswL4L2+PDzoEGGnAVGNedqpbgwL3oVOsK0gjt77 CrOpRicoI6etNu5aFd3H6T5+bC8ChE4beDOWl66ZbUIyawtmS5z82A+i1eyXJgAwRK9yd8R MW/2gMXPb+kXzNimHIUo+CfaihhZz9tAqsA5V3Ev+cRrsIdYzR/oKGOzG9jkOy29nJAhirA 4Qb9G7Boxv+tcDOqyN5/b+UFxJYhqapn/BifYrKWKzpzBKlERptKTRqzH20TXyoKi7y0I3t 531s6AKowqsOAmgfYbvxDrcBjx7cdlPKp7BoiCe9THyvFARrN0sLRpS2xirFd07U5rLPCSW mJ2R/cj X-QQ-GoodBg: 0 From: Xiang wangx To: netdev@vger.kernel.org Cc: Xiang wangx Subject: [PATCH] selftests: nci: use int replace unsigned int Date: Thu, 16 Sep 2021 13:50:45 +0800 Message-Id: <20210916055045.60032-1-wangxiang@cdjrlc.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:cdjrlc.com:qybgspam:qybgspam3 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Should not use unsigned expression compared with zero Signed-off-by: Xiang wangx --- tools/testing/selftests/nci/nci_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nci/nci_dev.c b/tools/testing/selftests/nci/nci_dev.c index e1bf55dabdf6..162c41e9bcae 100644 --- a/tools/testing/selftests/nci/nci_dev.c +++ b/tools/testing/selftests/nci/nci_dev.c @@ -746,7 +746,7 @@ int read_write_nci_cmd(int nfc_sock, int virtual_fd, const __u8 *cmd, __u32 cmd_ const __u8 *rsp, __u32 rsp_len) { char buf[256]; - unsigned int len; + int len; send(nfc_sock, &cmd[3], cmd_len - 3, 0); len = read(virtual_fd, buf, cmd_len);