Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp188884ybb; Thu, 19 Mar 2020 19:34:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvIN0Fywt7zSEyfutO0kmVVG8qjLf+QNXWX6zk6DzFQgbFeoHYFMbpSo3mHSZ5nbRnGSbNR X-Received: by 2002:aca:3101:: with SMTP id x1mr4641070oix.15.1584671677780; Thu, 19 Mar 2020 19:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584671677; cv=none; d=google.com; s=arc-20160816; b=nX39VM/YVfRoe8DX/ydvjLZuW6UHlK7Ga0FXoT2lw1mjadqsEC2VykHBtiSiksip0C BpvZMA7mB9NgdTdMPvkfFLIadZTVHIaZjm+RarPs/vpl4JjQcatMGd+mPAf8Q0u7IJm0 ZZxmjaU04+tIbn1QGY4rKvlF40x6+bUuDAq3g6wqBygDX89WIwTIxmWgIQvBpVk+5eG1 x8XGbWePnQLe8OcHgNemN7G3DiXYv9sGMjMZtqw6tK3hbocLlu6qicHXo8N/Xw82XSk8 AGbRXa2IQaAF93+Cxpyw1U5DNkwy52QanbBTTsYXdCJ9NYIZjbtF9LnTWmu8uBPO5rQ/ Firw== 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=newWD8iGe4aCWI1cltKu20kP7FuzdwcDOYmMkz6DDlg=; b=cVT8xOcln8Rj3m5WgWY5tHW5zLJiwygSzwSp40NeEIsykL2yZE5WkkFRyLBma+L2qH Lc4M5mLcEPlMh3fkixQU2ZatF5aH9Bll482Kc0FARpdiY5jbuDcAFcyGRR6BgW1x8MKf r9FfSRBhbOn5wtt92ty9dJZ1VMN1e2HWs2Gn268SpNzMTLyXcMB+TPQPdG2cvpm7P7de 2Fklq0L6WSsVHXPAdUNksEU4k7BLNH52bT1F/RmrA1PBKrcHufO7PUF3yimQhgBH2cwM 6EOwaBPvQ06+GpEKdBLxu5/9f0h5lGTjcSHql5dNkJ7b7N6mVYmN5i5f6pXrIq5lhFxY JKDg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22si2285566otn.56.2020.03.19.19.34.24; Thu, 19 Mar 2020 19:34:37 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727043AbgCTCdV (ORCPT + 99 others); Thu, 19 Mar 2020 22:33:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33404 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726666AbgCTCdV (ORCPT ); Thu, 19 Mar 2020 22:33:21 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BAFFA24877BE96986CAF; Fri, 20 Mar 2020 10:33:14 +0800 (CST) Received: from [127.0.0.1] (10.173.223.234) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 20 Mar 2020 10:33:13 +0800 Subject: Re: [PATCH bpf-next] bpf: tcp: Fix unused function warnings To: Jakub Sitnicki References: <20200319124631.58432-1-yuehaibing@huawei.com> <87fte4xot3.fsf@cloudflare.com> CC: , , , , , , From: Yuehaibing Message-ID: Date: Fri, 20 Mar 2020 10:33:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87fte4xot3.fsf@cloudflare.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.223.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/3/20 1:00, Jakub Sitnicki wrote: > On Thu, Mar 19, 2020 at 01:46 PM CET, YueHaibing wrote: >> If BPF_STREAM_PARSER is not set, gcc warns: >> >> net/ipv4/tcp_bpf.c:483:12: warning: 'tcp_bpf_sendpage' defined but not used [-Wunused-function] >> net/ipv4/tcp_bpf.c:395:12: warning: 'tcp_bpf_sendmsg' defined but not used [-Wunused-function] >> net/ipv4/tcp_bpf.c:13:13: warning: 'tcp_bpf_stream_read' defined but not used [-Wunused-function] >> >> Moves the unused functions into the #ifdef >> >> Reported-by: Hulk Robot >> Signed-off-by: YueHaibing >> --- > > In addition to this fix, looks like tcp_bpf_recvmsg can be static and > also conditional on CONFIG_BPF_STREAM_PARSER. Thanks, will do this in next version. > > Reviewed-by: Jakub Sitnicki > > . >