From patchwork Wed Nov 8 16:02:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sathya Prakash Veerichetty X-Patchwork-Id: 10048731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB615603FA for ; Wed, 8 Nov 2017 16:02:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB1852A66B for ; Wed, 8 Nov 2017 16:02:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FD382A6B5; Wed, 8 Nov 2017 16:02:42 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 EBDC62A66B for ; Wed, 8 Nov 2017 16:02:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750760AbdKHQCk (ORCPT ); Wed, 8 Nov 2017 11:02:40 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:46590 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbdKHQCi (ORCPT ); Wed, 8 Nov 2017 11:02:38 -0500 Received: by mail-qk0-f181.google.com with SMTP id o6so3926009qkh.3 for ; Wed, 08 Nov 2017 08:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:references:in-reply-to:mime-version:thread-index:date :message-id:subject:to:cc; bh=OA6ed/GT6ZLn7m89keGKmy9xVWtT9KeVwbhTcT8Bfco=; b=G0kjPowjMAzhYr3wBJoithJZM8NssObi+rZuHKbpnxiXUrFbhQvNO0AwTiUtsSr5Yc 2SWfiJLZ04VHa1XFwHQ2J1r5C04+feybAQxTTFKnKbui1UQ/sG3zgANZKbcauBcatLuX nnZp0/ELYsWh7PjPN5ICqzlh96utYD2HOhI1s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc; bh=OA6ed/GT6ZLn7m89keGKmy9xVWtT9KeVwbhTcT8Bfco=; b=AIm/pzwoRcniy9pk8DHJeBM6ghM3UDGO5znNKhVl560JfXcZd51H0ZKIQAvFx+HVee KzAT+pdYa2sVqAUfvsTfhi/ZwLnSN9Er/rPiJFQ+hZn+zHg1BV1HdSZwhyyC0eWNPMo4 tUgGiTNW772m5DdTewQ5T6NqZX4PaEGF1W+bHxjAOO1L8n2MmeGXyYnrp2+hsMQZZVGQ Cw51wQ30m0AcVAutMR856nR9MkIYhWCsHt+bBehUyEO9IuqWAbimvTzME5Ya3ed26JqW tKQ4Gv3BGCXUsCkPwwngQvWBW17M5A8TJ7jKYZbsQEOSmioy24GeMBOnqstwwiZsZKgI s6UA== X-Gm-Message-State: AJaThX6s0Je8IFZ764Zoqs2EArFWGbdWLc7mqd7ghCvbJ5QemlSXe7O3 wjm2qFST8fRhniYkKQkEguFjDHkRSkUBgwdPbwDW X-Google-Smtp-Source: ABhQp+SAKPqP9tws9UDZ7zRmnMDShdCxWhwrmgTrCCfTOWPEv6LZV+4Ws/6gb4YYxuQNbE1ZnKTjMqdogCatxqFCKOA= X-Received: by 10.55.207.20 with SMTP id e20mr1547047qkj.1.1510156957960; Wed, 08 Nov 2017 08:02:37 -0800 (PST) From: Sathya Prakash Veerichetty References: <20171108082101.wwseluw5bwnsgwue@mwanda> In-Reply-To: <20171108082101.wwseluw5bwnsgwue@mwanda> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIC15MdiI0fxkmMEzvJHv+2AgsQsKKrpleg Date: Wed, 8 Nov 2017 09:02:36 -0700 Message-ID: <8864f0cfd553b70171d8bffac6587e32@mail.gmail.com> Subject: RE: [PATCH 1/2] scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event() To: Dan Carpenter , Suganath Prabu Subramani Cc: Chaitra Basappa , "James E.J. Bottomley" , "Martin K. Petersen" , PDL-MPT-FUSIONLINUX , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org 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 Thanks. Acked-by: Sathya Prakash Veerichetty -----Original Message----- From: Dan Carpenter [mailto:dan.carpenter@oracle.com] Sent: Wednesday, November 8, 2017 1:38 AM To: Sathya Prakash; Suganath Prabu Subramani Cc: Chaitra P B; James E.J. Bottomley; Martin K. Petersen; MPT-FusionLinux.pdl@broadcom.com; linux-scsi@vger.kernel.org; kernel-janitors@vger.kernel.org Subject: [PATCH 1/2] scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event() The indenting wasn't right, because the last two prints weren't indented far enough. Also it used pr_info() where it was supposed to use pr_cont(). I reversed the if statement and pulled the code in one tab and did a couple other minor cleanups. Fixes: 4318c7347847 ("scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware.") Signed-off-by: Dan Carpenter } /** diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 3a9438a1704e..93b45e618edb 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -7700,17 +7700,18 @@ _scsih_pcie_enumeration_event(struct MPT3SAS_ADAPTER *ioc, Mpi26EventDataPCIeEnumeration_t *event_data = (Mpi26EventDataPCIeEnumeration_t *)fw_event->event_data; - if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK) { - pr_info(MPT3SAS_FMT "pcie enumeration event: (%s) Flag 0x%02x", - ioc->name, - ((event_data->ReasonCode == - MPI26_EVENT_PCIE_ENUM_RC_STARTED) ? - "started" : "completed"), event_data->Flags); + if (!(ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK)) + return; + + pr_info(MPT3SAS_FMT "pcie enumeration event: (%s) Flag 0x%02x", + ioc->name, + (event_data->ReasonCode == MPI26_EVENT_PCIE_ENUM_RC_STARTED) ? + "started" : "completed", + event_data->Flags); if (event_data->EnumerationStatus) - pr_info("enumeration_status(0x%08x)", - le32_to_cpu(event_data->EnumerationStatus)); - pr_info("\n"); - } + pr_cont("enumeration_status(0x%08x)", + le32_to_cpu(event_data->EnumerationStatus)); + pr_cont("\n");