From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbdHXIq3 (ORCPT ); Thu, 24 Aug 2017 04:46:29 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:38314 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdHXIq1 (ORCPT ); Thu, 24 Aug 2017 04:46:27 -0400 Date: Thu, 24 Aug 2017 09:46:23 +0100 From: Lee Jones To: Arnd Bergmann Cc: Tony Lindgren , Roger Quadros , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: omap-usb-tll: fix register offsets Message-ID: <20170824084623.54d3iim56yqvgc4z@dell> References: <20170823144501.2292044-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170823144501.2292044-1-arnd@arndb.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Aug 2017, Arnd Bergmann wrote: > gcc-8 notices that the register number calculation is wrong > when the offset is an 'u8' but the number is larger than 256: > > drivers/mfd/omap-usb-tll.c: In function 'omap_tll_init': > drivers/mfd/omap-usb-tll.c:90:46: error: overflow in conversion from 'int' to 'u8 {aka unsigned char}' chages value from 'i * 256 + 2070' to '22' [-Werror=overflow] > > This addresses it by always using a 32-bit offset number for > the register. This is apparently an old problem that previous > compilers did not find. > > Fixes: 16fa3dc75c22 ("mfd: omap-usb-tll: HOST TLL platform driver") > Signed-off-by: Arnd Bergmann > --- > drivers/mfd/omap-usb-tll.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog