Received: by 10.192.165.148 with SMTP id m20csp2451273imm; Sun, 22 Apr 2018 07:19:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/2Xv+v/gwpBmRgiDQ7GZF/8eQHvFVOSQKQ3mfjCRj4ZzlJVTqzVKY5erhbLDomlsbgUgjQ X-Received: by 2002:a17:902:9042:: with SMTP id w2-v6mr17408527plz.34.1524406771827; Sun, 22 Apr 2018 07:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524406771; cv=none; d=google.com; s=arc-20160816; b=rXXHwlTXeTeJ7DBRKC4zdjjaCqKz5/cmYNBnyXPsEpxZM+cx2au1iYqeBO4SAPtSc0 v6LN5VPT4+ZMJDQeX1YC7o2YEGRkzYxODugjcLrwO3Ohs7jI9M7zkzz4eII9SHmUbwPm dxsA9BjfCEWA+5sVmEz7gsNz0lanm2DPPx7bJ5L5hrnY0DtECT69cUkjooWmit5612TY mRzM6GksVqnKCdfTTp8U0w6FgfHKmhI++tDYLxyEaVOUffqMxLRkYlc9llDS8yoossl/ fT5jhvK5uX9+vYRcW987FKgxdd9wrIFdPa6zIz6vjWAWiZ0Emi0YKHtVIdyHlnEAXZSl GiIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=nqBNOqoQhFUBvRmjJvPCSM1qO5pn2ohT1Itoe3QU89I=; b=zXnvx6n+4FNfmCqXcj1pByRcK+s4auPJ8af1Y+r7RuOLn/PFb4H/KUAfsapsrCFPlz HOGsDVs4VXEbWcx1JYBq/nUgDMa+e8T6SbX9T7jH9y62ejGqt8dKKIAWu3KuKDrWUTbU SC5PeuLwVPruxVAXDZH9d+WMHhwyPORPTFE4AseR7wbpFxXykzr4O+O8n/OmWTpNfzZD QKSBg2KJ/qK6oo7QoQero3rL7CTiATwVLhC1BF9rCmZjSDHsC6itbOL0HLzzRbgKIrPq VDqN+uK7Ql4vf/Ib4W7SRn36bb81hrPoQ/a4BR2NFMiIRyyadj6/uMgAvasTIIEeCnF2 n8Zg== 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 h10si8199756pgq.514.2018.04.22.07.19.17; Sun, 22 Apr 2018 07:19:31 -0700 (PDT) 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 S932401AbeDVORH (ORCPT + 99 others); Sun, 22 Apr 2018 10:17:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57892 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932380AbeDVORB (ORCPT ); Sun, 22 Apr 2018 10:17:01 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 76C9DCBF; Sun, 22 Apr 2018 14:17:00 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaron Ma , Jiri Kosina Subject: [PATCH 4.4 43/97] HID: Fix hid_report_len usage Date: Sun, 22 Apr 2018 15:53:21 +0200 Message-Id: <20180422135307.717270442@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aaron Ma commit 3064a03b94e60388f0955fcc29f3e8a978d28f75 upstream. Follow the change of return type u32 of hid_report_len, fix all the types of variables those get the return value of hid_report_len to u32, and all other code already uses u32. Cc: stable@vger.kernel.org Signed-off-by: Aaron Ma Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-input.c | 3 ++- drivers/hid/hid-multitouch.c | 5 +++-- drivers/hid/hid-rmi.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1258,7 +1258,8 @@ static void hidinput_led_worker(struct w led_work); struct hid_field *field; struct hid_report *report; - int len, ret; + int ret; + u32 len; __u8 *buf; field = hidinput_get_led_field(hid); --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -314,7 +314,8 @@ static struct attribute_group mt_attribu static void mt_get_feature(struct hid_device *hdev, struct hid_report *report) { struct mt_device *td = hid_get_drvdata(hdev); - int ret, size = hid_report_len(report); + int ret; + u32 size = hid_report_len(report); u8 *buf; /* @@ -919,7 +920,7 @@ static void mt_set_input_mode(struct hid struct hid_report_enum *re; struct mt_class *cls = &td->mtclass; char *buf; - int report_len; + u32 report_len; if (td->inputmode < 0) return; --- a/drivers/hid/hid-rmi.c +++ b/drivers/hid/hid-rmi.c @@ -110,8 +110,8 @@ struct rmi_data { u8 *writeReport; u8 *readReport; - int input_report_size; - int output_report_size; + u32 input_report_size; + u32 output_report_size; unsigned long flags;