Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1592913ybi; Wed, 3 Jul 2019 19:25:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzk43yJymKzqqXyYrfGIdhKp3bHGvVs6dwmPM5gZ2asHPqonrCW/9k348aR/A3gUg68Nlor X-Received: by 2002:a65:4841:: with SMTP id i1mr21798988pgs.316.1562207134441; Wed, 03 Jul 2019 19:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562207134; cv=none; d=google.com; s=arc-20160816; b=rryXhuhyGlMOXPOo5HjP3yJ5ondwjMFa8vjXbWL/5UNeLdfDnX635CnbPKr2h034Pm WcfglbVjoLtDgvpZHRwoG0E/rIHBz8Qdqgy+a66lIsg8bPGOOuQCKDvKSKmE7qAalzy1 GJ/6W5raY/HvvsByT5zFHqJJA5dP0g/nivkXBtx6m/CgAjsPiYFDPM9UM9NMapC4Yo5/ Apv0D62jvr0IqWMvsVKftNRJ8t5vYkWmwpI2sLwhFuEe5ha0Jre6WLttYSa7hglVgjWj f9QZi/kA4yjluHtycIF/zFvZKvxqiW3OntW9ztQirGIjeIrN/XcbhQL2kiNzt+YOD728 tWwA== 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=+J4G3+w2a6rqwsRd6naD6kRP3PZ6p5YJ6mI8owInsUY=; b=XHUuOcfsW4HzcqOWAAujKhn0TsiStPwdzOiDMZwAZLo+fdIlxDmpQMgdYk0npCah6+ nY3jFxkBaOdZw1Wc22VSzAu4TD9JCivkx69i3UGaqNInklINOa5Yp8G1H1eErLFnS5u3 6jdiAvkCTJO9xuo6wwaaj0Qi9CMxTQlPDh+u2vreXqRjYh1m9zxMcRJeQSxBH3PBQcwc mKdj0cqM3D6cbrQVIaCsrlBjrDqvOO9lBzC7HJQ9we1hPnxKG2KRylBmSzJfqlvhDZhZ mM3FTzYZIITEmjG/RI1iyWFc97R9VIidgRAdfbCkmsSfTSoCs1XnWubq/xj7PW9P3+9J c5PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=pnCXRsvC; 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 u12si4046993pfm.6.2019.07.03.19.25.19; Wed, 03 Jul 2019 19:25:34 -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=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=pnCXRsvC; 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 S1727206AbfGDCXL (ORCPT + 99 others); Wed, 3 Jul 2019 22:23:11 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45733 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbfGDCXL (ORCPT ); Wed, 3 Jul 2019 22:23:11 -0400 Received: by mail-lf1-f66.google.com with SMTP id u10so3098133lfm.12 for ; Wed, 03 Jul 2019 19:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+J4G3+w2a6rqwsRd6naD6kRP3PZ6p5YJ6mI8owInsUY=; b=pnCXRsvCD/RtzrcOSH9XKM3pNpuZOmeLWIatc8U7JlkVMu98m1tFHyX9W8gckaXPfe b17ruB40N/kd408MIOehV98cOnIGdS2i5T85oAKHFtbQungZe4RQZXnoR3DvdoUOY49T A8Qralpdl860WzVeFgeSpieoUbth90cEXEwDDfG2ufwTCrsWhxFOKEEtU/VdnRP/Ma1P crPt3nVPNZZP45KVGlF3FSxFbEvNPhhYU+4eKXQyZkt8EnoLeDvdkLNiM9WDsGZxLtVf vkQFJrmKD9kDeXJtME/5Hl5v6hn8fG8k5HTT33wk8Phx9tWBoUoQbHDcM06FR4ZmfGpB MiQQ== 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=+J4G3+w2a6rqwsRd6naD6kRP3PZ6p5YJ6mI8owInsUY=; b=ewxbT6LiPVJCR1wuxFYNFA1tpvtlPbCzd2EQx3wfhwB8sGJIlA3snUHGGVaqqYHg1M 6CewarYtlsAMKD7wZhr+DvsTu16TcHu5VKXbiDrDLuuGkHKWf3Rj/mYL7ZNA1ctHjl9a BgVqvFba0A0cbz2zdiHy8+De9prIZnB1gZILPBoog7HXks3ocayKgU06yKmAxLWVmJKf yY7jK9tIKOuwrraZg9v6UQFfFCyeOmtOBX6CDN4BVqRYiu17PP4Ge2TqP5HxNQFVnNsi yDYFHdzxKmUvooJtsFwzU8prLnJChJs5iUoFUgdv3f9rm8JtzQu3C5nEQmhpIi6UJhRC /G4w== X-Gm-Message-State: APjAAAUDf/iV9uW3lnQoLAUfDOY1io70T44EUJ/RQ/fgqJNqblhU/f47 uvI3W8OyXOemJD46wPslwfxYfA== X-Received: by 2002:ac2:4351:: with SMTP id o17mr297792lfl.100.1562206988730; Wed, 03 Jul 2019 19:23:08 -0700 (PDT) Received: from localhost (h85-30-9-151.cust.a3fiber.se. [85.30.9.151]) by smtp.gmail.com with ESMTPSA id o11sm635357lfl.15.2019.07.03.19.23.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Jul 2019 19:23:07 -0700 (PDT) Date: Wed, 3 Jul 2019 19:20:43 -0700 From: Olof Johansson 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 Subject: Re: [PATCH] soc: rockchip: work around clang warning Message-ID: <20190704022043.gwcwasi6jni2qctm@localhost> 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: NeoMutt/20170113 (1.7.2) 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 Thanks, queued under arm/drivers now. -Olof