Received: by 10.223.185.116 with SMTP id b49csp3188956wrg; Mon, 5 Mar 2018 16:07:37 -0800 (PST) X-Google-Smtp-Source: AG47ELveZIdHckdoeGreV7dJHp8Hr8WSFpGAUw0L5MijrN9SnFkj2HDgATUPAqEXp3Aok8GZaqpn X-Received: by 2002:a17:902:14e:: with SMTP id 72-v6mr14944856plb.280.1520294857833; Mon, 05 Mar 2018 16:07:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520294857; cv=none; d=google.com; s=arc-20160816; b=XTCWB9Htel8TyI6EI32E1khG4HiObTxbRRHhAJp96HGi/XX8vORpcsX0My0OmkeDy/ LlZK4bVt0O/e6W1eIk3aK27N8ZlEe4atNFvzpg89j9NDH3hN4ZPY8sxUuV4C8q7sWtkd MPo8LvFra/Sp0lsoEuErFl2miQqnKPTbSW3GQBcdLmxZEoQG7iXItzq76twuPXjlBBAt kxfIJJE4EE7TjEvXmAqOZsxgjqCF/IyP5xRgGef/r61r8QSWCsc8OMN2bKOT9IA6J9h6 ssn/lzQw72T3IXr1agTPgdATMQkFc98ia6h32pCJpTWfHkc5H0POd8RUrfaqXp+L/eZK tjyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=YFQgJW7sfjuxysN5FPnZ6+96y1P6BZQQP6/h9DIHeD8=; b=WVfI6YNoXSxLiz1rKTb9aMMpL8JYSeDG9kDARJf0WYJ7pZ3GTHl/v4w5N4W2S7aD3M LDgNVYWqx+uDlQstZIgItLUWUyN/fWs1eaxM8xBsMjyI/uA8ztKbzEpEiKFuIGDxzoZb W/YhDd1AlKw5Gvy93OLcXoUD4obhxtcCvPLASSisLV8qV7glTvrmgqNIu/3cI6jOPFDw UAGOJKsvl+uXVJLZ/3JdYB/SClA7yYJAxLjGB2lbzqiw11IgdhLbYH9RbU6vYtO6GmBy h6mGCO4PGcf5Yvt3nBC509xm6D9YIMYpyWcGbpVNxykaeXIGNWPXQZt5Vf8DBbjGjx1g kFPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n66si11028105pfn.16.2018.03.05.16.07.23; Mon, 05 Mar 2018 16:07:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932876AbeCFAG1 (ORCPT + 99 others); Mon, 5 Mar 2018 19:06:27 -0500 Received: from gateway22.websitewelcome.com ([192.185.46.234]:28046 "EHLO gateway22.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932243AbeCFAG0 (ORCPT ); Mon, 5 Mar 2018 19:06:26 -0500 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway22.websitewelcome.com (Postfix) with ESMTP id C6FAB91EC for ; Mon, 5 Mar 2018 18:06:25 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id t07deSZZ984eYt07deVT5o; Mon, 05 Mar 2018 18:06:25 -0600 Received: from [189.175.117.58] (port=46252 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1et07d-003xNW-D1; Mon, 05 Mar 2018 18:06:25 -0600 Date: Mon, 5 Mar 2018 18:06:24 -0600 From: "Gustavo A. R. Silva" To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] HID: hid-ntrig: use true and false for boolean values Message-ID: <20180306000624.GA2680@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.175.117.58 X-Source-L: No X-Exim-ID: 1et07d-003xNW-D1 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.175.117.58]:46252 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 7 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/hid/hid-ntrig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 3d121d8..43b1c72 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -591,8 +591,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, switch (usage->hid) { case 0xff000001: /* Tag indicating the start of a multitouch group */ - nd->reading_mt = 1; - nd->first_contact_touch = 0; + nd->reading_mt = true; + nd->first_contact_touch = false; break; case HID_DG_TIPSWITCH: nd->tipswitch = value; @@ -663,7 +663,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, * even if deactivation slack is turned off. */ nd->act_state = deactivate_slack - 1; - nd->confidence = 0; + nd->confidence = false; break; } @@ -679,7 +679,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, */ if (nd->w < nd->min_width || nd->h < nd->min_height) - nd->confidence = 0; + nd->confidence = false; } else break; @@ -758,7 +758,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field, if (!nd->reading_mt) /* Just to be sure */ break; - nd->reading_mt = 0; + nd->reading_mt = false; /* @@ -910,7 +910,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id) return -ENOMEM; } - nd->reading_mt = 0; + nd->reading_mt = false; nd->min_width = 0; nd->min_height = 0; nd->activate_slack = activate_slack; -- 2.7.4