Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5658756ybi; Sun, 21 Jul 2019 00:07:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyH/HhMdy41bbLOFDCIqVQVPVHSLjTzqjITfkI/H74QYZlKfZ/Ny7IEI8oaIJZs5fnOnq7C X-Received: by 2002:a65:4507:: with SMTP id n7mr62433179pgq.86.1563692875592; Sun, 21 Jul 2019 00:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563692875; cv=none; d=google.com; s=arc-20160816; b=Lzwi9vToAbuCyuNfyM+6t+JoStGpGXKsAu5oRVdAyIjZlwTJikzQ7GkyO0nvvH2/Sk mQ6KooJastlaveVadEk1t3xjuYuzkgexV657DXWjlbiZVqv7u3p4emMeVUNd4yKD9QKf A/8zhRqdY8sgOQh5JkoTGW+KEZV/5/pUhBCNWPl1vOhv20Z1a4I1ovfGodIkwiTBu+O7 pyAO6QuBnkYZQ2lGB07mbAOG2Cdd8um0GNzo6iL7GO+dvto4l5hy5U6h12eIHYb9/Mm6 o1YkC4OR2KiAsU8T/vJM9mA/xjHDdqZWgnXj29cqBotrF6SWpUEIQvwsijeqhTZugGuV Pi9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-filter:from; bh=QAAeQfn+GT6Ycdym7bMgSNGzFQaVDEpmXwaV8KE6194=; b=VIv/TWUkbB+LFM5OulzR61/HmjEyo0L9OMaqk8YjBL8wjk9CXD+15yTH3O/ka6xzx6 VxmA8NkYHzWfb7LqFI6LdFtYwfd+Rg5Hlw3PKpxDRZmiFAhmWdTYssFj4mDyVZ8dCScO uBeZ+wnlVFRXo7iU/LtaJjgiNleurG9fxfXmxsTKtBcxKffrQRXWv9Vc4fgmiln3wrF3 wMxEWvM70/UtRZizexo3eMRpfh7EAlso7mjOVjQKhKGDTNT0x3fhNcD40fNCskp9EmBK 6GC7HkECk9o8zJo+BBO0zIdgjcihil0vjM1IzSKSAIt/IqNkMGIJvRsF8LeSJGDLb4Zr jo9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@innovation.ch header.s=default header.b=W235MJOV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=innovation.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184si8383694pgv.566.2019.07.21.00.07.39; Sun, 21 Jul 2019 00:07:55 -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; dkim=pass header.i=@innovation.ch header.s=default header.b=W235MJOV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=innovation.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726285AbfGUHGf (ORCPT + 99 others); Sun, 21 Jul 2019 03:06:35 -0400 Received: from chill.innovation.ch ([216.218.245.220]:35958 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbfGUHGf (ORCPT ); Sun, 21 Jul 2019 03:06:35 -0400 Received: from localhost (localhost [127.0.0.1]) by chill.innovation.ch (Postfix) with ESMTP id 538F9640132; Sun, 21 Jul 2019 00:06:35 -0700 (PDT) X-Virus-Scanned: amavisd-new at Received: from chill.innovation.ch ([127.0.0.1]) by localhost (chill.innovation.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 42i9o8faoQmI; Sun, 21 Jul 2019 00:06:33 -0700 (PDT) From: =?UTF-8?q?Ronald=20Tschal=C3=A4r?= DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch 649CA6400F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1563692793; bh=QAAeQfn+GT6Ycdym7bMgSNGzFQaVDEpmXwaV8KE6194=; h=From:To:Cc:Subject:Date:From; b=W235MJOVlkP7VEVyIxeTch6ECmhHCHZadnpji9tlc+cqxloUjp1eOBq4LnZuR1KQf 7l9vT16vF023HYuDUzbyyNitlXm+2Sc8ii7oR7rDzb/CeJOVVBJgfaW7Kq0rq7mRMi fvmLGK1eWXtXbuohYmWJV7DwtVFS0z+mT/bX8IbkMnX42MCX8il8bQgXAjim2hW0Zt iAAfixEm80olXHLY/YQ4/HkwB1xQEIhzn4G74sjUps0M56xnvBo/1Fe8lnN1M+rvUm /DyL+5g7ldp3d+7RPb4R8VMNf4MRqzwAahNHlSJ4ew2JmIgKeaxEVDfbkddvdDRMZ9 fL9J/C9Too7yw== To: Dmitry Torokhov Cc: Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild test robot Subject: [PATCH 2/2] Input: applespi: fix warnings detected by sparse Date: Sun, 21 Jul 2019 00:06:29 -0700 Message-Id: <20190721070629.24932-1-ronald@innovation.ch> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reported-by: kbuild test robot Signed-off-by: Ronald Tschalär --- drivers/input/keyboard/applespi.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/input/keyboard/applespi.c b/drivers/input/keyboard/applespi.c index d5defdefbc34..00cd8dccd4f5 100644 --- a/drivers/input/keyboard/applespi.c +++ b/drivers/input/keyboard/applespi.c @@ -998,10 +998,14 @@ static inline int le16_to_int(__le16 x) static void applespi_debug_update_dimensions(struct applespi_data *applespi, const struct tp_finger *f) { - applespi->tp_dim_min_x = min_t(int, applespi->tp_dim_min_x, f->abs_x); - applespi->tp_dim_max_x = max_t(int, applespi->tp_dim_max_x, f->abs_x); - applespi->tp_dim_min_y = min_t(int, applespi->tp_dim_min_y, f->abs_y); - applespi->tp_dim_max_y = max_t(int, applespi->tp_dim_max_y, f->abs_y); + applespi->tp_dim_min_x = min_t(int, applespi->tp_dim_min_x, + le16_to_int(f->abs_x)); + applespi->tp_dim_max_x = max_t(int, applespi->tp_dim_max_x, + le16_to_int(f->abs_x)); + applespi->tp_dim_min_y = min_t(int, applespi->tp_dim_min_y, + le16_to_int(f->abs_y)); + applespi->tp_dim_max_y = max_t(int, applespi->tp_dim_max_y, + le16_to_int(f->abs_y)); } static int applespi_tp_dim_open(struct inode *inode, struct file *file) @@ -1653,8 +1657,8 @@ static void applespi_save_bl_level(struct applespi_data *applespi, efi_attr = EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS; - sts = efivar_entry_set_safe(EFI_BL_LEVEL_NAME, efi_guid, efi_attr, true, - efi_data_len, &efi_data); + sts = efivar_entry_set_safe((efi_char16_t *)EFI_BL_LEVEL_NAME, efi_guid, + efi_attr, true, efi_data_len, &efi_data); if (sts) dev_warn(&applespi->spi->dev, "Error saving backlight level to EFI vars: %d\n", sts); @@ -2027,7 +2031,7 @@ static const struct acpi_device_id applespi_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, applespi_acpi_match); -const struct dev_pm_ops applespi_pm_ops = { +static const struct dev_pm_ops applespi_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(applespi_suspend, applespi_resume) .poweroff_late = applespi_poweroff_late, }; -- 2.21.0