Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5897976ybg; Tue, 22 Oct 2019 09:57:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1peccJfM62s8venWU0PeabdbfXD2zH4OYwUUHvxMjuNvn/ylmFAgYqDWMgQaSf8segOma X-Received: by 2002:a17:906:1f57:: with SMTP id d23mr5288544ejk.233.1571763467385; Tue, 22 Oct 2019 09:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571763467; cv=none; d=google.com; s=arc-20160816; b=L5sqcXflFlbvTysCAH4n+wPyWEBCZ9nHimF+3NGEfMXale3ZPuDVlO8yNhDI3Jc8kb DBLRTMblyWgwGFhzJ2HwVmEOj57S9a95wjDFoC9nGEbLaCvL8JwH3nbb/W4bG1NB4voW fI8+C5wBbqG9br/NnkIiGrzO/wzIQqN72CocSPTTH+nCgJljetGXhrSx/r1q6y9+JvRV hoj5EOtzUy0l9CzFsVUuwic+W9Gu8gRsIU6QFXHwXaiIAHHsoRsAn3A2iQZW2QEzYZbH JLWJgL0hzDnpGVpVrQ161XdnmRyEd/U7NSebBhBi9AeRM+9B92bg5FszGzI4W8GB2KJc NSEQ== 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=8a9ikRre4VCjiTwh/0V19pqvT3MVokwuQwA4iXKxMFo=; b=S3ZLTuwNyskjMJcR70Zy5S6KASA1ztWHGq2XiL3vpUIDNIsaVjqj5H12odqSWp1zqs Og1Ujo/Bjjty/idLSfWmhAkxfFKJyuKAdKEW2efSm0cvKOtzMBjMetnnmJG3v26EdRGW sn5IpuEW9bNqe1wig3lptsywQxIOWlckihDOk4QpkIGJJuwLK6vP+mf+TpdT9c1ovurt 2+L3OC+QQ+IX51+7kK7YPQO4IW/VuywcLdrUnCuKq55/S6t0boExJp59Stsj+A9TK5d/ VKSiZKVH/sgyAB/SXJgqLMt4Kt/h/Y3EXkrVlQHgsOaAh5zmTuvPldPXDzjQrsnfHZPn +weg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p48si5092332eda.80.2019.10.22.09.57.21; Tue, 22 Oct 2019 09:57:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732256AbfJVPWM (ORCPT + 99 others); Tue, 22 Oct 2019 11:22:12 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:60572 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731053AbfJVPWM (ORCPT ); Tue, 22 Oct 2019 11:22:12 -0400 Received: from [167.98.27.226] (helo=rainbowdash.codethink.co.uk) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iMvz4-0006E1-NU; Tue, 22 Oct 2019 16:22:06 +0100 Received: from ben by rainbowdash.codethink.co.uk with local (Exim 4.92.3) (envelope-from ) id 1iMvz4-00035O-CL; Tue, 22 Oct 2019 16:22:06 +0100 From: "Ben Dooks (Codethink)" To: linux-kernel@lists.codethink.co.uk Cc: "Ben Dooks (Codethink)" , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: mvneta: make stub functions static inline Date: Tue, 22 Oct 2019 16:22:05 +0100 Message-Id: <20191022152205.11815-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the CONFIG_MVNET_BA is not set, then make the stub functions static inline to avoid trying to export them, and remove hte following sparse warnings: drivers/net/ethernet/marvell/mvneta_bm.h:163:6: warning: symbol 'mvneta_bm_pool_destroy' was not declared. Should it be static? drivers/net/ethernet/marvell/mvneta_bm.h:165:6: warning: symbol 'mvneta_bm_bufs_free' was not declared. Should it be static? drivers/net/ethernet/marvell/mvneta_bm.h:167:5: warning: symbol 'mvneta_bm_construct' was not declared. Should it be static? drivers/net/ethernet/marvell/mvneta_bm.h:168:5: warning: symbol 'mvneta_bm_pool_refill' was not declared. Should it be static? drivers/net/ethernet/marvell/mvneta_bm.h:170:23: warning: symbol 'mvneta_bm_pool_use' was not declared. Should it be static? drivers/net/ethernet/marvell/mvneta_bm.h:181:18: warning: symbol 'mvneta_bm_get' was not declared. Should it be static? drivers/net/ethernet/marvell/mvneta_bm.h:182:6: warning: symbol 'mvneta_bm_put' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) --- Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/marvell/mvneta_bm.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta_bm.h b/drivers/net/ethernet/marvell/mvneta_bm.h index c8425d35c049..9c0c6e20cf80 100644 --- a/drivers/net/ethernet/marvell/mvneta_bm.h +++ b/drivers/net/ethernet/marvell/mvneta_bm.h @@ -160,14 +160,14 @@ static inline u32 mvneta_bm_pool_get_bp(struct mvneta_bm *priv, (bm_pool->id << MVNETA_BM_POOL_ACCESS_OFFS)); } #else -void mvneta_bm_pool_destroy(struct mvneta_bm *priv, - struct mvneta_bm_pool *bm_pool, u8 port_map) {} -void mvneta_bm_bufs_free(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, - u8 port_map) {} -int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) { return 0; } -int mvneta_bm_pool_refill(struct mvneta_bm *priv, - struct mvneta_bm_pool *bm_pool) {return 0; } -struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, u8 pool_id, +static inline void mvneta_bm_pool_destroy(struct mvneta_bm *priv, + struct mvneta_bm_pool *bm_pool, u8 port_map) {} +static inline void mvneta_bm_bufs_free(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, + u8 port_map) {} +static inline int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf) { return 0; } +static inline int mvneta_bm_pool_refill(struct mvneta_bm *priv, + struct mvneta_bm_pool *bm_pool) {return 0; } +static inline struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, u8 pool_id, enum mvneta_bm_type type, u8 port_id, int pkt_size) { return NULL; } @@ -178,7 +178,7 @@ static inline void mvneta_bm_pool_put_bp(struct mvneta_bm *priv, static inline u32 mvneta_bm_pool_get_bp(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool) { return 0; } -struct mvneta_bm *mvneta_bm_get(struct device_node *node) { return NULL; } -void mvneta_bm_put(struct mvneta_bm *priv) {} +static inline struct mvneta_bm *mvneta_bm_get(struct device_node *node) { return NULL; } +static inline void mvneta_bm_put(struct mvneta_bm *priv) {} #endif /* CONFIG_MVNETA_BM */ #endif -- 2.23.0