Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934008AbbLVWHu (ORCPT ); Tue, 22 Dec 2015 17:07:50 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:56941 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933906AbbLVWHt (ORCPT ); Tue, 22 Dec 2015 17:07:49 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 2/5] crypto: sunxi-ss: fix min3() call to match types Date: Tue, 22 Dec 2015 23:06:58 +0100 User-Agent: KMail/1.12.2 (Linux/3.19.0-27-generic; KDE/4.3.2; x86_64; ; ) Cc: Andre Przywara , Maxime Ripard , "Chen-Yu Tsai" , Herbert Xu , marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe , linux-crypto@vger.kernel.org, "David S. Miller" References: <1450787267-26836-1-git-send-email-andre.przywara@arm.com> <1450787267-26836-3-git-send-email-andre.przywara@arm.com> In-Reply-To: <1450787267-26836-3-git-send-email-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201512222306.58681.arnd@arndb.de> X-Provags-ID: V03:K0:QTgW3KaSJ2gIeD2Je4u2J7/gwqINrhNxxa7GwPwXlDvrSMccUzy BihwTMTLJ/g8FrYJnffZgZAQ+7vikL7FFh9knSVpQzPGaNRCMp6LkchWxH12x5RT/+wte9g 0/R2BAlwSd8eIA9rT221iIh/i5cUaot8k9yulo0NYS+eIKT3sCtrWn0tBKcIgeDv/JvmrTV GvzmP7MAdPWVBDJj7jZUA== X-UI-Out-Filterresults: notjunk:1;V01:K0:MEaeLvZK1XY=:6wW5Ve+gNoi6zu5jAXCbgq ekRW66Vg6CCB0G82MTF+/LTpCkNLZa9w7XNtinllI1r+qC+mKwa5anqPmSfjJdv5rKYWHOJSB /aDXSULDVWjsnyzbpde1bTxxld3GQyePT5AKquyu8ySd1eH6zGM+E8E0PcZ2vx1gDitALGqgv NG4VjY863fCMv8U/Mqkm1Mlk0fmMnCm3jZbiqiHV+jUnMSJDrcPVyrCQy2NqURWzk2G+IN/Lw 9kAmLX/E+XL20//D169mTsnzHFS1fR1IQ608zpm68rhnAUwF1nXhQoiwW/Qo439Bk1+AQEgbI 2QBwEkXZkeiF25+5E40iioxAi982rcSisYaCkgaf7tzMkD3TZkbGhK8QlmJ0kES2wt4gcHdk/ f+Rb6yG4x0hlUZZXnV+l6PpZLWrNJ2WorI9QTeyf/M9RAUE55bQ5hzSMXbQuL3+LJXxRExO+f JKolMZoDYGQou+ako6Zdh2X0RRRzIm+bfsQwLqnX67Cq1rj80ZQNRZ60GK/5xqnHaEfWmPX+l flLrm+jhBZFpuSQgxm/vrMJUJZmNSM0LF76ZX3uIlg1QQrgCnoJbb50crgXR/KCIMO6hkE4ol fMuF/89iTdlXXL5dh0wKZQNISZEtOIMMW/0ssfJ7VAwVRUyUqPw/rEKreuKIdraxnWlSBcbht rzhKUdexgrcSsiUXTWD6h7JIa4P3z7fwC9RjHV9WKJj6xwkqZwMq3OM9yWC4xbCmBfQodyxOv yA0a6OAEa4N/DGfA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 784 Lines: 18 On Tuesday 22 December 2015, Andre Przywara wrote: > The min3() macro expects all arguments to be of the same type (or > size at least). While two arguments are ints or u32s, one is size_t, > which does not match on 64-bit architectures. > Cast the size_t to u32 to make min3() happy. In this context here the > length should never exceed 32 bits anyway. > > Signed-off-by: Andre Przywara Looks correct, but a bit ugly. Could we avoid the casts by using temporary variables to keep the size_t based data? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/