Received: by 10.192.165.148 with SMTP id m20csp2481565imm; Sun, 22 Apr 2018 07:58:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/qY6NRMLh5/XgfxyQb17Tg9lW68vwH5MKmw79U5HWJ6U2S2W6C8062b4hf0nLzMWGtyq4s X-Received: by 2002:a17:902:be06:: with SMTP id r6-v6mr11826164pls.158.1524409106177; Sun, 22 Apr 2018 07:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524409106; cv=none; d=google.com; s=arc-20160816; b=PyokObxmVX1d+QpUlVYw3M3xozntxXO/2MhWSlea6AtKMPgBa8coTL9UncEf7Pa+9G aa2qADhHMvFuxN1y87m/NhDVDuah2U9jupqUNyajEyQoGbBDekF72UreKE3hMC+GBjb0 uCHwl8UaNvVAi2PZrIQ4Jhuzu78EFj6mhhTDmBoJGvTmHVZBLhGqsbt8qxbzIB4NfQ+m 9qvG33uIrWmFhbaCUdnB8Bwp0877DEZWRMM9MLWeY11AVZSr5z5S7ruMbwJBtDZ3VeQd UPh5nBI9opprDWlMZLa9sVXsfqdtvpwsh0nSbWa6z75WEfhGb/m4FZdR7aqETnxXcp6F wyfg== 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=c+4iLz8nd29WjlmEWXRHKKLp9MhZphD10+By3fjAjiU=; b=NGp+OSPHujKvKr7zeVk+BRKwfZAzuqybNwBfPcwdfZ9FcVqWUcOkeU0fsc/ibKfQqZ UPCbgdgWcKCsi5ZXIwUqkX1uuxxzjNsSZjkHdn/Sk5gY8wnoSHKez3lL0BKUTuSi27on vRfG4nwEAW9zSEStDypVznMCaA+orfjonj0yEJkmvuvMBbdxEQP/UlDmmBQkTC0/oqkV A4OBSGusOQ2wIjfV0aUszmdZoMAFYj2KifYkjfZDsfiL8ovrl7A6nrKhwh5EHazqHnwm ZZnIKiMryKyPX/rTy1EELg+heYcDdWgZR0bDWk/xpbVSHL4WPtyMmQNnu5wLEtjjCmp6 ilvg== 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 g3-v6si10194666pld.309.2018.04.22.07.58.12; Sun, 22 Apr 2018 07:58:26 -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 S1757221AbeDVO5N (ORCPT + 99 others); Sun, 22 Apr 2018 10:57:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55826 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756879AbeDVONh (ORCPT ); Sun, 22 Apr 2018 10:13:37 -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 1F048CE9; Sun, 22 Apr 2018 14:13:35 +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.9 28/95] HID: Fix hid_report_len usage Date: Sun, 22 Apr 2018 15:52:57 +0200 Message-Id: <20180422135211.597987696@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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.9-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 | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1279,7 +1279,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 @@ -315,7 +315,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; --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -351,7 +351,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)