From patchwork Thu Sep 27 00:11:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10617051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DEB47112B for ; Thu, 27 Sep 2018 00:12:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C42172B590 for ; Thu, 27 Sep 2018 00:12:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7EE32B59F; Thu, 27 Sep 2018 00:12:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C3062B590 for ; Thu, 27 Sep 2018 00:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726550AbeI0G11 (ORCPT ); Thu, 27 Sep 2018 02:27:27 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55120 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbeI0G11 (ORCPT ); Thu, 27 Sep 2018 02:27:27 -0400 Received: by mail-wm1-f68.google.com with SMTP id c14-v6so4018450wmb.4; Wed, 26 Sep 2018 17:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4RcO7Xka82eBCqQUf12Pto9/X1Xq+0RNbQUAV8QuDM0=; b=tdYbAId4saJpBi9jMRnJwWgsWGYfudwW6VzqFqsAJlB1+VNYig1gVVrJ0YKmqIfLrx dltpAKoINc5F4Jk94FizZdYBKLrXVlxCc0qKIpktOz0yVLJAstOcQNKOjlMveIzbqybY fh5FxpsHcOAocHHxzQXDvGJRnccpAiWrMlYUZJhDmP+LCTzdKLkl/ZkN1bmHZkFTUbEC sNWvqZ0FTXb/RvrPrJShc0KsSBVlE4s82TYF4Vbx1Qf9ZZDsr7XhucHvvp/zCa/e1Cxx 66ACZw85W/lRTq1aVMJW91WBPdURGadUDJDDlR0REAxAdtDJrRicxx+6J9NJQd+Ipc09 ObqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4RcO7Xka82eBCqQUf12Pto9/X1Xq+0RNbQUAV8QuDM0=; b=ugc0Mp5N8krDgN37JPVmSKb2OF6v3A5QlteXR8BjhLFDrXs1uwhGJBJUsMMrEzAUm0 HMnL9/PdEFghgi/BZAlKT+1W6jVEKhevoDHSzB+FgFGhxe9I6WHH1YWy2AmdOG/RU39s VYFpOt+gR2fCK5WDihGBUBboVPdf5FwtKZ3kWc53yuQOFyR1Ru7j6f7fqZgL+sZImp8T oRngvB+yyufBV21EJL4fJyR+a4fZgMKj9CV6k5oRCiJJw85b+CreLfDIodivPHKEkevW cNqnc5BlrWGpY581pcgaqUo1GmnUrTnygpsGJWZdT6xpi+ryXrAfusx3SCEzgK1tsCxo Y9eA== X-Gm-Message-State: ABuFfoiMRL+p7N/KAiRcsuKdZ692q0PqSNi1QQ/R8a98+CUbJgiANjos q7HX7sChdjJHAvRBt1JS7rk= X-Google-Smtp-Source: ACcGV629yL4+eZfhMHsZXAAC9x8QS/cJjV7YuA0UkRlE3nzxw+wym/VSzhNx5Gi0Oz0CxlI4lL9w0Q== X-Received: by 2002:a1c:1203:: with SMTP id 3-v6mr6268978wms.46.1538007116939; Wed, 26 Sep 2018 17:11:56 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id b138-v6sm694852wmb.1.2018.09.26.17.11.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 17:11:56 -0700 (PDT) From: Nathan Chancellor To: Intel SCU Linux support , Artur Paszkiewicz , "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] scsi: isci: Use proper enumerated type in atapi_d2h_reg_frame_handler Date: Wed, 26 Sep 2018 17:11:50 -0700 Message-Id: <20180927001150.26212-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 ed197bc8e801..2f151708b59a 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) {