From patchwork Fri May 26 05:22:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 9749701 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 01F876037E for ; Fri, 26 May 2017 05:22:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2812283BD for ; Fri, 26 May 2017 05:22:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6531283CD; Fri, 26 May 2017 05:22:46 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 57921283BD for ; Fri, 26 May 2017 05:22:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163519AbdEZFWp (ORCPT ); Fri, 26 May 2017 01:22:45 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36330 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163496AbdEZFWo (ORCPT ); Fri, 26 May 2017 01:22:44 -0400 Received: by mail-pf0-f195.google.com with SMTP id n23so241629pfb.3; Thu, 25 May 2017 22:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SAdJX3es1K/NbsdTFCxCbSfig0O9ZH/xfqf9eoGqN/Y=; b=eqNL2G5/r8ydoM7mVIVR8ibhdNPsJrEAASG6uCBdMg5WZldt8AYpCyvnOfr0xncWfb u5ay+CrA9O/M12YXbuRKpehk/vqq6o38Q86a3OQSw7GlDdrR7ZuHjGrOk0YE7F9kHKpo NmVEVIx56BLFpQby3KIzcK1f5qRAeYUou/yLprazM8HLZv14u3wwl+qHR9/S6JFH1EhG vQldGaPsRU3nPUYY2m//V9HKV/Ap+upaebnAnzTzMoSBGZe25jMpbjZvLTteSZavaNvV 81cIO5MURod4lN7d/EpGDDMnv8izbz8CHG6sFZYfN8QnlI/MNpDNWweV6Sp7vcYNDxA2 EANA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SAdJX3es1K/NbsdTFCxCbSfig0O9ZH/xfqf9eoGqN/Y=; b=gPZirIKod0FTladjLxdx0RmEwJIKm14h1QdfTx6jAY0DjztzM1W1O75WbJwzGMFMhe VtMUanxCvAMtwiC1gRZ3zapHD81939HwhOAGD0BQRvceSNR0oSP9KVWyFcOUfM/xZ1cm DNvp5z6bfe1ckrRZ7SI5GidFDjV68dT/B3fD4fy8sb5VE2+H9jOxDJT8Vu5WCn7d8G4a mN/GyJ44Z4sBHMsNng5LcDyeMuM273jk8yOSjqpz2iZNYCz9mOQjZgICXwg3v2vs9Yxn bimCu/6VVqW5FO9VOEoweYAKMjPRi1OSO08weU8pBUlUtFv5wfNFhCopAAMwN4JzRJIU fcNA== X-Gm-Message-State: AODbwcCZwno/IKi2qBoqBFR6Xav3HS/ZxWFu82J8gB7xM1ex5VGUEQn6 FeFwXM9D4L6fjA== X-Received: by 10.99.123.81 with SMTP id k17mr146705pgn.125.1495776163329; Thu, 25 May 2017 22:22:43 -0700 (PDT) Received: from localhost.localdomain ([2601:647:4701:31a:320e:d5ff:febd:81c]) by smtp.googlemail.com with ESMTPSA id c12sm16055310pfl.79.2017.05.25.22.22.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 22:22:42 -0700 (PDT) From: Nick Desaulniers Cc: gregkh@linuxfoundation.org, Nick Desaulniers , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: mousedev - fix implicit conversion warning Date: Thu, 25 May 2017 22:22:16 -0700 Message-Id: <20170526052217.30624-1-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) 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 Clang warns: drivers/input/mousedev.c:653:63: error: implicit conversion from 'int' to 'signed char' changes value from 200 to -56 [-Wconstant-conversion] client->ps2[1] = 0x60; client->ps2[2] = 3; client->ps2[3] = 200; ~ ^~~ As far as I can tell, from http://www.computer-engineering.org/ps2mouse/ Under "Command Set" > "0xE9 (Status Request)" the value 200 is a valid sample rate. An explicit cast silences this warning. Signed-off-by: Nick Desaulniers --- drivers/input/mousedev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 0e0ff84088fd..816e2431bba8 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -650,7 +650,9 @@ static void mousedev_generate_response(struct mousedev_client *client, break; case 0xe9: /* Get info */ - client->ps2[1] = 0x60; client->ps2[2] = 3; client->ps2[3] = 200; + client->ps2[1] = 0x60; + client->ps2[2] = 3; + client->ps2[3] = (char) 200; client->bufsiz = 4; break;