Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5977069ybc; Wed, 27 Nov 2019 12:45:23 -0800 (PST) X-Google-Smtp-Source: APXvYqycYZOLkQahEjTqGH8+RwNrrtVJJsPktnustwg4pDcpXWpa1h6H4eq8krC7ufQDx4pyiIPi X-Received: by 2002:a17:906:751:: with SMTP id z17mr50545538ejb.313.1574887523818; Wed, 27 Nov 2019 12:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574887523; cv=none; d=google.com; s=arc-20160816; b=gc0+KeuiAUJ1V78Xlsw9poKeeySLsphw4HL++vwPu/mgpGXczJLtQF3wqrkjAYZFMr O+UG5byt3QHDq1cHpTsGZocKZjZYsGIy0V4IsTNuCEk8TnmCONF4Th5RW9jvKdTm0lXF W2OLFXfL5n16lhQnHx9IZWHYENVrDejK/ottYb8hC5THD1PX8xBYnOo5/pMS0E0bDbju zkcNVXJ/BGUnVn/x/3KNBt0/RrEA14uRQqWJ2vI59yudzFj4cDYq3g14CvHouR1oScRD LLU5S3+GflklEjsG4XQqZ/EqVU4+dbCh0+C1y+ZRUn9wZRUTvnov8NZmnptuc+QAzp5b X+0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tXw16BFDT2zjWFdBgZwpM511geHgNliyoe1t+QRRIIk=; b=EniAqSge05YBUgtw32XM5j/56JTQsQhBYOIv7fJqCL9LzIMINWMVApsbQDZIMjmIY0 m7+4ddLuerZ/TdwetlS4Rl6AkbqfEeFsfNLepnp91MLiXSFRFQ24Cfd4N4Ty5Jb2T68w Fz9Uc4GsY3IbkkCL+ow5mR4UYW+hfK+45ajEIxm+aHOmamQFV+OMSyY8E8L9255NstMl i+jSRv9fY+Y8oabT/6s7DzQYIAfy90rmWyZOQOlmDD/aff0rstJO7j6EB2i7+nquY6wF HntcUA3VlSTarcDqASbKbEaTsmoz0Klf4t7JJU8E14y8jKhtWDKmJN7OyxfpC6uPVdLZ suGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f51ojN7x; 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 b16si828278ejd.79.2019.11.27.12.44.59; Wed, 27 Nov 2019 12:45:23 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=f51ojN7x; 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 S1729044AbfK0Ukd (ORCPT + 99 others); Wed, 27 Nov 2019 15:40:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:45120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729042AbfK0Ukb (ORCPT ); Wed, 27 Nov 2019 15:40:31 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E031C20863; Wed, 27 Nov 2019 20:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887230; bh=detVZUwgRyHVtddSUN/iavcWIqSHjmcqFrt8yqmE6bQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f51ojN7xDpUPdiWAzt6UdAR/ywSdvCyZ/siBU1+dUDfaMy3P+VUMBCuGruiITVByp O5OnEG/Dq7EkBF/1zy1VgqXJGmhVf8EQnnCTJwg4WYsQLfkpFJQyVX3Xn0WHoPDEwp FRj4NnM1JZtGmw82TUv8Z7LkQlB1zvOSkao1T/eY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.9 031/151] scsi: isci: Change sci_controller_start_tasks return type to sci_status Date: Wed, 27 Nov 2019 21:30:14 +0100 Message-Id: <20191127203019.935095356@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 362b5da3dfceada6e74ecdd7af3991bbe42c0c0f ] Clang warns when an enumerated type is implicitly converted to another. drivers/scsi/isci/request.c:3476:13: warning: implicit conversion from enumeration type 'enum sci_task_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = sci_controller_start_task(ihost, ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/isci/host.c:2744:10: warning: implicit conversion from enumeration type 'enum sci_status' to different enumeration type 'enum sci_task_status' [-Wenum-conversion] return SCI_SUCCESS; ~~~~~~ ^~~~~~~~~~~ drivers/scsi/isci/host.c:2753:9: warning: implicit conversion from enumeration type 'enum sci_status' to different enumeration type 'enum sci_task_status' [-Wenum-conversion] return status; ~~~~~~ ^~~~~~ Avoid all of these implicit conversion by just making sci_controller_start_task use sci_status. This silences Clang and has no functional change since sci_task_status has all of its values mapped to something in sci_status. Link: https://github.com/ClangBuiltLinux/linux/issues/153 Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/isci/host.c | 8 ++++---- drivers/scsi/isci/host.h | 2 +- drivers/scsi/isci/task.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index 609dafd661d14..da4583a2fa23e 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c @@ -2717,9 +2717,9 @@ enum sci_status sci_controller_continue_io(struct isci_request *ireq) * the task management request. * @task_request: the handle to the task request object to start. */ -enum sci_task_status sci_controller_start_task(struct isci_host *ihost, - struct isci_remote_device *idev, - struct isci_request *ireq) +enum sci_status sci_controller_start_task(struct isci_host *ihost, + struct isci_remote_device *idev, + struct isci_request *ireq) { enum sci_status status; @@ -2728,7 +2728,7 @@ enum sci_task_status sci_controller_start_task(struct isci_host *ihost, "%s: SCIC Controller starting task from invalid " "state\n", __func__); - return SCI_TASK_FAILURE_INVALID_STATE; + return SCI_FAILURE_INVALID_STATE; } status = sci_remote_device_start_task(ihost, idev, ireq); diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 22a9bb1abae14..15dc6e0d8deb0 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h @@ -490,7 +490,7 @@ enum sci_status sci_controller_start_io( struct isci_remote_device *idev, struct isci_request *ireq); -enum sci_task_status sci_controller_start_task( +enum sci_status sci_controller_start_task( struct isci_host *ihost, struct isci_remote_device *idev, struct isci_request *ireq); diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 6dcaed0c1fc8c..fb6eba331ac6e 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c @@ -258,7 +258,7 @@ static int isci_task_execute_tmf(struct isci_host *ihost, struct isci_tmf *tmf, unsigned long timeout_ms) { DECLARE_COMPLETION_ONSTACK(completion); - enum sci_task_status status = SCI_TASK_FAILURE; + enum sci_status status = SCI_FAILURE; struct isci_request *ireq; int ret = TMF_RESP_FUNC_FAILED; unsigned long flags; @@ -301,7 +301,7 @@ static int isci_task_execute_tmf(struct isci_host *ihost, /* start the TMF io. */ status = sci_controller_start_task(ihost, idev, ireq); - if (status != SCI_TASK_SUCCESS) { + if (status != SCI_SUCCESS) { dev_dbg(&ihost->pdev->dev, "%s: start_io failed - status = 0x%x, request = %p\n", __func__, -- 2.20.1