Received: by 10.213.65.68 with SMTP id h4csp307367imn; Tue, 13 Mar 2018 05:10:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELv+5XdUeuPEyArW/vCFmoQeTesCVs+buuGSNmd1I3Z0uofZg3jeE2/hmykhgPQcj+8H1jm1 X-Received: by 2002:a17:902:724b:: with SMTP id c11-v6mr380524pll.352.1520943053195; Tue, 13 Mar 2018 05:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520943053; cv=none; d=google.com; s=arc-20160816; b=Ocqj1ALm0lBwo1Ph+QOCdoBzAohklMX8PRlv4z8GXrGwhCfyobjRqk72Q9zC1+64vT 2+nVyvDVhOoP/iji5Ur5Jwq9ubQThumWTB+xCrvsnMI8eL1Rf5ckEcj1PP8v47XOuuzD 7g+4Xm3BzITyZOI2HeqRc30zV4CXizt33JnWkwSAnCvKJP+srkQjXrGqgcawQxiOWfkf CxRnfQOf5/NNFbleBoF+bWnVov7XBtS3c58xHMk80o42XN1fBSoYee1PapyYhFRcfaQe LY7lz0c+iu99o+HEENDFT6UXo2/4Sop8SbrF3nTGku/MJhR5eZMVHG69pIU76dPbZXrR cBmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Jzqusa1vyk0XIN7qLgJfBJJN6ADl+15APLU8+y90/mQ=; b=Gmby4X8hakt1I5TyIO+LY+cPkdElHTjW/S9td9u7ZzLdh5YF0bDgalcUfHCDrp9QIV xMPnSSXnOkaAzKY9U0UMV4pluMt0n6Gw0Dvof8fAs+aRKuuM2hZpfDbfL34LQmPbU2ag Zrud5WWWDjs8m0IidiJTXNvSia+BZ8EF6ri1d1DTvY9anFjvNwZq2TSIf+yePrxIncZO BpbEh6nvGtEhgIvPPS2xFeGqSW9C3AH3vpKMQwUVlP77IMlkeeMr5ELldP7nP1yAQyUx pJ2Q9I2bqxnLzl5zrkpdD+2lqvgYM4nnsni76vQ8xX/LgmX4VGjkKKMFwsl2J++PgUfT ONRA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si42322pgt.225.2018.03.13.05.10.38; Tue, 13 Mar 2018 05:10:53 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933521AbeCMMI5 (ORCPT + 99 others); Tue, 13 Mar 2018 08:08:57 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53142 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932527AbeCMMIx (ORCPT ); Tue, 13 Mar 2018 08:08:53 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1evija-0005TJ-2c; Tue, 13 Mar 2018 12:08:50 +0000 From: Colin King To: James Smart , Dick Kennedy , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype Date: Tue, 13 Mar 2018 12:08:49 +0000 Message-Id: <20180313120849.30128-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King There are several unions that are local to the source and do not need to be in global scope, so make them static. Also add in a missing void parameter to functions lpfc_nvme_cmd_template and lpfc_nvmet_cmd_template to clean up non-ANSI warning. Cleans up sparse warnings: drivers/scsi/lpfc/lpfc_nvme.c:68:19: warning: symbol 'lpfc_iread_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvme.c:69:19: warning: symbol 'lpfc_iwrite_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvme.c:70:19: warning: symbol 'lpfc_icmnd_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvme.c:74:24: warning: non-ANSI function 'lpfc_tsend_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:78:19: warning: symbol 'lpfc_treceive_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:79:19: warning: symbol 'lpfc_trsp_cmd_template' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:83:25: warning: non-ANSI function declaration of function 'lpfc_nvmet_cmd_template' Signed-off-by: Colin Ian King --- drivers/scsi/lpfc/lpfc_nvme.c | 8 ++++---- drivers/scsi/lpfc/lpfc_nvmet.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 52dd9479b538..378dca40ca20 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -65,13 +65,13 @@ lpfc_release_nvme_buf(struct lpfc_hba *, struct lpfc_nvme_buf *); static struct nvme_fc_port_template lpfc_nvme_template; -union lpfc_wqe128 lpfc_iread_cmd_template; -union lpfc_wqe128 lpfc_iwrite_cmd_template; -union lpfc_wqe128 lpfc_icmnd_cmd_template; +static union lpfc_wqe128 lpfc_iread_cmd_template; +static union lpfc_wqe128 lpfc_iwrite_cmd_template; +static union lpfc_wqe128 lpfc_icmnd_cmd_template; /* Setup WQE templates for NVME IOs */ void -lpfc_nvme_cmd_template() +lpfc_nvme_cmd_template(void) { union lpfc_wqe128 *wqe; diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 07f89524c320..7271c9d885dd 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -74,13 +74,13 @@ static int lpfc_nvmet_unsol_ls_issue_abort(struct lpfc_hba *, static void lpfc_nvmet_wqfull_flush(struct lpfc_hba *, struct lpfc_queue *, struct lpfc_nvmet_rcv_ctx *); -union lpfc_wqe128 lpfc_tsend_cmd_template; -union lpfc_wqe128 lpfc_treceive_cmd_template; -union lpfc_wqe128 lpfc_trsp_cmd_template; +static union lpfc_wqe128 lpfc_tsend_cmd_template; +static union lpfc_wqe128 lpfc_treceive_cmd_template; +static union lpfc_wqe128 lpfc_trsp_cmd_template; /* Setup WQE templates for NVME IOs */ void -lpfc_nvmet_cmd_template() +lpfc_nvmet_cmd_template(void) { union lpfc_wqe128 *wqe; -- 2.15.1