Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3303145rwa; Tue, 23 Aug 2022 02:20:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR6mB6e46yK82aZi2KshTGomBqJVOYv2yREFXezhOOTnpekbEXNVDCirVVtfJ58Kma3cKjpA X-Received: by 2002:a17:906:b2d4:b0:731:4594:8ba1 with SMTP id cf20-20020a170906b2d400b0073145948ba1mr15891329ejb.288.1661246443605; Tue, 23 Aug 2022 02:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661246443; cv=none; d=google.com; s=arc-20160816; b=VD9K48+3X1uQAF+BRRIJlHyt4muFoRS0Dq/ABY8NrMR3T/DVfFZr1Rev8o4OtAHfaj 5EL+9HU3TxtxnAnLvl8njPVgT16mAWHaDsr55E9Im6oZLu4JiqcWT04RTr1phNRudyLM U6ANxbnlqPCw22B98wEOZDactIOjMLLp5WQGxs4b1ZIO3jOWJUYKU/bARqCj9UeStPbJ L8knw8LUx59p1jnDCajPFoXaeJ1WD1+InvJtC+BbhYHPb5ncDiqepMLMw6N0nPu/ydmh Kd7gWbwbhywsYQeX7IuerxWVgZE03CwOqN7AZPU66GKtGn/e4ghsEvsb82AyER8uKxy+ 5VMw== 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=7Ta16985rne6El9AZmA/VfXXBIVgrfnW4qhAQamU+NI=; b=lQe8sSCU4VvTT9roVUaYBqWrCIGU4e7gBHadxMVQi/qcesRfE+30EIcW82lY/bA75d 48B5rxW+H96sJT78hMqC5GrWXzP3BjS5jvuZYfABRUT0bJewHm9JW46+qVqH9VYS8bMQ g0PsiB5NcPWYV7LLW12+uRU5VpNb9yJffGcEYeTybiXpnwxBTMpE1BK7HdeMOK8Hjd7q /N/LMvENXqrZ/bcdOXdkDlw8Y0DS+zlOWexeqsqHbzA4RMGmVi7oywvEz2CQD1H1PRkj gQVkWY/HgOJvvU6ZJH8d6NSwt/zWmi0LU2FJ9Gf+GH480jsxaxl4J6xT//72LNbGtlBf 6hcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X83ELeEn; 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 eb6-20020a0564020d0600b004359f471717si1972845edb.0.2022.08.23.02.20.17; Tue, 23 Aug 2022 02:20:43 -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=X83ELeEn; 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 S1349129AbiHWJOf (ORCPT + 99 others); Tue, 23 Aug 2022 05:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243401AbiHWJLj (ORCPT ); Tue, 23 Aug 2022 05:11:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 499156D54C; Tue, 23 Aug 2022 01:31:38 -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 0568661360; Tue, 23 Aug 2022 08:31:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8B8BC433D6; Tue, 23 Aug 2022 08:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243482; bh=fNAOU3nn93Lkm95oCUBoM40Bm7uOivsDjII/2NQw4E8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X83ELeEn35/C0RXbyx9OJijG/o+pnjT8Vln4XdQkGTHmlzmLKseOwogWNlZMouv0M 7p+4LFXL8VDS9mavGt0cQzOcSbAtO0dRMBtL4E4iTn3Hy2+tKMxvojweNcZjtwt4EK IcGX5bgCbQBtLtUSJqwUhcrN0WnS6HmAO8FdjIzM= 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.19 291/365] habanalabs/gaudi: mask constant value before cast Date: Tue, 23 Aug 2022 10:03:12 +0200 Message-Id: <20220823080130.375272491@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@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 3fb221f2e393..b33616aacb33 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -3339,19 +3339,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