Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp995253ybe; Thu, 19 Sep 2019 07:08:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqx58Iz18RptksgWl8az2IjBapooUuoJPxjygsWZU5dHU7c/r99yAIZoBSCarKG37RPa8bBG X-Received: by 2002:a17:906:d922:: with SMTP id rn2mr6432797ejb.124.1568902110018; Thu, 19 Sep 2019 07:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568902110; cv=none; d=google.com; s=arc-20160816; b=0HnWgy8Do1wo/A2n2g2yF9KMSOG7MRuJ/8iGeW+Kh/Xsz3SAZl8+7K1kW9nBa0TGcX tkvtMh42kgM13lZfy7bKLXkb4bT8GyZplGZtNDsTCAp8vsO21SsJMSGP9xV24Eq7BYab se1Gor135SCtnwwxhqxbnVlqoHX9YGoTYRq3Z2WJbaEYfe14iuXxX03k4w5tHAgByVXD 9Yc3LaQSMubh0CDW2/Gv7MZUXIJrh70ghFytgI4rjwzu7fCuqxgkTiTodDP4ooUM3KLl m0S7qpAaZZNupO5I/0uxGs+9uYTd1BsvGMhldGCEcG14aH1xhvLeKtSZdZZAgaDzwBzy MQ0A== 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; bh=kPGJl5F2eRxrS8ALMyVMPRxYnDTy9V28Z+ATL9J7tLQ=; b=TygAUQU7T8mYk2IIETC/fEqMbqkLg3EHfJx71NJvrq38n6zi9kqtm9/00AvknjDYQp S6lUG67z1MWX4H7fN/VoE+KV7tY470bdr42Ji8M2M3j59U3LoyTSfEOyJm8305AwjnL0 /P9nQbj9hzVhKMEeSU4UHWylS+8TF0m9e1y/sGnoxEywxpuF3sBEglHTdrlyTjita2ft tLA8y4gngsuOogsnPhfIdigYj3fjUJAfTVlw/WwAJFj/cXdq0klBR4OK0kHupZdASA95 rhRrVSZscE/06vtLDIyoNPP87t+7r3VpM8bU1xJ6UkMo+3Xw+K8c/KCxoXyMLGe0XBM4 mq2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si4487998ejc.159.2019.09.19.07.08.01; Thu, 19 Sep 2019 07:08:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388656AbfISOHR (ORCPT + 99 others); Thu, 19 Sep 2019 10:07:17 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:42117 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387729AbfISOHQ (ORCPT ); Thu, 19 Sep 2019 10:07:16 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MORIm-1iZmOB2Z3e-00PuQo; Thu, 19 Sep 2019 16:06:53 +0200 From: Arnd Bergmann To: Zhou Wang , Herbert Xu , "David S. Miller" Cc: Arnd Bergmann , Kenneth Lee , Shiju Jose , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] [v2] crypto: hisilicon - avoid unused function warning Date: Thu, 19 Sep 2019 16:05:52 +0200 Message-Id: <20190919140650.1289963-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ZwJdmyrwyvAI76lZVS7F1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zGKRS9MwIUWcdVdRBbG5G5nHRY4MPFf04IO5O0Sgt5+WWiCwWdg1tYC5Csg7eY+ISUMP gswxLundN5wmNmm4jHiA== Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The only caller of hisi_zip_vf_q_assign() is hidden in an #ifdef, so the function causes a warning when CONFIG_PCI_IOV is disabled: drivers/crypto/hisilicon/zip/zip_main.c:740:12: error: unused function 'hisi_zip_vf_q_assign' [-Werror,-Wunused-function] Replace the #ifdef with an IS_ENABLED() check that leads to the function being dropped based on the configuration. Fixes: 79e09f30eeba ("crypto: hisilicon - add SRIOV support for ZIP") Signed-off-by: Arnd Bergmann --- drivers/crypto/hisilicon/zip/zip_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c index 6e0ca75585d4..1b2ee96c888d 100644 --- a/drivers/crypto/hisilicon/zip/zip_main.c +++ b/drivers/crypto/hisilicon/zip/zip_main.c @@ -785,7 +785,6 @@ static int hisi_zip_clear_vft_config(struct hisi_zip *hisi_zip) static int hisi_zip_sriov_enable(struct pci_dev *pdev, int max_vfs) { -#ifdef CONFIG_PCI_IOV struct hisi_zip *hisi_zip = pci_get_drvdata(pdev); int pre_existing_vfs, num_vfs, ret; @@ -815,9 +814,6 @@ static int hisi_zip_sriov_enable(struct pci_dev *pdev, int max_vfs) } return num_vfs; -#else - return 0; -#endif } static int hisi_zip_sriov_disable(struct pci_dev *pdev) @@ -948,7 +944,8 @@ static struct pci_driver hisi_zip_pci_driver = { .id_table = hisi_zip_dev_ids, .probe = hisi_zip_probe, .remove = hisi_zip_remove, - .sriov_configure = hisi_zip_sriov_configure, + .sriov_configure = IS_ENABLED(CONFIG_PCI_IOV) ? + hisi_zip_sriov_configure : 0, .err_handler = &hisi_zip_err_handler, }; -- 2.20.0