Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp341242pxf; Thu, 25 Mar 2021 05:33:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw13BzwTiBoHIGNtDa99HWcZYoeSPpGzhIzS2C8XUQ6sbXMV6g6rs3iIdci20MkfHhLj1hf X-Received: by 2002:a50:ec07:: with SMTP id g7mr8803319edr.72.1616675598040; Thu, 25 Mar 2021 05:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616675598; cv=none; d=google.com; s=arc-20160816; b=fzq6fh/ormUg+xJnL6BO3cUMV2RZYlTlHgIP8FTNumqJeYzbke7leapuCquKOnsbFi YRi/KSBg/FXB4y4lhtbHiOxhEH7DZR3a8jX1snF195h1iL48debqn2VXMVErDKl5d23t QgaGKQAeLGPGSjFXTLLpB41PBLhmbopVafERpMlE1r3tNsJ2PwoCXd2aKK9vmlYUX3aA NZ0K1KdyaIRuP9dRbrL78ro11Cj7HGkBLmGihEzqcra7liotRJR/wLJtvMDFBdMcNm9P lpoiXA9O/3cMpEv2D+25PQlrCJEoNfZCzQObHvVuBxr3g1yGvkYuIaHCExA/qR15ArSP Cfbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Fxhp2r2kHs8EnJud58XcZ4UcbTFDl2fUwAT5XxtCN+8=; b=AkcnTLPdAtf5pkT1gspY4qfXSF9zdw03M8/sIteboi17TCqyNjNCNAnrLQ+Y2UC/oO IWshGHPBUPUx7z/TdTnlJg1/dQ7jYbnTwRinXHn8+O8zn6AZkzHKVLULWOGZUdMH5+RF FuyRF9NTxs4MNE0YMU9zLMy5u5p+hUf+I+/OIzW5RFzWOV4Z17zBYBiBl5R5WshmOL8E KOKheJQUcoF9FTv2+lm0dNc/Yw4LR33VW48rUjWTp4G+yF5j5XhbK3JSwhGoH6q5V4Mv WPCLCHrH76iFGM8XYXEPH4BfJQbv93ld77vEU1sz6icuoJp6AshG/KwYi74wun0uffcS M/NA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx22si4114654ejb.415.2021.03.25.05.32.55; Thu, 25 Mar 2021 05:33:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231214AbhCYMaG (ORCPT + 99 others); Thu, 25 Mar 2021 08:30:06 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14591 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbhCYM3h (ORCPT ); Thu, 25 Mar 2021 08:29:37 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F5krg58P1z19H5L; Thu, 25 Mar 2021 20:27:31 +0800 (CST) Received: from huawei.com (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Mar 2021 20:29:23 +0800 From: Luo Jiaxing To: , , , CC: , , , , Subject: [PATCH v1 1/2] scsi: libsas: make switch and case at the same indent in sas_to_ata_err() Date: Thu, 25 Mar 2021 20:29:55 +0800 Message-ID: <1616675396-6108-2-git-send-email-luojiaxing@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1616675396-6108-1-git-send-email-luojiaxing@huawei.com> References: <1616675396-6108-1-git-send-email-luojiaxing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One checkpatch error is found in sas_to_ata_err() that switch and case is not at the same indent. So fix it. Signed-off-by: Luo Jiaxing --- drivers/scsi/libsas/sas_ata.c | 74 ++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 9f7fe67..4e4b55d 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -35,46 +35,40 @@ static enum ata_completion_errors sas_to_ata_err(struct task_status_struct *ts) /* ts->resp == SAS_TASK_COMPLETE */ /* task delivered, what happened afterwards? */ switch (ts->stat) { - case SAS_DEV_NO_RESPONSE: - return AC_ERR_TIMEOUT; - - case SAS_INTERRUPTED: - case SAS_PHY_DOWN: - case SAS_NAK_R_ERR: - return AC_ERR_ATA_BUS; - - - case SAS_DATA_UNDERRUN: - /* - * Some programs that use the taskfile interface - * (smartctl in particular) can cause underrun - * problems. Ignore these errors, perhaps at our - * peril. - */ - return 0; - - case SAS_DATA_OVERRUN: - case SAS_QUEUE_FULL: - case SAS_DEVICE_UNKNOWN: - case SAS_SG_ERR: - return AC_ERR_INVALID; - - case SAS_OPEN_TO: - case SAS_OPEN_REJECT: - pr_warn("%s: Saw error %d. What to do?\n", - __func__, ts->stat); - return AC_ERR_OTHER; - - case SAM_STAT_CHECK_CONDITION: - case SAS_ABORTED_TASK: - return AC_ERR_DEV; - - case SAS_PROTO_RESPONSE: - /* This means the ending_fis has the error - * value; return 0 here to collect it */ - return 0; - default: - return 0; + case SAS_DEV_NO_RESPONSE: + return AC_ERR_TIMEOUT; + case SAS_INTERRUPTED: + case SAS_PHY_DOWN: + case SAS_NAK_R_ERR: + return AC_ERR_ATA_BUS; + case SAS_DATA_UNDERRUN: + /* + * Some programs that use the taskfile interface + * (smartctl in particular) can cause underrun + * problems. Ignore these errors, perhaps at our + * peril. + */ + return 0; + case SAS_DATA_OVERRUN: + case SAS_QUEUE_FULL: + case SAS_DEVICE_UNKNOWN: + case SAS_SG_ERR: + return AC_ERR_INVALID; + case SAS_OPEN_TO: + case SAS_OPEN_REJECT: + pr_warn("%s: Saw error %d. What to do?\n", + __func__, ts->stat); + return AC_ERR_OTHER; + case SAM_STAT_CHECK_CONDITION: + case SAS_ABORTED_TASK: + return AC_ERR_DEV; + case SAS_PROTO_RESPONSE: + /* This means the ending_fis has the error + * value; return 0 here to collect it + */ + return 0; + default: + return 0; } } -- 2.7.4