Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3803338pxj; Tue, 15 Jun 2021 09:00:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr+Fb2rHOfXriRZ9zR/SgpPAAKa1lN8P8MtNnCuc8wVQVlrXLG1KIvTK2G0A4RdPoUSG6b X-Received: by 2002:a05:6402:4242:: with SMTP id g2mr150692edb.350.1623772810225; Tue, 15 Jun 2021 09:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623772810; cv=none; d=google.com; s=arc-20160816; b=w1nncRzdzodaoQ+8PwhDAqxYJgO2Giewxxne9rOvCzXdDTVc2I+q2WaDkDU7o8UTdu DA2nuvdi7GhBMXP2lgnY+gGMsY+WKFgg26tw+aw8YLyKGDUs44auBax6qgxeMIFJNpL1 1C5uJLOJxc1p65Aov7qdmcBK92RwMCdiZgCyRi8dHIrhzJ7V1Jpwf4dxVJcD7HwCyU/r jvCaum/h0WXeRs0MsxsAelgybtz5LOcHtemcOemH32brC8o/SFpbCISbktI2YaRX59DF cdTjM5wzlp9nGOcDMlhP+JZgw2GxI8QbgIYazCDyRWJ70iEFl//uHbSQVeLGnSqM71Sf Gtlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oIfHH5jrHi8DbKdjrE8E0089Mck60hZSj02X0gYqSYA=; b=thQG059DCI7KbfyLjmhguh0cSR6jXq5wFmfq9zKwcrzLKrxz8jW9XgR6lhEIDlletc S/GCfsPtyJv5L50JUFC/mHhZYmNbswG3CCetvl2WSx10bkOTody/08chHaWtU8S4YUG3 DwiHKQf2vDgONtOWEb+3b7ldS9IEPiNTk7OZfDSIYWsoohwNOkhmQEFehY+ldwa+4D6i Dau9AMGDVdPrHk/lhVJ1NVu4A7semYuXAtk/L5a5SPxEwOkq72qaBev1lO6mtPhgeDok 9jeTISUkuVAvI1HynYH6uvZkwUAbm4Gq3K8JWcRv6YhOCpJ0KJSe6kYSOTicIwskpqU+ togg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRN0TvT2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba29si229951edb.601.2021.06.15.08.59.47; Tue, 15 Jun 2021 09:00:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRN0TvT2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232623AbhFOP6a (ORCPT + 99 others); Tue, 15 Jun 2021 11:58:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:47178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232487AbhFOPyy (ORCPT ); Tue, 15 Jun 2021 11:54:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 91927616E8; Tue, 15 Jun 2021 15:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623772328; bh=X4/fijOZ9/3izQDc5j7ytcyZyRdhEKKqy9AOwSlb6EU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jRN0TvT2KSWnReJoT7pjBtahAe020jdM+lSTmN2gk+ZclELca/kx6tgE7QTbC1oar 5YqbrvUxbfowngIDAE6+0UZ46/3Fesq3sHK3s0ML8NZHKuOt9N8fIZhbT0Yq6WL6i8 rzP2zDQeKbMhoP1Zos8p7sL3hXXqIzLaqJDeXXqA= Date: Tue, 15 Jun 2021 17:52:05 +0200 From: Greg Kroah-Hartman To: "Maciej W. Rozycki" Cc: Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] serial: 8250: Fixes for Oxford Semiconductor 950 UARTs Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 04:19:03PM +0200, Maciej W. Rozycki wrote: > On Tue, 15 Jun 2021, Greg Kroah-Hartman wrote: > > > This patch series causes the following build warning to be added: > > > > drivers/tty/serial/8250/8250_pci.c: In function ‘pci_oxsemi_tornado_setup’: > > drivers/tty/serial/8250/8250_pci.c:1258:32: warning: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘-129’ to ‘127’ [-Woverflow] > > 1258 | up->mcr_mask = ~UART_MCR_CLKSEL; > > | ^ > > > > > > Can you fix this up and resend? > > I've seen that, but that's not a problem with my change, but rather with > making this macro (and the remaining ones from this > group) expand to a signed constant (0x80 rather than 0x80u). As your change causes it to show up, it must have something to do with it :) > I can fix the header, but that would be a separate change, and mind too > that this is a user header, so it's not clear to me what the impact might > be on user apps making use of it. You can not change the uapi header, why would you want to? > We could use a GCC pragma to suppress the warning temporarily across this > piece of code, but it's not clear to me either what our policy has been on > such approach. What pragma? > Thoughts? Why does your change cause this to show up? > NB casting UART_MCR_CLKSEL here to an unsigned type does not help as GCC > still sees the original constant through the cast; I've already tried that > of course. > > Last but not least: do we need to have this warning enabled in the first > place? No idea, but that's a different discussion, with a different group of people :) thanks, greg k-h