Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7646590ybi; Wed, 5 Jun 2019 22:26:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoJE6LL1ZrzJurD1bmu2tyk97GonaE9Yp7P+VfoyNMscuJ05ZsYQcg1gX8VfyPuNCB+Vzb X-Received: by 2002:a17:90a:6505:: with SMTP id i5mr45988715pjj.13.1559798803763; Wed, 05 Jun 2019 22:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559798803; cv=none; d=google.com; s=arc-20160816; b=N422LItlZHVt6m5VAj/+W3GqvQTMUgybWiowt+pw4FsdZ0U94G97yjtYk/6Cf9biAs bPjVEOiUOp6lJ/hvjjuhB7MWlB+jMla03QBGsr8quX3pLEqZJXVRTghquuvW09zd7bqt gmEZ9gU0BYUGKZuQkORjHRDv+bqmhpJSurNcTTxWBfJykKL5UFbECf1bDR850CKhIykK eM6VLnnY0GlSjRT6gJfM6RquwgdJuuUYZXjqjFiUEo+QMrJ5rSP+wQD8hF2Doe1fHB4J 2QGYg4zvN+9Il4ADwjECdjK5LawfqywdN1GnONPTABGmTuCs/Z3OkDjl6cKvNctrhqA1 uGrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=00NtuWrsyVE2KaeNTYmLsj1+sMztB1U/+E3rdIAWfoU=; b=NbHHCtTuqku/g4neKYTirl54TZ6wcOKQyLgtWJN5y2KB7H8laxhfEjqjMMUV9M84tD KnMBEcdY0N+OWOs+SpxWnYG59CYzSmVkDEOjNSUO0bfGIQH8nXcQBx3npzsjuTW8dovO dqItHh7H2co7WUteiCmO4Gw2x9Tclljw5dWW38c55elyVffL3udjxKYeuEIFz+Wct9ti I32zPdVm6669j9i2tfHkpSs+9Ru9zG0G4ZcD7oW4ESyst2EGTliGk9/1frD/yzVhXBzm lkbfF729+MQdpcF5owpVbRgmYya+00/qgsPEPy4cidf6TkZH/eRYvQsoKPg8Dwm08Bq4 G/tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S9UBJC79; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si875140pfr.65.2019.06.05.22.26.26; Wed, 05 Jun 2019 22:26:43 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S9UBJC79; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726173AbfFFFZU (ORCPT + 99 others); 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-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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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) -- 2.22.0.rc3