Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3406593rwa; Tue, 23 Aug 2022 04:22:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR78DV74MAhO/7rBTeFnPanXzy02UjUI6ASMoahwS35JF0Y03oxQu+wvBDE4csfivksD93+I X-Received: by 2002:a63:698a:0:b0:41c:8dfb:29cb with SMTP id e132-20020a63698a000000b0041c8dfb29cbmr20143561pgc.170.1661253738745; Tue, 23 Aug 2022 04:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253738; cv=none; d=google.com; s=arc-20160816; b=IKmuJt1xM2zsmVbKHEUCTzOj1Uuu5TRh7d0g0VxIICYWSVQLeHxLhCVLfGt8cp64+D s0k9HMAMwBQ9O2xCAoz26SSCY6+dpBWgP+mJpMaU3gshNu/u4ETa2y00zLziNbwtR1rc dKjk9pDXmORh9/UCqTJv4NEbUzpLSPjTxTQpUQixuKBS0DfRDodCCzdqKE0+lo1oGUaK aj5Cp1kfc5LpLydOh0bV6Bg+D4gQj42I5Bs1Bv+qsWThg8CirPSVoaOLE1dUSxl91eag nJ1I/nIfPbl3w8WIHPUImqjMWr/6Ow6b/9AeQawrOhOwgbG80LMGkZhYUJHPAoB2iWu5 g6oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BvS91teH4mkQ3kroLoArokv8xPdQWFTRve9HbogI6Ww=; b=gyR/RcNMQBOXBka+hCN9mSzRRSIjSxlkEQy+UzkNuzQhoLRMbxMC3/2fk9v4n1V8QE Bdij9lPe6EK0REsGSxxzL0BzAQgtH29BV14OyD+n9l5s2/b81oFMLc1LvZpNGsc5H11y aHzYXqBqvZR/B5xAFiHmCCK+kAyGtUUwAt/PrU6dC+Ms8aFmC56TUP+zTLc7pj8qOUaT 4koJj/y/vXPT9TzJAAYJ2sZWgvUNQ+ZwGg1+l1wph9Xn2O0fPGfofMr6Z97RMDUotJJa +RAKuUdIc6tkeHi/u2vrY1NTh2jf7c9VvbuGNo4z4qbnoIDFABPKIUdWsKThZ1B64TNS LpMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vyAYj4fR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a170902760a00b0016ef52684f8si13706060pll.323.2022.08.23.04.22.07; Tue, 23 Aug 2022 04:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vyAYj4fR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355277AbiHWKXZ (ORCPT + 99 others); Tue, 23 Aug 2022 06:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353440AbiHWKL3 (ORCPT ); Tue, 23 Aug 2022 06:11:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E67237F088; Tue, 23 Aug 2022 01:56:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 83AA7614E7; Tue, 23 Aug 2022 08:56:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84157C433D6; Tue, 23 Aug 2022 08:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245005; bh=XpSNX1f32Q6TMFam1wAor2QPc0RbNk2vlmC0HXRK4HU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vyAYj4fR39pmAuInkNtnIeIZwrkwR+1z2qlq2m0dKDyo7pdzISZQmipq4qo544PU7 JQQc5sDn+hNF44zV8TdNMhNFr/icmqdmDJje29F/FYRA0XmIlPKKe8D5GwoIXmXAiX KI2EOhG6ZSxgqSCBd1sUqwIezsAFDO9Go38pEEMo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oded Gabbay , Sasha Levin Subject: [PATCH 5.15 187/244] habanalabs/gaudi: mask constant value before cast Date: Tue, 23 Aug 2022 10:25:46 +0200 Message-Id: <20220823080105.602580987@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oded Gabbay [ Upstream commit e3f49437a2e0221a387ecd192d742ae1434e1e3a ] This fixes a sparse warning of "cast truncates bits from constant value" Signed-off-by: Oded Gabbay Signed-off-by: Sasha Levin --- drivers/misc/habanalabs/gaudi/gaudi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 801acab048eb..8132200dca67 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -3318,19 +3318,19 @@ static void gaudi_init_nic_qman(struct hl_device *hdev, u32 nic_offset, u32 nic_qm_err_cfg, irq_handler_offset; u32 q_off; - mtr_base_en_lo = lower_32_bits(CFG_BASE + + mtr_base_en_lo = lower_32_bits((CFG_BASE & U32_MAX) + mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_MON_PAY_ADDRL_0); mtr_base_en_hi = upper_32_bits(CFG_BASE + mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_MON_PAY_ADDRL_0); - so_base_en_lo = lower_32_bits(CFG_BASE + + so_base_en_lo = lower_32_bits((CFG_BASE & U32_MAX) + mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_SOB_OBJ_0); so_base_en_hi = upper_32_bits(CFG_BASE + mmSYNC_MNGR_E_N_SYNC_MNGR_OBJS_SOB_OBJ_0); - mtr_base_ws_lo = lower_32_bits(CFG_BASE + + mtr_base_ws_lo = lower_32_bits((CFG_BASE & U32_MAX) + mmSYNC_MNGR_W_S_SYNC_MNGR_OBJS_MON_PAY_ADDRL_0); mtr_base_ws_hi = upper_32_bits(CFG_BASE + mmSYNC_MNGR_W_S_SYNC_MNGR_OBJS_MON_PAY_ADDRL_0); - so_base_ws_lo = lower_32_bits(CFG_BASE + + so_base_ws_lo = lower_32_bits((CFG_BASE & U32_MAX) + mmSYNC_MNGR_W_S_SYNC_MNGR_OBJS_SOB_OBJ_0); so_base_ws_hi = upper_32_bits(CFG_BASE + mmSYNC_MNGR_W_S_SYNC_MNGR_OBJS_SOB_OBJ_0); -- 2.35.1