From patchwork Sat May 7 19:59:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clifton Barnes X-Patchwork-Id: 9038451 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95A92BF29F for ; Sat, 7 May 2016 20:01:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E342220166 for ; Sat, 7 May 2016 20:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A009B20122 for ; Sat, 7 May 2016 20:01:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750954AbcEGUBa (ORCPT ); Sat, 7 May 2016 16:01:30 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:33536 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbcEGUB3 (ORCPT ); Sat, 7 May 2016 16:01:29 -0400 Received: by mail-io0-f195.google.com with SMTP id x35so15450454ioi.0; Sat, 07 May 2016 13:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YNEB1lDGU7jxm7LDAfjGDEKUYyCbiiKM96IaZw1MqDo=; b=FW9bpYd6uwoPKO27Va3oVru8mS6eCA87WqpzJBoxnGBNqXQO1l5C5KYQAGj2Wmi74X UeAVk6BoAkBEunWZGCNJq+TJFbqnGMREU5iR9zTGgxrn51Vs/YcocwQKUYLDgLKGkpyu JKJKbRO+C+m9dl11Y9iJc/a2/jrtVU245fEbANtD2TvdtxaKDh5dbxXCyxDwVw4GFx+/ lR7KEf5iDjrxY0ZBqVLCuhCEluhGWCSY8tNfMhJoG9PkHGb00e+c65BbKJdKxIlF/5P0 FaVHbjZ2ATYYLk5bveNFuHqJdPTR+gwihJXJHZ+6opGHuByopkiCEziodgO+Icn8LwbX Dt/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YNEB1lDGU7jxm7LDAfjGDEKUYyCbiiKM96IaZw1MqDo=; b=U7dL2lGeA9MrwEWe/F1g/4vdIaKEV2sT0pePbYl5TKdq1iC8fBP7mDD6BupgiFJHCH Xqk8ayG0uYU5kPS7/GgS3mZvuSuWmgg24XQRnAUk+obU6Gl2Gb6vkoLq9l4P/7wtG54b 6LYAoFWY14IyqjvChnC8EQylvPimqvJ0Jw3p2ckCSL/ri9u+wwQA0erGbTNFq1StNZlk sPCW8fy4ftIvStXW8x/i0bZa+2QLE2fSgTvJu/p7eWzf+cHwvv6fQcdp1emKu7KGDzMe viZ7e0bUyGFLsYtHX/ACHdr/sqOP1RJDQYXxYCVdH0fP7oWc4yiUenXqpKhQ30G3Wsvt acZw== X-Gm-Message-State: AOPr4FVan8Elh7nRalNS7iC1xWvnUbVdglRW3DGL6F39udkWkjp8eWU7NpRVJdbCB+nvcg== X-Received: by 10.107.164.163 with SMTP id d35mr30786324ioj.80.1462651288254; Sat, 07 May 2016 13:01:28 -0700 (PDT) Received: from localhost.localdomain (c-73-168-181-206.hsd1.in.comcast.net. [73.168.181.206]) by smtp.gmail.com with ESMTPSA id a94sm9773565ioj.11.2016.05.07.13.01.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 07 May 2016 13:01:27 -0700 (PDT) From: Clifton Barnes To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Clifton Barnes Subject: [PATCH] Input: rotary-encoder: fix bare use of 'unsigned' Date: Sat, 7 May 2016 15:59:18 -0400 Message-Id: <1462651158-27929-1-git-send-email-clifton.a.barnes@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned'' Signed-off-by: Clifton Barnes --- drivers/input/misc/rotary_encoder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 96c486d..c7fc8d4 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@ -47,13 +47,13 @@ struct rotary_encoder { bool armed; signed char dir; /* 1 - clockwise, -1 - CCW */ - unsigned last_stable; + unsigned int last_stable; }; -static unsigned rotary_encoder_get_state(struct rotary_encoder *encoder) +static unsigned int rotary_encoder_get_state(struct rotary_encoder *encoder) { int i; - unsigned ret = 0; + unsigned int ret = 0; for (i = 0; i < encoder->gpios->ndescs; ++i) { int val = gpiod_get_value_cansleep(encoder->gpios->desc[i]); @@ -100,7 +100,7 @@ static void rotary_encoder_report_event(struct rotary_encoder *encoder) static irqreturn_t rotary_encoder_irq(int irq, void *dev_id) { struct rotary_encoder *encoder = dev_id; - unsigned state; + unsigned int state; mutex_lock(&encoder->access_mutex);