Received: by 10.223.185.116 with SMTP id b49csp1121613wrg; Fri, 23 Feb 2018 12:18:05 -0800 (PST) X-Google-Smtp-Source: AH8x225mAs8AzdKihvv2AcrVr6zc33Vlcip6m7EUMzaub5AtPO+U67OJTvZWUt9CVBmYa/gI3KbO X-Received: by 10.101.65.9 with SMTP id w9mr2327390pgp.214.1519417085068; Fri, 23 Feb 2018 12:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417085; cv=none; d=google.com; s=arc-20160816; b=0Lv0LyoC1oREfRxjniau9tBOV47grWRWR92klECNL6GxwPIkPHIR5fDDur6ppxaIKu NnAgGZ37luO5JxxXIkCPOnJgZutum54IEQskHuNY6BqDJL0jWDfzo0Y2QatUCVnsDjxW jarfkjsQyiKjyk31KkHbmLh3MVBHSa5gMokY0tqOsn9ZYMQc4HGZem1ul/qY0tCM0TAq OhpMWfwhSn1DJvCc9iRq50stg2IEc3KRxk3fZtUxVatX/wph+BNPF8prnSzoILhHxSw9 pxD/jFBzIjam+U+wSVHVOhuW4OpQYCJE1/xDQDmmTy+RqWyD+A0NteEZS9ce7FbSB9Tn JcMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zTw9YvvKse1l+CeQk9Q0TnIDnnHNhh2Q95Vc5CpA1UU=; b=bGaVCetjadbMC77utiv38PZzbC/gjPkW9EpR4hA5WoVygYiXqP+n1wE+5yxkmKv36t tEpqYqQyYnQj/ZMBR+pfvrNojXsQzIH6p5VUsnUcyGTYLGxonGYTutECFHygm1zKtz0+ MmGjI5T3P1XfoPVuTVu7IV0L7mFc9mTJWzrUfN4J5RIwWYROf03tTnHfKsHc8L8zaqEy AaOr43BlAW9s7wwlvofdV3Ofexqb39zQSuPZEmjpsCydlm9IoAzcr6yZbNbnQ7LDcCy5 UeoNgBUHljsBcNU6O8wE4TMPtNzWSknpbcm0CY3dGCnu9s9FYTJZ+pYBacsGyunuz9vx sHDA== 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 j184si1894081pgc.142.2018.02.23.12.17.50; Fri, 23 Feb 2018 12:18:05 -0800 (PST) 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 S1754420AbeBWSkO (ORCPT + 99 others); Fri, 23 Feb 2018 13:40:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39912 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeBWSkI (ORCPT ); Fri, 23 Feb 2018 13:40:08 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BD7F411BE; Fri, 23 Feb 2018 18:40:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Bolle , Joe Perches , Daniel Vetter Subject: [PATCH 4.4 121/193] drm/vmwgfx: use *_32_bits() macros Date: Fri, 23 Feb 2018 19:25:54 +0100 Message-Id: <20180223170344.839674678@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paul Bolle commit 0e7c875d1ae9dcf4d8c6018a45e5529feaef8956 upstream. Use the upper_32_bits() macro instead of the four line equivalent that triggers a GCC warning on 32 bits x86: drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c: In function 'vmw_cmdbuf_header_submit': drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:297:25: warning: right shift count >= width of type [-Wshift-count-overflow] val = (header->handle >> 32); ^ And use the lower_32_bits() macro instead of and-ing with a 32 bits mask. Signed-off-by: Paul Bolle Acked-by: Joe Perches Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1457000770-2317-1-git-send-email-pebolle@tiscali.nl Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c @@ -293,13 +293,10 @@ static int vmw_cmdbuf_header_submit(stru struct vmw_cmdbuf_man *man = header->man; u32 val; - if (sizeof(header->handle) > 4) - val = (header->handle >> 32); - else - val = 0; + val = upper_32_bits(header->handle); vmw_write(man->dev_priv, SVGA_REG_COMMAND_HIGH, val); - val = (header->handle & 0xFFFFFFFFULL); + val = lower_32_bits(header->handle); val |= header->cb_context & SVGA_CB_CONTEXT_MASK; vmw_write(man->dev_priv, SVGA_REG_COMMAND_LOW, val);