From patchwork Fri May 26 15:34:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 9750701 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 5FDF260209 for ; Fri, 26 May 2017 15:34:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5073027F90 for ; Fri, 26 May 2017 15:34:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44FDF283DA; Fri, 26 May 2017 15:34:49 +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 CCC3D27F90 for ; Fri, 26 May 2017 15:34:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162059AbdEZPer (ORCPT ); Fri, 26 May 2017 11:34:47 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33224 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967805AbdEZPeq (ORCPT ); Fri, 26 May 2017 11:34:46 -0400 Received: by mail-pf0-f196.google.com with SMTP id f27so3575745pfe.0; Fri, 26 May 2017 08:34:46 -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:in-reply-to:references; bh=sTrV672/nSRbOgGCV6QwCqqf4fHnORytBz9a+MmLrVE=; b=bmPCHMqc56vIr0k1C3+KIG5BxdlPJchIFX01mV/s9OaukoeeNNysOf1PEp9/7aw6ty ZHqQpwP+qQjw1xiiEnuYw8/PjOlUrbhNzIQq6qt2dFK458yCW+8C8lBKNo+4H0rdRND1 MyqAxltOilutnRNi5JGF86QBoplIjJoR065vOGomnO1FxuDaX9zZk1DC6ixEWJS1xhfP 2H+qVaQiBYHQPA+K76NY/TOCcaJWgV8evYHcFOEgIvoglaYNRtQOUo2Sm/owRj65TrO2 WdxkB72zsCwQNV6lWDkQoMV4mXFlwq1QVjkxmE8F10oS4Gngp01CVxL61IulWik6fcEw n3Lw== 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:in-reply-to :references; bh=sTrV672/nSRbOgGCV6QwCqqf4fHnORytBz9a+MmLrVE=; b=Ypd41CRpOO4CM8Xotd4wkSwspDfGQaCvX/u/l4gpBa2qfFRl8RrsnnMmCNA5niUbZ1 A29VtLwtOXxQ4+N4EHUL+t0UxpPkXSasOaKw+RriMsJGi+iMoDoYzx+c+5WcBCEcajtL V6C02bkAFkQLojMWzyWGB8YfkUsCOoUY5S+GN7FBU7soPFTNoCqGMjZsaDy7FR+8+Vg3 0pA9qd5gtTOxhIICrdF/NiCx5SkXKQnTsAlbDfMnIm2CPDpIKxoE2/tMMg3Q4sfgogAX 6JctCdzltWuWNN1/8c14zun3UiUixJUF7pQo04yNgIDr7tGA7w7XPY8sxBzK7bB0iLqx PpAw== X-Gm-Message-State: AODbwcClMyrRM0eDh3oW/NakpbmKA2gAO1czR7e5TPq0QlkbqcTJth7T wNGA0K7UnL7fAjThZ7Y= X-Received: by 10.98.42.7 with SMTP id q7mr3089582pfq.165.1495812886000; Fri, 26 May 2017 08:34:46 -0700 (PDT) Received: from localhost.localdomain ([2601:647:4701:31a:320e:d5ff:febd:81c]) by smtp.googlemail.com with ESMTPSA id s63sm2288408pgb.40.2017.05.26.08.34.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 May 2017 08:34:44 -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 v2] Input: mousedev - fix implicit conversion warning Date: Fri, 26 May 2017 08:34:27 -0700 Message-Id: <20170526153427.7830-1-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170526052217.30624-1-nick.desaulniers@gmail.com> References: <20170526052217.30624-1-nick.desaulniers@gmail.com> 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. Using unsigned char, rather than signed char, for client->ps2 silences this warning. Signed-off-by: Nick Desaulniers --- * Changed from using an explicit cast to changing the signedness of the declaration. drivers/input/mousedev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 0e0ff84088fd..c83688eb2ef4 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -103,7 +103,7 @@ struct mousedev_client { spinlock_t packet_lock; int pos_x, pos_y; - signed char ps2[6]; + unsigned char ps2[6]; unsigned char ready, buffer, bufsiz; unsigned char imexseq, impsseq; enum mousedev_emul mode;