Received: by 10.213.65.68 with SMTP id h4csp207206imn; Wed, 21 Mar 2018 16:32:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELu+1r0ilavf80sXzCnw8GJpRr2MdmOvqE59MUwmjeUyRaBb9xbuQkdbhm/uSVIGY/+SS3IS X-Received: by 10.99.107.6 with SMTP id g6mr16529384pgc.109.1521675137684; Wed, 21 Mar 2018 16:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521675137; cv=none; d=google.com; s=arc-20160816; b=kdzOe8stHZYtXH1JbMMdRPOgDFDVA9kxO4T42R6qxcR1EQ11Uei+XHzSOVJoftG3Hv hjIgGo6GR4G8L+A3cxgk/oU/kuIn/oPtfZ5a/gI0x6nDWsD+SYGf5S4LZvqAbVx8S+2+ KoR6fBiM+qAKcQpk25ookRoRJVDzbkcSb3Th+uasBh9pDT1KDQqgqQM5sMScFP7C5E5w tr1jKo2TebAsoo1HmIdXY5P7IVda+bd4D9SDbW0po7ES6hXWplHhmPsU67cxYoYlxJqT 9y3RRJbRUI7+7assFBG2Ctpiq0Q8iIHncIqdMdoJKlWncaK4HBthYIZV3tLBwbEsZkab x5bg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=PNec0kQoMsLCmBF21k9TOXTSgfuuWILrSF2xIgkiCEY=; b=WwyUbi4ku+fKNn67UidqasBuM98ETbJTpCCR8qud28d+OS73mfQzIIXUXwro536OkY spzUw+7UI2JPsFilw8hPi7y16SKsyn3bfuZAGfNEygVfa+j8OrwvLCXeHRfR4oicrOL2 FT90PSH/2eYSQUEhCDo35kQLsQU/zb1bPtNPOLbZrN4Ddv8Qdqf+0wRx3wq7fYD1s1ZN nyiFvqAvrqhN29KZuHKrfrQFYmm1zNoZwkfHDoODp5VSF8B1T7acPJzG2dtGbw8aJi41 hOag1xVdaftvj0Fp/jLpbV6AGPRtgzsiuSnhNDqIuzs0NkyZUuo6cTXlHKtX71cqgx8g fMdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZW33t+nw; 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 3-v6si4861688plz.112.2018.03.21.16.32.03; Wed, 21 Mar 2018 16:32:17 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZW33t+nw; 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 S1754190AbeCUXal (ORCPT + 99 others); Wed, 21 Mar 2018 19:30:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44890 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753980AbeCUXaj (ORCPT ); Wed, 21 Mar 2018 19:30:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PNec0kQoMsLCmBF21k9TOXTSgfuuWILrSF2xIgkiCEY=; b=ZW33t+nwe03850ywGdvXYdHXA pIX2hsd4H0eJNZNOT1sFowcdkB3KjfvsclPnHM90R+ktuCn2YjeIqdDWJnmt5/C9OrzwRrTX3lNTU 2D5C7IsU1Bk6rK3tqQmf5pKVKgEfplJX2aJQy/SRVMNkO0y4o1ubyadPtMvQhoR/fqKGBjIIzRbdo Q4Q0IDfXQLK6dF+sz8OiUfjkIsqVHsnSQtoRJREM9DufI42WFPBmAgV4T51j7/miv2WSZOCF/FR7Z YPzmNfxEjATdU6gAYkMe+xpL4sXoE/BxGdhRUkldfltQcX71JdRVieCGHgZaSbTl27cij7tZFuEBL OFEo/6rOg==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1eynBk-0002tz-Fz; Wed, 21 Mar 2018 23:30:36 +0000 Date: Wed, 21 Mar 2018 16:30:34 -0700 From: Darren Hart To: Jonathan Woithe Cc: Micha?? K??pie?? , Andy Shevchenko , Dan Carpenter , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] platform/x86: fujitsu-laptop: Revert UNSUPPORTED_CMD back to an int Message-ID: <20180321233034.GB24138@fury> References: <20180310204353.9584-1-kernel@kempniu.pl> <20180311041056.GA5432@gateway.atrad.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180311041056.GA5432@gateway.atrad.com.au> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 11, 2018 at 02:40:56PM +1030, Jonathan Woithe wrote: > On Sat, Mar 10, 2018 at 09:43:53PM +0100, Micha?? K??pie?? wrote: > > UNSUPPORTED_CMD was previously 0x80000000 (int), but commit 819cddae7cfa > > ("platform/x86: fujitsu-laptop: Clean up constants") changed it into an > > unsigned long due to BIT() being used to define it. As call_fext_func() > > returns an int, 0x80000000 would get type promoted when compared to an > > unsigned long, which on a 64-bit system would cause it to become > > 0xffffffff80000000 due to sign extension. This causes one logical > > condition in fujitsu-laptop to always be true and another one to always > > be false on 64-bit systems. Fix this by reverting UNSUPPORTED_CMD back > > to an int. > > > > This patch fixes the following smatch warnings: > > > > drivers/platform/x86/fujitsu-laptop.c:763 acpi_fujitsu_laptop_leds_register() warn: always true condition '(call_fext_func(device, ((1 << (12)) | (1 << (0))), 2, (1 << (16)), 0) != (1 << (31))) => (s32min-s32max != 2147483648)' > > drivers/platform/x86/fujitsu-laptop.c:816 acpi_fujitsu_laptop_add() warn: impossible condition '(priv->flags_supported == (1 << (31))) => (0-2147483647,18446744071562067968-u64max == 2147483648)' > > > > Fixes: 819cddae7cfa ("platform/x86: fujitsu-laptop: Clean up constants") > > Reported-by: Dan Carpenter > > Signed-off-by: Micha?? K??pie?? Queued up, thank you. -- Darren Hart VMware Open Source Technology Center