From patchwork Wed May 29 09:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 165369 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp9656061ili; Wed, 29 May 2019 03:00:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzca+dDqGVA3GU0qWE6f4tYR4TdRsoqhi0ILnx+aUOn+7UkWCH2Anr0iTf6v3r5SaAMlVeI X-Received: by 2002:a17:90a:8586:: with SMTP id m6mr11046130pjn.129.1559124047518; Wed, 29 May 2019 03:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559124047; cv=none; d=google.com; s=arc-20160816; b=WVm3O4OMicE/lM47cnsrGF5Sj7fAjEv77DUWX3MdNPFZVChivrH3JSU9XcFVAZLdKH KZLHH1dgqvmITLIbih53SBkkkZhYHtLZetbG/0Bl7shuxNQlPXZsd1MUPiorNyVqcCEg Xo+ydrETgP3SM0haq3kmnMS3ufSY0FQba4AFv3xcOBthv16KmLLO4MItaNyMdCo1KkYi JKCJFxwOQzMveYfIq+OzcwRWYSOsCj4oobx04UJf7351tyE0NRs0FEtfv0+jJ2xSTg5p JNng9tRI5NKgJYDOpLkL2cugtr0oHfHrsJ6PdmKc0K7fp4tnHXmruF0B7NuhZo/aWrp+ qxjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=6qg4868omeIs7G91CJX6vTiVd4comMhEAedpiJhJckQ=; b=Rpg6JXSFj+rugdIkT3ojzFoZq8F7TUgFGka8rx840SAUsl7fGXCfS/5YQIZSN7IAiY SZKtdMcPjG7mN8JvkCBgsF83dVK9bhO0L+tIT9UZkOXntjKyqrtL78ZMymFbRye/35Cp MVDGFy2uxsRmTnlTBq0P+UsK1yCCTYuaQNC6DrqxCI7Um9gOXIn9uN5FgcHi6+4gD3cu zQumBfJcv9TioFDMB512jOt/+LkTFFzUHYih/WhWH5wCNzpCf0/2kJLvjzSzzvU9bVml 20g/ogpJuDWmiO95SmxlRtUQdGemyB6DDW2f2SaDtmBlNOYU1LP0GK5Pv1+ca02iQtQU VThw== 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 h5si20137324pgc.8.2019.05.29.03.00.47; Wed, 29 May 2019 03:00:47 -0700 (PDT) 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 S1726842AbfE2KAq (ORCPT + 30 others); Wed, 29 May 2019 06:00:46 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57558 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726043AbfE2KAW (ORCPT ); Wed, 29 May 2019 06:00:22 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 96C3825A9C013174C762; Wed, 29 May 2019 18:00:18 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Wed, 29 May 2019 18:00:11 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 4/6] scsi: hisi_sas: Change the type of some numbers to unsigned Date: Wed, 29 May 2019 17:58:45 +0800 Message-ID: <1559123927-160502-5-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1559123927-160502-1-git-send-email-john.garry@huawei.com> References: <1559123927-160502-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen It reports a error as follows from some tools at two places in our code: runtime error: left shift of 4 by 29 places cannot be represented in type 'int' So change the type of the two number to unsigned to avoid the error. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 3efb1e72bdab..492ada65d41a 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -1344,7 +1344,7 @@ static void prep_ata_v3_hw(struct hisi_hba *hisi_hba, if (parent_dev && DEV_IS_EXPANDER(parent_dev->dev_type)) hdr->dw0 |= cpu_to_le32(3 << CMD_HDR_CMD_OFF); else - hdr->dw0 |= cpu_to_le32(4 << CMD_HDR_CMD_OFF); + hdr->dw0 |= cpu_to_le32(4U << CMD_HDR_CMD_OFF); switch (task->data_dir) { case DMA_TO_DEVICE: @@ -1412,7 +1412,7 @@ static void prep_abort_v3_hw(struct hisi_hba *hisi_hba, struct hisi_sas_port *port = slot->port; /* dw0 */ - hdr->dw0 = cpu_to_le32((5 << CMD_HDR_CMD_OFF) | /*abort*/ + hdr->dw0 = cpu_to_le32((5U << CMD_HDR_CMD_OFF) | /*abort*/ (port->id << CMD_HDR_PORT_OFF) | (dev_is_sata(dev) << CMD_HDR_ABORT_DEVICE_TYPE_OFF) |