Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1540481pxb; Thu, 16 Sep 2021 09:31:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv4XvPXfKR8coas1RhS9yyorQvvxKZMEBWQhqwvRs95Fs6wZVT/jN7Eo+5CA4pQZbO96Ek X-Received: by 2002:a17:906:c831:: with SMTP id dd17mr7251857ejb.315.1631809915303; Thu, 16 Sep 2021 09:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809915; cv=none; d=google.com; s=arc-20160816; b=TIveWGtPIXi1eTzGPwHTz0a8w7rJdWD3rVIESd4BEbgkfUSW48p6Jf09WYADSWKiOF M+bSZ/SS0FDHGhn/XB15G6qyzdjA902XPcDQRgvLvEdfrslpcWckDlQRC+2GwFGVqiVm 277+czuuaheKUnYy6jNJoJ57ZHwSkYuMcVTSEDAnPRm7LL5iNMJ6OB1PwPeRmja2bd1i BQxSUM6CMYRcKsKXXpIpBpPr0vETM6Fu18ke/kpUvluW4/QbxKZLZrqpvv0A4WneVA08 pCd8AasiSMaVxMlRw7/fhfB9Whhpu7jFC8IDyCnRc+ZHK1Qx9t0H0V9XNmGRa9QNISVK iuuQ== 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=gms/ss2mWJq47idVbZlMpkFn1SpybYgW99YSXxWUsYs=; b=trC5vLfkniBT15CSOHmiJkYiL4qx8uJoBwbnR2AOPSmvcyw7EEfvMBb9+IWUOOmJBx JtRjh2ohKwDGuOh/bAcMxA9ADyNPKwOUvzsk2AE0UndFLLD5HLXH6Fi0k1uuIDk/v9RV 3LjO6Hw06qYiiQA/Km3OjAsXqn0kPv83B/JPo8CmkLikHZ4JwSYKjh1LOfD1Z7m2zHup XhxZa5TJS7iB7RikxJwwqXi+iSqAKkYQf9bGf9C8EK4Hk/CHJM1NCYK8PYwOE5fUIwsE 9kD0YRxsydWauYyelgmD0ebdoX8JVcR1Z25k30Rd5XsLYrSlbPGBOEizJbswN6SEndMJ /0gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ztcqZrjY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si3911578eje.121.2021.09.16.09.31.25; Thu, 16 Sep 2021 09:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ztcqZrjY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S241727AbhIPQ2B (ORCPT + 99 others); Thu, 16 Sep 2021 12:28:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:58822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240654AbhIPQTG (ORCPT ); Thu, 16 Sep 2021 12:19:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1681613D0; Thu, 16 Sep 2021 16:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808775; bh=ztAtmbFmho7lu+HYlHJUk3Lx17d7VGJuNyMsNnzdcRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ztcqZrjYdnzqnSNX1zZPOaupbTeiBRmzGmcyxw8ZRfQUZLzeEMIfNmWcsOk0psu1D jLAth4b93jWrP70SLzzid4V3guh70KKgGuRccdcCQ3QvlHaGWThcUcRN5RbvmDDQxW blnPmNy7dfkvuDN1lyAiRMb3ZNHJ9q6R9bmhP7L0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dan Carpenter , Eran Ben Elisha , Moshe Shemesh , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 210/306] net/mlx5: Fix variable type to match 64bit Date: Thu, 16 Sep 2021 17:59:15 +0200 Message-Id: <20210916155801.196527343@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eran Ben Elisha [ Upstream commit 979aa51967add26b37f9d77e01729d44a2da8e5f ] Fix the following smatch warning: wait_func_handle_exec_timeout() warn: should '1 << ent->idx' be a 64 bit type? Use 1ULL, to have a 64 bit type variable. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index e49387dbef98..2e55e0088871 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -865,7 +865,7 @@ static void cb_timeout_handler(struct work_struct *work) ent->ret = -ETIMEDOUT; mlx5_core_warn(dev, "cmd[%d]: %s(0x%x) Async, timeout. Will cause a leak of a command resource\n", ent->idx, mlx5_command_str(msg_to_opcode(ent->in)), msg_to_opcode(ent->in)); - mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true); + mlx5_cmd_comp_handler(dev, 1ULL << ent->idx, true); out: cmd_ent_put(ent); /* for the cmd_ent_get() took on schedule delayed work */ @@ -982,7 +982,7 @@ static void cmd_work_handler(struct work_struct *work) MLX5_SET(mbox_out, ent->out, status, status); MLX5_SET(mbox_out, ent->out, syndrome, drv_synd); - mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true); + mlx5_cmd_comp_handler(dev, 1ULL << ent->idx, true); return; } @@ -996,7 +996,7 @@ static void cmd_work_handler(struct work_struct *work) poll_timeout(ent); /* make sure we read the descriptor after ownership is SW */ rmb(); - mlx5_cmd_comp_handler(dev, 1UL << ent->idx, (ent->ret == -ETIMEDOUT)); + mlx5_cmd_comp_handler(dev, 1ULL << ent->idx, (ent->ret == -ETIMEDOUT)); } } @@ -1056,7 +1056,7 @@ static void wait_func_handle_exec_timeout(struct mlx5_core_dev *dev, mlx5_command_str(msg_to_opcode(ent->in)), msg_to_opcode(ent->in)); ent->ret = -ETIMEDOUT; - mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true); + mlx5_cmd_comp_handler(dev, 1ULL << ent->idx, true); } static int wait_func(struct mlx5_core_dev *dev, struct mlx5_cmd_work_ent *ent) -- 2.30.2