Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1129020ybi; Wed, 3 Jul 2019 10:00:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTwgwgEphgx1TzsbAZDNOYPv6jQwajTooTI2ikCF03UI6qzFeyutmK7lWYFQk2E2BYT+Mo X-Received: by 2002:a17:902:24a2:: with SMTP id w31mr44677985pla.324.1562173204233; Wed, 03 Jul 2019 10:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562173204; cv=none; d=google.com; s=arc-20160816; b=wJKRSCEpYAS4RuhsNYy1/I9vQUSOWKpxA12flVYhg5EDJAky328XEtNBeO2RQQDJ5J pHiOIjuWdEIKduTtNqSuKZ/kiFbWCXlkgzruDRwR8gV5Doa70PcbpHWpkpoJYqtOqGRk hgHXnyfbDCDCjkl1CHnZj0uX2+pDIlnKCBV6Y8WfgruN8u2CjqdTOvrKJyuUi3NO2ERd L44gCBT1eggiDWAzxJmy3SWfDY4XroqW8z4zR/qprY+7NuhNHy+hWOeVuPN0HPX6PoiI YCMrnaqbgVDQ9ag53yPVBT7bHhN293oxJUjK9qA09DQEVo25/fFpPuHIWw1D8bHSzxHY a1ZA== 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; bh=5mSNxLATS4nQEbUbxPfPu5wUspYlM1yDTW4a7jFDycc=; b=MOxpDFGOKYeRl09CzsoM9LEOD0cURFsmwH/WZy4Pn2o+8LMezFnIiI9Vza/H4b6eAF IhuCuMK0KppPqxsg9oYk15fnbbBit2iQ40183aNubt1KfmRnahhQ/XPOJW+VHbAQVIZe IBzfcNccOzwN19IUWmyhcnFHKpVIWRkFvF5UMPmh0QvTpx9NiSwA40HE47TxenpaC+kO t5BjdXTQSxcI5YfqZGWQs36cRs8h7BY3ikInDNXgIx8UBQeD80I0SOGCHmMvCrRHsWG+ icdDzggLTLCKhHbQPGzQQmEsXirKwfm1VsUcz567FUUFr3J2LutFkjVlYSwgZPxXRp4S TiVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RgIkVRRx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34si2686954ple.327.2019.07.03.09.59.48; Wed, 03 Jul 2019 10:00:04 -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=pass header.i=@gmail.com header.s=20161025 header.b=RgIkVRRx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbfGCQ7Y (ORCPT + 99 others); Wed, 3 Jul 2019 12:59:24 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:40114 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfGCQ7Y (ORCPT ); Wed, 3 Jul 2019 12:59:24 -0400 Received: by mail-ed1-f68.google.com with SMTP id k8so2772116eds.7 for ; Wed, 03 Jul 2019 09:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5mSNxLATS4nQEbUbxPfPu5wUspYlM1yDTW4a7jFDycc=; b=RgIkVRRxLkHDrsI7hyi3rW5WRur6hxyeB7sdRlFXqBDC1W6hb/pT/g3KNLOu3B0Vlk ncCgt9g9dOgLwOTXMGkvwO33HG/Dz6qPpJtgg1nvKTyUTU6k3adu+0i49DLmlNtwCnu6 bJ4GJSSvQQ8vVqy3cAZ7v9VgJ2b8z0sk4PFpW1ni6Lu3th/u1W/Thh96+YqlRK4sDHxj d+SHNvKdKVulQgYJ1BeyV5zwqERiHwiEFmncBzJdRnLH9qouWqMSy3AojjZpsBUe/y3J 5a7xEiZh5OwbsGkqhWeASYjVGqJQ6u2o95F8h2LPcaUjM+Gk32RZzWC0C/yhj4s+NTjc WWkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5mSNxLATS4nQEbUbxPfPu5wUspYlM1yDTW4a7jFDycc=; b=EfJH3S7Omx+gpxUM4YWrmhj3evFKh0Ea8kc5+k9Jc7A/GDJSvaGby0QsIIGe4eOGXc icwVt1xydNCb9ute/QfgdiQg3OAZSNOJh6PTnduM8rpREJ4oQtYNtQdGssSDWuiE6102 6jBpBS6psNHPoI0SoV0RnpZ/Jil/8/pxoKuI+fLTp5LdHAFC2DaoOCc6FUezIGCL/dHG zQqXJj2546cefozw/Xvd6LyxNJ/B3DXo08KcuPkYClswEeBIaEMtR/4J6iU1GRTjngME n1O+acMrfuecR4WtJxiNnlZQLDOuJD1W1iLsFEDpR7y5cY0C2W28+xXeW6OfwYx3jhQI +tKA== X-Gm-Message-State: APjAAAWOLohTt0xePRkonXkeCvmVcL2h3h8vTGjJNbpTNVivb0j4VOwY Gc/jV6blaoT7VhxMsRhKDJE= X-Received: by 2002:a17:906:7681:: with SMTP id o1mr18871298ejm.207.1562173162397; Wed, 03 Jul 2019 09:59:22 -0700 (PDT) Received: from archlinux-epyc ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id t13sm855465edd.13.2019.07.03.09.59.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 09:59:21 -0700 (PDT) Date: Wed, 3 Jul 2019 09:59:19 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Heiko Stuebner , arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Huckleberry Subject: Re: [PATCH] soc: rockchip: work around clang warning Message-ID: <20190703165919.GC118075@archlinux-epyc> References: <20190703153112.2767411-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190703153112.2767411-1-arnd@arndb.de> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 03, 2019 at 05:30:59PM +0200, Arnd Bergmann wrote: > clang emits a warning about a negative shift count for an > unused part of a conditional constant expression: > > drivers/soc/rockchip/pm_domains.c:795:21: error: shift count is negative [-Werror,-Wshift-count-negative] > [RK3328_PD_VIO] = DOMAIN_RK3328(-1, 8, 8, false), > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/soc/rockchip/pm_domains.c:129:2: note: expanded from macro 'DOMAIN_RK3328' > DOMAIN_M(pwr, pwr, req, (req) + 10, req, wakeup) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/soc/rockchip/pm_domains.c:105:33: note: expanded from macro 'DOMAIN_M' > .status_mask = (status >= 0) ? BIT(status) : 0, \ > ^~~~~~~~~~~ > include/linux/bits.h:6:24: note: expanded from macro 'BIT' > > This is a bug in clang that will be fixed in the future, but in order > to build cleanly with clang-8, it would be helpful to shut up this > warning. This file is the only instance reported by kernelci at the > moment. > > The best solution I could come up with is to move the BIT() usage > out of the macro into the instantiation, so we can avoid using > BIT(-1). > > Link: https://bugs.llvm.org/show_bug.cgi?id=38789 > Signed-off-by: Arnd Bergmann Nick recently mentioned that Nathan was working on a fix on the clang side. It might be worth holding off on this to see if it can make it into LLVM 9, which will branch in about two weeks and be released at the end of August (according to llvm.org). I don't feel strongly about it though so if this is going in: Reviewed-by: Nathan Chancellor