Received: by 10.192.165.148 with SMTP id m20csp2537806imm; Sun, 22 Apr 2018 09:06:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx49XfE28yK78cpyXfwvlAmuL8owYnO3Abtgx3AR54ZPf6CGZksB15aFoLIrQqBpf+cTjXCpX X-Received: by 10.99.165.10 with SMTP id n10mr14814459pgf.141.1524413187519; Sun, 22 Apr 2018 09:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413187; cv=none; d=google.com; s=arc-20160816; b=FKQ0kTzkSRLymeLXck9JDANeXHiISQz6P3ADeXk25Km7BXvi1knpc0EUVfN/52wZLI fdniRBFzJIA3nJF0sAsOzN6ugdmImoHteyOG4KhLZlYEK04ThWrKKzKMofotmG6QPPnJ 8gzre+SgRv0GkoFG4etZCuZikXLZMtS39JNYoREYJKVdTTA2XSQw4Mspg8vbMOfzkfpd Jammi+NHlPo3eGT28HVutOrzoLer0eCJCzeNkJNLtZAwgIcCn8vBX8QvzmEGVb4sQS2A qQd0k+wB5IRy5dw+J0M9mmJ3qG/sApmeeQRb+h6Sjss1RV8cN+k6RLVjAiWes8hixdfC lSJA== 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=dBe4lfii0w1rBIw6yguX6g8wuYPPQ4gZCB11X0ngEFc=; b=IajaZCo1Lwf5kOIOe8D3lOS6eYiVFYEq34rphiHm/oB/HKJJZBXpRiBEi08mV98y2M cmk7nkSFiysjspyVzYWcblxufB1pFQh6qUWBpIndR+e38KOArE32v838587krbGDrZ4V +GS81hJfzIGmjHWrVbYo0SopaRfCkxPMewCLaliLkQK3B8tM9Ir69EIuvfcaz511lgLP ob/ce34nPuntKd9NGofDub35P+kqk0gk7ajXVF7Iwq1kjSI7WupTmc163Pjkdq5iSTwR J5sKo4qL+90IQPEGMhkU4ByogMjYTni499ujuzZZPpBhQ0x8XsBYsEH7LRNOYK2FBIqB XshQ== 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 h185si9628827pfe.169.2018.04.22.09.06.13; Sun, 22 Apr 2018 09:06:27 -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 S1754184AbeDVQFM (ORCPT + 99 others); Sun, 22 Apr 2018 12:05:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45742 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753632AbeDVN52 (ORCPT ); Sun, 22 Apr 2018 09:57:28 -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 E9E6BCCB; Sun, 22 Apr 2018 13:57:27 +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.16 070/196] HID: Fix hid_report_len usage Date: Sun, 22 Apr 2018 15:51:30 +0200 Message-Id: <20180422135107.879534374@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@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.16-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 ++-- drivers/hid/wacom_sys.c | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1368,7 +1368,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 @@ -370,7 +370,8 @@ static const struct attribute_group mt_a 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; /* @@ -1183,7 +1184,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 @@ -89,8 +89,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; --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -219,7 +219,7 @@ static void wacom_feature_mapping(struct unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid); u8 *data; int ret; - int n; + u32 n; switch (equivalent_usage) { case HID_DG_CONTACTMAX: @@ -519,7 +519,7 @@ static int wacom_set_device_mode(struct u8 *rep_data; struct hid_report *r; struct hid_report_enum *re; - int length; + u32 length; int error = -ENOMEM, limit = 0; if (wacom_wac->mode_report < 0)