From patchwork Thu Jun 6 05:24:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10978563 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 C618976 for ; Thu, 6 Jun 2019 05:25:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6A1E28505 for ; Thu, 6 Jun 2019 05:25:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7D31285A9; Thu, 6 Jun 2019 05:25:25 +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 4A72C28505 for ; Thu, 6 Jun 2019 05:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726014AbfFFFZU (ORCPT ); Thu, 6 Jun 2019 01:25:20 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:45863 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725766AbfFFFZT (ORCPT ); Thu, 6 Jun 2019 01:25:19 -0400 Received: by mail-ed1-f65.google.com with SMTP id f20so1413736edt.12; Wed, 05 Jun 2019 22:25:18 -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=00NtuWrsyVE2KaeNTYmLsj1+sMztB1U/+E3rdIAWfoU=; b=S9UBJC79AUUuxGmaiRcKs1KBmR+FQxOYnPg1ybmLiy4r+DM7o4R1nsKuoT7DdZ6zQ0 bUOVTmyssgFsIeLCANJVMu2GUu7RePlJen7eGEy6PJqipw5ZuQ6yocsSQf9fwHNl0dw1 uKi2I31hFPCU8cGiscI1ujvm6miI+XM48dLmJ6f7JI+AXlxxfXQWFkwHdpbHZNDSgKn7 G6iLulx8TS/7Zv1naUbOSgl9ioxjh0D8fHRFRv8tgJYUYNebPWH4Ej81GQvdgH1EshA9 Bxv1D42tXchE7if5hzcHRbekyoyhAODClLMkHdrjP/q/JrgMw0cc5IwYS8blzSbscIQa wJug== 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=00NtuWrsyVE2KaeNTYmLsj1+sMztB1U/+E3rdIAWfoU=; b=AogXqyqfyG8FgdHAHTYg+K63iDOIBxvXfjIaZxbgthxGcbsxeoOg4JIL8OKSK0e+1Y KUDsmCXFkdVpGB7YRBJrBSuy1cZo2I58FnvoshO/20nn24wY5nNyhRPfkZRHCvmOM3X6 A6hBQC3kc6faXOS51jtBR8AlB0HsHiQxZGuQmunABMZ26iZpcDfdrUBj715L3fPkiGJU i8NggIArNffQ6lciAr09dPtvxj3fEGcREisAbFHIcSUzUtngaDjWVjqN4SMX/hMxU3w8 Cnqz0rho8BBsZJJHdyL2H10XzP148eOOfj6ZzCVJtgAwsfKga75R9IScltkXjlJArtC/ GwWA== X-Gm-Message-State: APjAAAVDHN2veljkALl3LihcZeyBE5Uju/xBcSXIG/rpEOgCC3v9ax2a zMlA7bbIHDMI+qUusaXzCHAR/4VgA/yZag== X-Google-Smtp-Source: APXvYqzvN1C5Um10JFTSp44SXvalblF76jxPtN7XH4o21Iaclk0+91EW571GWRnvnr1dC+WmzDziOw== X-Received: by 2002:a50:cb0a:: with SMTP id g10mr16209469edi.273.1559798718078; Wed, 05 Jun 2019 22:25:18 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id s22sm186260edm.78.2019.06.05.22.25.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 05 Jun 2019 22:25:17 -0700 (PDT) From: Nathan Chancellor To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, YueHaibing , Nathan Chancellor Subject: [PATCH] scsi: lpfc: Avoid unused function warnings Date: Wed, 5 Jun 2019 22:24:21 -0700 Message-Id: <20190606052421.103469-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0.rc3 MIME-Version: 1.0 X-Patchwork-Bot: notify 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 When building powerpc pseries_defconfig or powernv_defconfig: drivers/scsi/lpfc/lpfc_nvmet.c:224:1: error: unused function 'lpfc_nvmet_get_ctx_for_xri' [-Werror,-Wunused-function] drivers/scsi/lpfc/lpfc_nvmet.c:246:1: error: unused function 'lpfc_nvmet_get_ctx_for_oxid' [-Werror,-Wunused-function] These functions are only compiled when CONFIG_NVME_TARGET_FC is enabled. Use that same condition so there is no more warning. While the fixes commit did not introduce these functions, it caused these warnings. Fixes: 4064b27417a7 ("scsi: lpfc: Make some symbols static") Signed-off-by: Nathan Chancellor Reviewed-by:  James Smart  --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index e471bbcca838..f3d9a5545164 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -220,6 +220,7 @@ lpfc_nvmet_cmd_template(void) /* Word 12, 13, 14, 15 - is zero */ } +#if (IS_ENABLED(CONFIG_NVME_TARGET_FC)) static struct lpfc_nvmet_rcv_ctx * lpfc_nvmet_get_ctx_for_xri(struct lpfc_hba *phba, u16 xri) { @@ -263,6 +264,7 @@ lpfc_nvmet_get_ctx_for_oxid(struct lpfc_hba *phba, u16 oxid, u32 sid) return NULL; } +#endif static void lpfc_nvmet_defer_release(struct lpfc_hba *phba, struct lpfc_nvmet_rcv_ctx *ctxp)