Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp540575pxb; Thu, 9 Sep 2021 06:44:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC5FqmsRy9BOU9xZio68xhtV8LAiIDxDVselKKZS9xBtMMGKgQh16ZAMBAQPEJu46Qn6Vd X-Received: by 2002:a92:c14a:: with SMTP id b10mr2332574ilh.176.1631195090213; Thu, 09 Sep 2021 06:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631195090; cv=none; d=google.com; s=arc-20160816; b=eMX6C+EY3QpN1lgYDxVRASpWuae+mhdz/Va/ySGoFrVNLfmdEmGR4sYbuU0wuvqNle siNH+SFHunuVipYPi59YBjSDC2suCBBgtq42uXrGT2jiFKE6IsKeG+drdYU88OMcK5oH h6KG12t5PA4xQPEpWC0fE9blrov16H+uvAhvZ56I7r6/gQjU4UxJ+JtGq0sf8cZyCPpi leC09YHXu8Du78MpXS/qT9WjFPeNfkXneIS9L/5TDvtjyITXz0IYAbOkrmurIAvg07A1 eb2eIuVTrKPzKNn6l0e0n0hV907Lv4qyXS3f1kniszvko7y5fEk42TqXxZ7KPg/YGDLP uy1A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/9WoZxc2zFideIdK4utcUuTx9R/2D0pUZSOqikEWKQY=; b=fJ6q1AWDqj25UJq5s1lT9O/Rjpm5oOxDujgZmUgcsEUqRzgpttpo0hIY4Yb0Zi0wKb 6D/EPFfPeXPleS2PsmcRG9oWqvO+T5DYJ5y0wN6FR6fXYC/wrvJlH2X+XxPBIfEDAUqC OfG8oCxKjW875SDg6dC0/VOunRM5cOh1zdSnSRoyYmezfNjHk42NKnERy4wg4AfsRChv 9JLUAwn6HXwvzvJ5J9Tn29CdyUcLU2XfUCmhlbQ8RqBPvnotaQNZCDKB2LWacCL8UjDG 8VexM+FmbBgdLwRo8s8kMHTw4h26GM3COkrnf7DzZhn7+VTaO01/ZB11kjbTQndyTx6b Tlow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H4WNLtg7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si1634837ioq.76.2021.09.09.06.44.36; Thu, 09 Sep 2021 06:44:50 -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=@kernel.org header.s=k20201202 header.b=H4WNLtg7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357012AbhIINn7 (ORCPT + 99 others); Thu, 9 Sep 2021 09:43:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:40990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352861AbhIIMrH (ORCPT ); Thu, 9 Sep 2021 08:47:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 614726321C; Thu, 9 Sep 2021 11:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631188585; bh=TAK3zWuiiK3K2bVBG95XemzgVJ/xddGw6AnGraNwrmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H4WNLtg7tZUtQQ594pjH/PYO/6V4zgpF43+GGC5f87Zi4zolyCAz4O+thRZ+EIvAk GMA7arSievm2pzlbRxBNkgF9wqXJMNfNtmCHnNS7WcUDeZK5Z5l+Q9lZ0s9m112nnP CILMupcucqOiyLY2bn+ktwvzgxKQ3vai6PCpHzIgLfX3MXv93WKHlQQaC9dozE64Lc xZ6BwQGSwKa3I8xI1WoM6dER/VSc6neIoHbUEYLOHOQA7x7OgCnQAZHAaB+VgP5/Mw 19Vx6AmP6e8wDlsRksqkiQhJtErSomeyd1iSKqxOQzj9LYU9EiaoIYnvlfV7Yu7bMP wmzuVTvqvspew== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Eran Ben Elisha , kernel test robot , Dan Carpenter , Moshe Shemesh , Saeed Mahameed , Sasha Levin , netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 061/109] net/mlx5: Fix variable type to match 64bit Date: Thu, 9 Sep 2021 07:54:18 -0400 Message-Id: <20210909115507.147917-61-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909115507.147917-1-sashal@kernel.org> References: <20210909115507.147917-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 76547d35cd0e..bf091a6c0cd2 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 */ @@ -977,7 +977,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; } @@ -991,7 +991,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)); } } @@ -1051,7 +1051,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