From patchwork Sun Jan 3 13:51:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 356146 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp14266246jai; Sun, 3 Jan 2021 05:52:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkqaIblM4klvjprJzOSCZ2MLLa/UffJE49dpggY8+ctBKw0q+ilyzXF5opKJBvB48v7Nmd X-Received: by 2002:a17:90b:1249:: with SMTP id gx9mr25540881pjb.169.1609681929850; Sun, 03 Jan 2021 05:52:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609681929; cv=none; d=google.com; s=arc-20160816; b=eQseBSfJS1gI43az8BJSjXRD7+Sv2yvVyi0ZmvQj75A08dj2hBRVKIP2Kh6XiPIKVk MLTQH6wX0/Nq376EfDPXfTpbfI32vcW0gNAiDMUxj0DGVMR0bPeZatysaFADvnOyXi+G /hUcv6NWfoHEBcUSxzfbpVD8by4IehRZzcQkb0z2zR271id0UkUOC+wY9SJPn8mZEy7P 3WWEI6xvajKixhsORpeHUAxgkbv0mqdGyQakcxcKe7zwV3RSuX3iurlo4ozboVWhH5cI hzeh1wpWplQ6lErxo4+jnhskA3jR1hU8989Hc3k/K39swQytyNC9nKD84ob2pNBvfGcy rsmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Y4L4nDbO+sx67YM7SKVej9X/pEslz+EGMPKy+Vr1L2g=; b=vch2Ye+XV1TZdJt9n4CRobwrL+46lgIxYndmhF8DYbHsdysQ1xd9nApwD+Y0DRD280 NqkIlzbh9ZGeihIEXMmHTohlg7gwnyFfbifgHk8wixnjcz/uEOHeSOkeSM40tcxb+idW 4iVUFrFwUbIybC8PEzlS/No7SxN0rr9fKTkzULhlg3pLe8AT9NmMSQFhM75ub15HHrWk TXVerQgwhsQc/vNTjOeRpud8WW4ikIlBUljxYk4g8bAhBJmaawU+P0AaZosHhnkAScEr Xe2cgDmlT6szt5jWKecmCPge4gKC+ENqii8aaCiukQ9T/ipH2gm5ytXBErN2ZE9sAvkq cB8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=c2It6IiN; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id o10si49680470pgv.482.2021.01.03.05.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 05:52:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=c2It6IiN; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 922808991A; Sun, 3 Jan 2021 13:52:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2D828991A; Sun, 3 Jan 2021 13:52:03 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 09EF6208C7; Sun, 3 Jan 2021 13:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609681923; bh=fXJteWwKPcvYb6lpdOnO34DEgCFpdo7x5opOVSvacyA=; h=From:To:Cc:Subject:Date:From; b=c2It6IiNUywAUqc2Wbrh9DYinEIocdBARj1O8wMGCaQzFTzYJ2tDYUkhSxBGZUJzK PLy1wLaoXsQTSTVJ7rgQQuzY+ygFcola2F3nHH948AMf69o0Rw+jHeyHB/BQSWFyTU wHVH7oPeadg7wkXClFJI2sebl1UldkYvFXSPE9A1nKSm1f8DPbxrwOQr7UpDDUGkAs wg0nazETESUpM9bMGQspjt2YEKCPEkR3X2MsyeFLxs3krVlF0fg4SzKD8HG8RzZmKA jPG4Zj+GUTs59Z+1NZCbISIgCt2iKh7pRwFshqgY9WtsVhOaJ6neu+hYbZ69OZiXjh JmipMujqQGpbw== From: Arnd Bergmann To: Chris Wilson , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter Subject: [PATCH] [v2] i915: fix shift warning Date: Sun, 3 Jan 2021 14:51:44 +0100 Message-Id: <20210103135158.3591442-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matthew Auld , Dave Airlie Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Randconfig builds on 32-bit machines show lots of warnings for the i915 driver for passing a 32-bit value into __const_hweight64(): drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2584:9: error: shift count >= width of type [-Werror,-Wshift-count-overflow] return hweight64(VDBOX_MASK(&i915->gt)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/bitops/const_hweight.h:29:49: note: expanded from macro 'hweight64' #define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(w) : __arch_hweight64(w)) Change it to hweight_long() to avoid the warning. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by:: Chris Wilson diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index bcc80f428172..43164a0b0023 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -2581,7 +2581,7 @@ static int eb_submit(struct i915_execbuffer *eb, struct i915_vma *batch) static int num_vcs_engines(const struct drm_i915_private *i915) { - return hweight64(VDBOX_MASK(&i915->gt)); + return hweight_long(VDBOX_MASK(&i915->gt)); } /*