Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp645407ybe; Thu, 19 Sep 2019 01:14:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMkeQRBPRSRuPINrbOxpIpuXNMb33Vh7qhJoFfT2sSj/v4EZm02Npffut3cg2DWrnSqyLf X-Received: by 2002:a17:906:fd0:: with SMTP id c16mr4601949ejk.213.1568880858882; Thu, 19 Sep 2019 01:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568880858; cv=none; d=google.com; s=arc-20160816; b=QeogvSO30O0UpdFddt1fRUe/7C7HqznJ+ke1ta6kFx8O/u97cPrAXQTUTodg7OTAkh LJhguV69jDBqOUmm8dgovNcwW9UayxwAWaEA/BzUoncit86vh6Mcm4CUdAlFF3pEsfxV k1mDzCX/In2RnsZ+UZBZlKx8D5FiENNHPTKb1apTF9fW1DkjwLsp9LLslvaiomlycQ6G tCYbEh9cN6dzSQsLYqKo1cwCivaUbKlnM1+h07uiO0lvJ6ve7ZNUQmZydW1osGwaGulC K6FSWmWljzg5OUz5gs+v2ZPArZ/U0+QmR7CJx6hEzaDkNCSnptIYIfPixD02a57O4ejH dPZA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=2hnwn/AXZw9S/hFFcPbT4GOcIxZtRjYMjkHtaMwCqWc=; b=U/DtlAKiCak5TtR5sJ0qvDHDarQnuoF9c9+O2N6rNxGDSO3XbnaeeSOmWPz8U8uHp4 qXgzU7181exSJzBOEoDA4Keh9iX1qDglYS68j2WEymEJgHCVuX8xv/E6HCSHT5tKFCPd vH9aUF0waLoB8CcBQNgJBNw1x6UUyrT99FyQqtKMOP4531TdplXULelbKkfChNExVPn7 Ny06gdDDfzEjDMX3C4sim/AIFjNbYhI0zcoUtxKT/XKkGqGVp1HIBInqqOoUKKtFse9o RRNXWFETqB/T+qXmFTMFilbGMUoO3a5v7u2Kj3Ibkz1dnoCk4JglYuwRR5K2YgvAb3hI Xg9g== 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 f29si4036405ejj.110.2019.09.19.01.13.48; Thu, 19 Sep 2019 01:14:18 -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 S1731681AbfISIL3 (ORCPT + 99 others); Thu, 19 Sep 2019 04:11:29 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2735 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727033AbfISIL3 (ORCPT ); Thu, 19 Sep 2019 04:11:29 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 81500F5F3AA2D190C1C0; Thu, 19 Sep 2019 16:11:25 +0800 (CST) Received: from [127.0.0.1] (10.63.139.185) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Thu, 19 Sep 2019 16:11:15 +0800 Subject: Re: [PATCH 2/2] crypto: hisilicon - avoid unused function warning To: Herbert Xu , Arnd Bergmann References: <20190906152250.1450649-1-arnd@arndb.de> <20190906152250.1450649-2-arnd@arndb.de> <20190913091718.GA6382@gondor.apana.org.au> CC: "David S. Miller" , Jonathan Cameron , Hao Fang , Kenneth Lee , , From: Zhou Wang Message-ID: <5D833821.5000504@hisilicon.com> Date: Thu, 19 Sep 2019 16:11:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20190913091718.GA6382@gondor.apana.org.au> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.139.185] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2019/9/13 17:17, Herbert Xu wrote: > On Fri, Sep 06, 2019 at 05:22:30PM +0200, Arnd Bergmann wrote: >> 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] >> >> Move it into the same #ifdef. >> >> Fixes: 79e09f30eeba ("crypto: hisilicon - add SRIOV support for ZIP") >> Signed-off-by: Arnd Bergmann >> --- >> drivers/crypto/hisilicon/zip/zip_main.c | 2 ++ >> 1 file changed, 2 insertions(+) > > Please find a way to fix this warning without reducing compiler > coverage. I prefer to see any compile issues immediately rather > than through automated build testing. > > Thanks, > Sorry for missing this patch. Seems other drivers also do like using #ifdef. Do you mean something like this: #ifdef CONFIG_PCI_IOV sriov_enable() ... #else /* stub */ sriov_enable() ... #endif Best, Zhou