Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3659965pxf; Mon, 29 Mar 2021 08:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw14W58cSZknQ4qaKCgKvn8eWsDKzbiSvVAKkD/xJcUzFV19UB3OMoBsSnekqQAQaUBrpU9 X-Received: by 2002:a05:6402:488:: with SMTP id k8mr28707802edv.233.1617030453068; Mon, 29 Mar 2021 08:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617030453; cv=none; d=google.com; s=arc-20160816; b=pKtlKR+3HoW0lNidvPDIWq98bpnCf7WMlTE9HqDXD8KZwf3B+aLnQd2+D0ALlxS+N2 mYOx4R9DuYwWGdHpSCnLAOS+i5vmuVB/6DSNDEmsdq5GDjZcHSEyW4zXFiyuOqJl0tfv irTUPb1EpVFMyNKfOxMTNPxHHlKyGMNfF9WEJEGK4UwvZ21hVQHabHLTX31AXDQdG+x0 VwtN4WKofKniNhnzVoKgShrZLB+er/Xb+t4h7g+T2xRsh8zYQ3RY8Wjnjlh51kMCGDzO nCPhC6fwtHCoYqk5p+uAqTD3m4IU2mhgKtZddOp0R3PZ513W03UJwFjw4KRFPGse9Zgv SVnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=I917hkKis9+Jyj+WfkGqMvHeY5Txl+pWtrlwm3z5lrI=; b=wkgNL1rMT/kvRbQi+zpYWIoIyAMVQsmcgw/OSmSfIqriP5Ohcw8A32Y7vddx2OpLjN +0RLBPE57mKJbRIOfyDPr/Od+WVK9fnGdSX/23QjQNI+XR1s1y2fbLavm5JL2pKks/t6 319J3Ndd8xZsZdzmSg0XPy1taOOD8sE9vy/S64OWfo51deaUs6fvZ6+8zz4AXwiR3yCh avFHQHXOVRyYfvvob3lQCyBjZhg2yWe5wW/rtGHb8bGWXc26Xml5hifTjbYgxWVm+lbq vENIvFwbnDJOXpENTUOGxb6R/GIXs6bxYfkMLqDL2z8RHbN9wWAuQ8Q28eQCn0uyHkBN 1ejA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si12528163edy.129.2021.03.29.08.07.09; Mon, 29 Mar 2021 08:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbhC2PFx (ORCPT + 99 others); Mon, 29 Mar 2021 11:05:53 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15033 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbhC2PFi (ORCPT ); Mon, 29 Mar 2021 11:05:38 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4F8G692hljzPm24; Mon, 29 Mar 2021 23:02:57 +0800 (CST) Received: from localhost (10.174.179.96) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 23:05:26 +0800 From: YueHaibing To: , , , , CC: , Subject: [PATCH -next] ASoC: dwc: Fix -Wmissing-prototypes warnings Date: Mon, 29 Mar 2021 23:05:24 +0800 Message-ID: <20210329150524.18184-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.179.96] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org while CONFIG_SND_DESIGNWARE_PCM is not set, building with W=1 shows this: sound/soc/dwc/local.h:127:6: warning: no previous prototype for ‘dw_pcm_push_tx’ [-Wmissing-prototypes] void dw_pcm_push_tx(struct dw_i2s_dev *dev) { } ^~~~~~~~~~~~~~ sound/soc/dwc/local.h:128:6: warning: no previous prototype for ‘dw_pcm_pop_rx’ [-Wmissing-prototypes] void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { } ^~~~~~~~~~~~~ sound/soc/dwc/local.h:129:5: warning: no previous prototype for ‘dw_pcm_register’ [-Wmissing-prototypes] int dw_pcm_register(struct platform_device *pdev) ^~~~~~~~~~~~~~~ Change these to inline functions to fix the warnings. Signed-off-by: YueHaibing --- sound/soc/dwc/local.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/dwc/local.h b/sound/soc/dwc/local.h index 91dc70a826f8..1c361eb6127e 100644 --- a/sound/soc/dwc/local.h +++ b/sound/soc/dwc/local.h @@ -124,9 +124,9 @@ void dw_pcm_push_tx(struct dw_i2s_dev *dev); void dw_pcm_pop_rx(struct dw_i2s_dev *dev); int dw_pcm_register(struct platform_device *pdev); #else -void dw_pcm_push_tx(struct dw_i2s_dev *dev) { } -void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { } -int dw_pcm_register(struct platform_device *pdev) +static inline void dw_pcm_push_tx(struct dw_i2s_dev *dev) { } +static inline void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { } +static inline int dw_pcm_register(struct platform_device *pdev) { return -EINVAL; } -- 2.17.1