From patchwork Mon Aug 3 14:35:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 6929941 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6800EC05AC for ; Mon, 3 Aug 2015 14:36:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 761F3202FE for ; Mon, 3 Aug 2015 14:36:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D4BF20624 for ; Mon, 3 Aug 2015 14:36:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753161AbbHCOf7 (ORCPT ); Mon, 3 Aug 2015 10:35:59 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38323 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752538AbbHCOf6 (ORCPT ); Mon, 3 Aug 2015 10:35:58 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZMGqH-0003o2-63; Mon, 03 Aug 2015 14:35:53 +0000 From: Colin King To: Anil Gurumurthy , Sudarsana Kalluru , "James E.J. Bottomley" , linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] [SCSI] bfa: fix missing { } braces Date: Mon, 3 Aug 2015 15:35:27 +0100 Message-Id: <1438612527-3707-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.5.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King Static analysis by smatch indicated that there was a curly braces issue: drivers/scsi/bfa/bfa_ioc.c:3668 bfa_cb_sfp_state_query() warn: curly braces intended? drivers/scsi/bfa/bfa_ioc.c:3671 bfa_cb_sfp_state_query() warn: inconsistent indenting drivers/scsi/bfa/bfa_ioc.c:3676 bfa_cb_sfp_state_query() warn: curly braces intended? The fix matches the intended logic based on the original indentation layout of the code. Signed-off-by: Colin Ian King --- drivers/scsi/bfa/bfa_ioc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 315d6d6..59c3492 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c @@ -3662,7 +3662,7 @@ bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp) bfa_trc(sfp, sfp->portspeed); if (sfp->media) { bfa_sfp_media_get(sfp); - if (sfp->state_query_cbfn) + if (sfp->state_query_cbfn) { sfp->state_query_cbfn(sfp->state_query_cbarg, sfp->status); sfp->media = NULL; @@ -3670,14 +3670,16 @@ bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp) if (sfp->portspeed) { sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed); - if (sfp->state_query_cbfn) + if (sfp->state_query_cbfn) { sfp->state_query_cbfn(sfp->state_query_cbarg, sfp->status); sfp->portspeed = BFA_PORT_SPEED_UNKNOWN; + } } sfp->state_query_lock = 0; sfp->state_query_cbfn = NULL; + } } /*