From patchwork Tue May 1 19:03:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Smith X-Patchwork-Id: 10374383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A39686032A for ; Tue, 1 May 2018 19:03:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91CC01FF66 for ; Tue, 1 May 2018 19:03:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8670A28D2F; Tue, 1 May 2018 19:03:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 243B01FF66 for ; Tue, 1 May 2018 19:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754907AbeEATDr (ORCPT ); Tue, 1 May 2018 15:03:47 -0400 Received: from mout.gmx.net ([212.227.17.22]:37203 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754790AbeEATDr (ORCPT ); Tue, 1 May 2018 15:03:47 -0400 Received: from [46.94.156.86] ([46.94.156.86]) by 3c-app-gmx-bs73.server.lan (via HTTP); Tue, 1 May 2018 21:03:45 +0200 MIME-Version: 1.0 Message-ID: From: "John Smith" To: linux-input@vger.kernel.org Subject: [PATCH] HID: i2c-hid: fix "incomplete report" noise Date: Tue, 1 May 2018 21:03:45 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:g4Pb5N2bz3MExh7yP6EM+HPzMQq0I2BCzXqPABY216O ap3cBePTE1pRN74sK6fCFWEM+8mkhBiA70nCODO/LXUKFfOU0b UiTQBswVS0JJKJl74d2PYcQ9s1otP/POOMZ/jNqBySm2t9Y9bs hgZhJpPg3dCAvf7BdhEJmelukryr2CtwiTxK+9haocmKj8Lfbo MSQXJD/wwZFbuazG4Qo9Zl8h1vlgopeoPJJWru57+lid04REtd ebK4wwmbWUxOtZELctResCtk0izorgIu8XaUaexjqdNISbH/1a Ce7J+0= X-UI-Out-Filterresults: notjunk:1; V01:K0:03UNP3aDLDg=:Vf76nNkTY5OLZxKbOZ5doI IQEYLaU8MqqZT5/nJ87s6V7i3Dn5PfamHriPVtJMLGwXBSKqvG+qcQYsm53DsUymcURFFgL24 /WX3np7KCvqpVlULAgedk0EpdqBHWBHDDXpTkeYF+JCc8vkoi5C2IVGki+O3Vdz0s3Tw5N6SV 05ZlaytHrlEMn1rZtLPcaAq5/h+VhGO9J1dKaOUG3kq9cLZF4roqELwcZZ+HyQusKk3YRiM3M 6P06tWhCskV3/lTRMOVyMdreOM5imc5/94KFz1NYSkp8ZJeJfZlRa6abPVeBlLXVxdK9aJBSg Clj2eHPSfpLgm5xXk+/F+go7IbB+tk19KCvVlnwKpNk7EUz9tycpFHE5PhpSG2cKA3H6EC+Xq b3SqDZ0sgQCs6LbrmPWnq1dAfu78T2pbJ2pA144cKnD38MUw0VLv/cyNiU/ZzRpx8eM67ArK3 2ETlQHAYpVLkJx+g0U5Q3unqd2SdgfGXHO/zydYNrR7kSNATLRA5 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Please undo the recent change on i2c-hid.c > - if (ret_size > size) { > + if ((ret_size > size) || (ret_size <= 2)) { > dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n", > __func__, size, ret_size); > return; This change spams in the dmesg output. Or remove the "=". - if ((ret_size > size) || (ret_size <= 2)) { + if ((ret_size > size) || (ret_size < 2)) { $ dmesg [ 1781.266353] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.273898] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.281464] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.289064] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.296607] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.304131] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.311751] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.319315] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) [ 1781.326882] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2) diff -uNr drivers/hid/i2c-hid/i2c-hid.c drivers/hid/i2c-hid/i2c-hid.c --- drivers/hid/i2c-hid/i2c-hid.c 2018-04-26 11:00:39.000000000 +0200 +++ drivers/hid/i2c-hid/i2c-hid.c 2018-04-29 12:42:53.867780866 +0200 @@ -484,7 +484,7 @@ return; } - if ((ret_size > size) || (ret_size <= 2)) { + if ((ret_size > size) || (ret_size < 2)) { dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n", __func__, size, ret_size); return;