Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932291AbbLNKHk (ORCPT ); Mon, 14 Dec 2015 05:07:40 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:13928 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932156AbbLNKHh (ORCPT ); Mon, 14 Dec 2015 05:07:37 -0500 X-AuditID: cbfec7f4-f79026d00000418a-44-566e94e7e404 From: Andrzej Hajda To: Tomas Winkler Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH] doc: mei: fix handling return value of mei_recv_msg Date: Mon, 14 Dec 2015 11:05:59 +0100 Message-id: <1450087564-28441-2-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1450087564-28441-1-git-send-email-a.hajda@samsung.com> References: <1450087564-28441-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e/4Zd3nU/LCDJ5PErG4te4cq8XGGetZ LZ4caGe0WNi2hMXi8q45bBZrj9xlt/jQU+fA7rF4z0smj8V9k1k9+rasYvT4vEkugCWKyyYl NSezLLVI3y6BK+PTts9MBffZK1b8WcHcwHiDrYuRk0NCwESidWkblC0mceHeeiCbi0NIYCmj xKmv/9khnCYmiQvnu8Cq2AQ0Jf5uvglmiwhoS8x6+Z0VpIhZ4DWjxPaJB4ASHBzCAi4Sx84y gZgsAqoSC+/lgJTzCjhLXJx4nh1imZzEyWOTWUFKOIGqZ24sBjGFgEpu/Y2awMi7gJFhFaNo amlyQXFSeq6hXnFibnFpXrpecn7uJkZIEH3Zwbj4mNUhRgEORiUe3oxluWFCrIllxZW5hxgl OJiVRHgTrPLChHhTEiurUovy44tKc1KLDzFKc7AoifPO3fU+REggPbEkNTs1tSC1CCbLxMEp 1cBot/S14rzrSjO8lvd/sruSWrQye9quo0ej3MwiCnXzBB2lAi+sP363Iq7h0PvZZqfL560I YUx7xKTRxLh69vV41/ZstRdqtjs9XovbZYQk7qld5HTvxpbNNw7p770Rtn8Vl1I5320Lp88/ Z27bffVV1654vrSX/InyPPVqJad/Miowfjkr8qhIiaU4I9FQi7moOBEAi3oufx4CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1207 Lines: 34 The function can return negative values, so its result should be assigned to signed variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda --- Documentation/misc-devices/mei/mei-amt-version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/misc-devices/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c index 57d0d87..33e67bd 100644 --- a/Documentation/misc-devices/mei/mei-amt-version.c +++ b/Documentation/misc-devices/mei/mei-amt-version.c @@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd, unsigned int expected_sz) { uint32_t in_buf_sz; - uint32_t out_buf_sz; + ssize_t out_buf_sz; ssize_t written; uint32_t status; struct amt_host_if_resp_header *msg_hdr; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/