Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp775134ybc; Sat, 16 Nov 2019 08:28:18 -0800 (PST) X-Google-Smtp-Source: APXvYqx/b+3bq9BFB7zWMRz62RaZGR/Gmvw69SdJNjKUt3HdYfUU2LfT34XKwYoC1t/oRtBC41Vv X-Received: by 2002:a17:906:6043:: with SMTP id p3mr11052016ejj.103.1573921698249; Sat, 16 Nov 2019 08:28:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921698; cv=none; d=google.com; s=arc-20160816; b=lMwBUl/yM79cDIA7FsL9kiUup4BpoW1JS/ecSUzFg2bjRraEWfmqB7DkDmkBWUSJx+ ylNyV/1yIi50Jgpq+S2tkNmx93j6GYjy1ar6CxWfmr9LUtXBYrxF04zrWkn0TBi3JDXu 8CgnH9qzPH72inF6VRMEJlJGxu04PsDEO0v64wd0uWuKHVvrZcDpdO3i6cf7dURDCsrW /EgMWERP1FFCKia1g8lqaXgGx1SCJ1sJDtoi6JPlPjcGUuwI9dGlKV0YQm6DqiQrGSvM h0Q6A6FLgOy/WUdTpxQbUEHjbktf4XnhSr0rzrAqKKzLycUaVldq9gvKt5iuYBPdxLQX L6fA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HcXT2KvdEpbsVpLlYSk5PHWVzKqV1rt5PkHafnREkgA=; b=Sic67R/GQDJVNwO3zDIklMmcQGHE9NjbF7lY6JI0jm7BQ8SORc1FFtjtFSKhrB1gQS wrALdOp21qhIyJES96dZ6SNUM5Eg19nDInyDJY3s0miFJVzA8+aBnyi9Zl55fBohDt5y qbiridJ1fibSjTIReDVvQD3k2QDZacoBA1UY7J7rso5i9kUPK3V3gUhkTQAAyRKUnRjD wH3T/7IkQI2mDK5zLvHSRYmy+1xuRra6pVK4znElLpxuGbkTuJqSSJiUuWhqm2VVDh2O opMaiXrXlevoPBxvAr1N2JmCmOm/OBhoEBeg9R8YPqhsqaJdq9TqsUsP1mI+67ukN06N zQHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qH3kyZFs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si7719576edx.235.2019.11.16.08.27.53; Sat, 16 Nov 2019 08:28:18 -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=qH3kyZFs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730666AbfKPQZ3 (ORCPT + 99 others); Sat, 16 Nov 2019 11:25:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:45556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728150AbfKPPmF (ORCPT ); Sat, 16 Nov 2019 10:42:05 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E05C82072D; Sat, 16 Nov 2019 15:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918925; bh=RUmIk2AyAHnF+oOB0qFKnfPjkDLo8tbmg3+ir3tzxSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qH3kyZFshW9i0jrGR35j7NEh8xp59BdeGPyD5y9zh7HvH9XOzwmI4nsR9Nr+PtJBX nd+nGV3dwmEox0eGQHcu7i/qia2tOpDnBY2g5eJdNMo45vFDRs4hhV7rKWUWOhs9cs S2pLYGIiA0qMAjt/fMNUGq9X2ec3znLdx0I3gbK0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 4.19 051/237] scsi: isci: Use proper enumerated type in atapi_d2h_reg_frame_handler Date: Sat, 16 Nov 2019 10:38:06 -0500 Message-Id: <20191116154113.7417-51-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 e9e9a103528c7e199ead6e5374c9c52cf16b5802 ] Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/isci/request.c:1629:13: warning: implicit conversion from enumeration type 'enum sci_io_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = SCI_IO_FAILURE_RESPONSE_VALID; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/isci/request.c:1631:12: warning: implicit conversion from enumeration type 'enum sci_io_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = SCI_IO_FAILURE_RESPONSE_VALID; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ status is of type sci_status but SCI_IO_FAILURE_RESPONSE_VALID is of type sci_io_status. Use SCI_FAILURE_IO_RESPONSE_VALID, which is from sci_status and has SCI_IO_FAILURE_RESPONSE_VALID's exact value since that is what SCI_IO_FAILURE_RESPONSE_VALID is mapped to in the isci.h file. 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/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index ed197bc8e801a..2f151708b59ae 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -1626,9 +1626,9 @@ static enum sci_status atapi_d2h_reg_frame_handler(struct isci_request *ireq, if (status == SCI_SUCCESS) { if (ireq->stp.rsp.status & ATA_ERR) - status = SCI_IO_FAILURE_RESPONSE_VALID; + status = SCI_FAILURE_IO_RESPONSE_VALID; } else { - status = SCI_IO_FAILURE_RESPONSE_VALID; + status = SCI_FAILURE_IO_RESPONSE_VALID; } if (status != SCI_SUCCESS) { -- 2.20.1