Received: by 10.223.185.116 with SMTP id b49csp4301051wrg; Mon, 26 Feb 2018 15:06:48 -0800 (PST) X-Google-Smtp-Source: AH8x226N1iKCkCffdRU7OMdE6k1nUz/z5JhWNFNXOGkHKcSrVKRAsp56w3xtF1K912ILtLrfN8qI X-Received: by 10.101.66.1 with SMTP id c1mr9700412pgq.137.1519686408836; Mon, 26 Feb 2018 15:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519686408; cv=none; d=google.com; s=arc-20160816; b=WlSp5BNtXf2YpCrobcNVrWverVu8LRQQsFitkW+c5vM4dr3Gbtjr5HA/51dnAB6Vnc X0gc75SL4OMGgTOHAWRJqR0q2HwHKCcc1EmDJyHSUB5TxGQ0oEXoJ02qUIBsptxM7GuF 1LdoVb01+Od/+eJTYnNOI6SGHUrRuEpgj6RIybm9EJJ+IaacqGm77cQRGKue44Z9I6h2 yg9CmqvJbp9L0unlTHBWTpjkhBI0NopiHp4F/LSrnulgsf2MfRIu1FRXRXOxLpikwDLh 7aGaCzXAyAZ2/KCEgohlhe5TIMurywFmAyLO+NAyRH6iwxcwel0YnqsiKMt7egs1seLH v48w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=B3MAN203oCW8hP9A4MkZJSPwOSqkKhno3OduAhi0UD0=; b=L6zbO11d8e94DMgDDZJRzeUmp32Qs6tRdSN0l499Mams7BT7G05AiFe/VYCSGJDERy MAmZtAg8EtDKvodsICJgfBn/kJUWE30USRLdQ+aKfDUdsi3afl7NOyMOM9VKk16oyJzv schDtVwxjdmE2pZtY6VMVESe4Y9/mSHJCT2EvtPYF5yWU5sDiMkMdYNMt8Z5fwVENSod abeXc/mavs8Z+o4Ls36TNvJozztBoXRpF38nFT61UzQssl8oWTm5Clpok1b4G5gJLRjB /CVD3HVM39bdbq2+tQYTY6bN6xy9b6ywRLgtaZSO6Cwxy32XJHhZEi9oUWxc4zvKvz2r GsZw== 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 n6-v6si7362169pla.619.2018.02.26.15.06.32; Mon, 26 Feb 2018 15:06:48 -0800 (PST) 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 S1751827AbeBZXFO (ORCPT + 99 others); Mon, 26 Feb 2018 18:05:14 -0500 Received: from mxf98a.netcup.net ([46.38.249.138]:41071 "EHLO mxf98a.netcup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbeBZXFN (ORCPT ); Mon, 26 Feb 2018 18:05:13 -0500 Received: from [192.168.178.21] (x4d071a18.dyn.telefonica.de [77.7.26.24]) by mxf98a.netcup.net (Postfix) with ESMTPSA id 5208B140805; Tue, 27 Feb 2018 00:05:12 +0100 (CET) Authentication-Results: mxf98a; spf=pass (sender IP is 77.7.26.24) smtp.mailfrom=rabel@robertabel.eu smtp.helo=[192.168.178.21] Received-SPF: pass (mxf98a: connection is authenticated) Subject: Re: [PATCH 3/4] auxdisplay: charlcd: fix x/y address commands To: Miguel Ojeda Cc: linux-kernel , Willy Tarreau , Geert Uytterhoeven , Andy Shevchenko References: <9ec3c54c-f8fe-22d7-783e-8cf9862405bb@robertabel.eu> <20180225235432.31209-1-rabel@robertabel.eu> <20180225235432.31209-2-rabel@robertabel.eu> <20180225235432.31209-3-rabel@robertabel.eu> <20180225235432.31209-4-rabel@robertabel.eu> From: Robert Abel Message-ID: <1a02d35e-b87c-3751-eb1a-f3becee4aa6b@robertabel.eu> Date: Tue, 27 Feb 2018 00:05:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-PPP-Message-ID: <20180226230512.12154.97579@mxf98a.netcup.net> X-PPP-Vhost: robertabel.eu Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miguel, On 26 Feb 2018 17:49, Miguel Ojeda wrote: > On Mon, Feb 26, 2018 at 12:54 AM, Robert Abel wrote: >> + /* clamp new x/y coordinates */ >> + if (tmp_addr.x >= lcd->width) >> + tmp_addr.x = lcd->width - 1; > > tmp_addr.x = min(tmp_addr.x, lcd->width - 1); Had throught of that, too. However, it introduces a warning about type mismatch, because lcd->width is int while tmp_addr.x is unsigned long int. I didn't fell like saving a line warranted much bigger changes to the lcd struct. Regards, Robert