Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1185207ybi; Wed, 3 Jul 2019 10:59:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxT870yksZkkA6E7FygObSQMX1OhZ0EhKGHBdfOH9x04scdueoB6LcO8J45+MxWT1lMWT0j X-Received: by 2002:a17:90a:db44:: with SMTP id u4mr14205783pjx.52.1562176764425; Wed, 03 Jul 2019 10:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562176764; cv=none; d=google.com; s=arc-20160816; b=mUf6tEpU5MF00d3DaCaxe6+DQC/tIujhoe8lAAzK7GfzOFN0iNlPERaxQL0H7QjwwV gkdTrxxfqrkmSdk0c6lVTkirDik57Bh1OntRRVH4PV2fvvH7q3WiVXStOjhLNbVkSo9w llJlEJs/qRc1oNkc7YuAd4Yk6LJygcU5G35LW1DzK3jvgBBUSdWmcFy8DYZ+ybQpmp8F vKBglzWZQmUZP0EQUoeGmYZYd0OMf35OmcTHnW+KwVpxXZJge+lD/7JL4TIm02Gtwlxa 490WWMKgvfDNNeTuYt2FB4a7HIQu2wlqtVh+lXLYVqVCKHdWDlh5rHF2Qi7XKPliIoav cBCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=SBoVgDxevh+0orMCb2YPrkAIPpPXPXsDVuRye2tAk2k=; b=euxKi8X+5ShZ/bOjyz4rQSaDbR0u/znhTnod83hpVuhv4RTTwKOUCxSI6Bgt2Taltt SJi7QMoYAitIrR50Dm8gZxgFEQkY8x9MbLBYahd6yXOVaAelsG/y3ncUtxPaES7YFuPg k+nULBgIVdB8W/c1nuRB7/sp4xbRhifoNmP1x3mVTI2lI6ugMPeRk+TJWUB+abI7Ccd/ O/ZhHrZfWX6xjWCRW0FRuUJ78SYBWmdRAEB9aZ1Nn+dd5AnpDpDa76dcnLsPYwrT+zLa iTeHxahRjGkd6SpHkPWh9WxJDpiqOtcrKlUxzH0yVg5Mnve24NBTgtokFYWSmjsKjA0B P7/A== ARC-Authentication-Results: i=1; mx.google.com; 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 h186si2938216pge.110.2019.07.03.10.59.08; Wed, 03 Jul 2019 10:59:24 -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; 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 S1726736AbfGCR63 (ORCPT + 99 others); Wed, 3 Jul 2019 13:58:29 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:46088 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbfGCR63 (ORCPT ); Wed, 3 Jul 2019 13:58:29 -0400 Received: by mail-qt1-f194.google.com with SMTP id h21so2571318qtn.13 for ; Wed, 03 Jul 2019 10:58:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SBoVgDxevh+0orMCb2YPrkAIPpPXPXsDVuRye2tAk2k=; b=JqBymbZ2ZSZJ2JEw+CakS7jx1ajjZVfe0vlD3ymPwoCjZWU4RxOeyHqiX/iWCENRuQ n6DalD7Fqkm7xdZ7CQ8xwTmBLAA7hA8RPfQzn6NV/cYE6ICPb7UODDhnSKAsApjYt+oC J4l+4ypl2OUpbjWDdVy32RlMhGL0eyMNdsy7LNhBxmloodV1hjgwXxPY832bNmiSUpcs IlWm5NpTisJfs9eQUyHjL65D8hC/cAxUroQCF4qDiLXh/lpUraNeRbQ4n6O4uhEoN/n7 u36new3kmR2CTWLxyWNDCLmhbOY2hHLeV7pyjMZmaqk/CqvD6mcrQDKUFyoPVAS4FGTd 867g== X-Gm-Message-State: APjAAAX16bQdo5qkg40C8HPvbLwp/jdlSzIOcTq9D0wQVroGn+frgVJk Hw/T67DCN+2aXQ8XQ/4HFPKHeUGounbCd3kl9r8= X-Received: by 2002:ac8:5311:: with SMTP id t17mr30964672qtn.304.1562176708215; Wed, 03 Jul 2019 10:58:28 -0700 (PDT) MIME-Version: 1.0 References: <20190703153112.2767411-1-arnd@arndb.de> <20190703165919.GC118075@archlinux-epyc> In-Reply-To: <20190703165919.GC118075@archlinux-epyc> From: Arnd Bergmann Date: Wed, 3 Jul 2019 19:58:08 +0200 Message-ID: Subject: Re: [PATCH] soc: rockchip: work around clang warning To: Nathan Chancellor Cc: Heiko Stuebner , arm-soc , Linux ARM , "open list:ARM/Rockchip SoC support" , Linux Kernel Mailing List , clang-built-linux , Nick Desaulniers , Nathan Huckleberry Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 3, 2019 at 6:59 PM Nathan Chancellor wrote: > 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 think fixing it in llvm is a good idea regardless of the workaround. My main goal for the workaround is to get a clean kernelci build again, and it will probably take a little while to move that to a fixed clang-9 build (release or prerelease). > I don't feel strongly about it though so if this is going in: > > Reviewed-by: Nathan Chancellor Thanks! Arnd