Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5705168ybi; Sun, 21 Jul 2019 01:02:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxy3BkFwOsw/b+Q2xmxR8XyVX0CxVKsZKaAjjg5YpWyCTVbv/GS+uDN1dlfK1Rw/n5LnEh X-Received: by 2002:a63:f401:: with SMTP id g1mr66873749pgi.314.1563696168788; Sun, 21 Jul 2019 01:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563696168; cv=none; d=google.com; s=arc-20160816; b=LsHlSaLLImqLFrPMoDy2L2Ttn/x+p0Ic49P08kqYVjIuytCu3iIsI723yR7ZFAXlo9 3EbAVdWh14LFO5yevcs6peVvCg+XqvaA6wKPqxxqRlr/CxhHWTOl5I4v+nGFFOt6pKGN JQSdJgLilNuOR8Ob0U5GKG/SVmsiFGDnqX8/YuyGdILiwQyAS72GbxglqnwDiDBtXbZM qOlVykF+KV6KPmGrLA4xvUWz+3XvhffmpfM2sYAieFZzEwHeO+fE5KgKx/LDz7QdIQi4 oYFgdoTvwWopF+QXXwFi6rEWA0l+fpcneWr7ff310HmadcNRZjT9iwHwg3x8oNIn9bXM 8nEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:dkim-filter :date; bh=85s/Zwul/fllYig0yNhV92XVaSDlTwg2Bq4gJ/UTtl8=; b=1BfdqGs6o5o9VwWP8+xLNiIOCCHXAiqXeO6pfvHXuNndey7g+WNZmAXWGzZxI/fz6M i3ScE04n4zQcxdeO0lqg4JtdFwf/5Lrw7aHv/SZ0G4nMXjcu4GF8gBwa86NjrsNpDxQe 38IxXhrm1Yv1JBZYpIYRYgwbuztXTvAAOL1Ljz/lVm0BRMiOCU8ME+aV2+kMKX3h0xYL JLkWP8vpx91POGxaP2ZgtzsVXfu5qLlzt+VNPrFGPb9RtNkeBtChMgN5Tn20jSLFJdkw NFB3+4AB8aLkX8kjHyEfHqs4YuBGgcS0A9YWSeOMlb367p6XdYQI9EpK/9vMinEEtcoO 4Z1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@innovation.ch header.s=default header.b=fP7x5e2s; 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 c1si7106163pgp.105.2019.07.21.01.02.32; Sun, 21 Jul 2019 01:02:48 -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=fP7x5e2s; 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 S1726413AbfGUH7T (ORCPT + 99 others); Sun, 21 Jul 2019 03:59:19 -0400 Received: from chill.innovation.ch ([216.218.245.220]:36404 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfGUH7T (ORCPT ); Sun, 21 Jul 2019 03:59:19 -0400 Date: Sun, 21 Jul 2019 00:59:18 -0700 DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch CA36E640132 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1563695958; bh=85s/Zwul/fllYig0yNhV92XVaSDlTwg2Bq4gJ/UTtl8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fP7x5e2sS9tvJxTTLCvHjpMXKjF2lozHDuMCc5DiWonTcInZk4dhNPmGW364IgfTa g4xzYtprETX4P9Kp1Bh4nqfz4crB2bJ93iaPS5H5KLB/e9UYHFgXcqs2phu1XIZ1LT xJEzVLhceaHHOo2VTrx/sIQNJyNsHxmpX1sNeO3r0Veez08/5OtYORLfHMShSuDXDS NOUp1xorXI9w9XYmdJFi/Px/2l4flpMtkVvKSnSdNmYdrEX7AbvgVvCqfkAWO+54QZ zbgYg+Ozu/qtTp974jcQpXvQumIAAze/HZ0z0tVsjZA7+5fzS3ClcwQ7imiZyKkyrr gukVp+qnuh+KA== From: "Life is hard, and then you die" To: Dmitry Torokhov Cc: Federico Lorenzi , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild test robot Subject: Re: [PATCH 2/2] Input: applespi: fix warnings detected by sparse Message-ID: <20190721075918.GC7992@innovation.ch> References: <20190721070629.24932-1-ronald@innovation.ch> <20190721072427.GB607@penguin> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190721072427.GB607@penguin> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Sun, Jul 21, 2019 at 10:24:27AM +0300, Dmitry Torokhov wrote: > On Sun, Jul 21, 2019 at 12:06:29AM -0700, Ronald Tschal?r wrote: > > 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); > > Should we also make tp_dim_* u16? Then we won't need min_t here. abs_x/abs_y are actually signed values and sometimes negative, and hence tp_dim_min_* are negative here. But we can just replace the min_t/max_t with min/max, since both args are now int's. Cheers, Ronald