From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755740AbbIAVKN (ORCPT ); Tue, 1 Sep 2015 17:10:13 -0400 Received: from m12-12.163.com ([220.181.12.12]:57993 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbbIAVKL convert rfc822-to-8bit (ORCPT ); Tue, 1 Sep 2015 17:10:11 -0400 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 21/31] perf tools: Move linux/filter.h to tools/include From: pi3orama X-Mailer: iPhone Mail (12H321) In-Reply-To: <20150901193959.GB22331@redhat.com> Date: Wed, 2 Sep 2015 05:08:27 +0800 Cc: Wang Nan , "mingo@kernel.org" , "ast@plumgrid.com" , "linux-kernel@vger.kernel.org" , "lizefan@huawei.com" , He Kuang , Brendan Gregg , Daniel Borkmann , David Ahern , Jiri Olsa , Kaixu Xia , Masami Hiramatsu , Namhyung Kim , Paul Mackerras , Peter Zijlstra Content-Transfer-Encoding: 8BIT Message-Id: References: <1440822125-52691-1-git-send-email-wangnan0@huawei.com> <1440822125-52691-22-git-send-email-wangnan0@huawei.com> <20150901193959.GB22331@redhat.com> To: Arnaldo Carvalho de Melo X-CM-TRANSID: DMCowEAplGjLE+ZVEr94BA--.976S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Kr43tFWDtr1Dtw1UAF4xZwb_yoW8tr4fp3 9xCrZ7tF4xCr1UCryqqr1xZFyYq397Gw10vr17Gr18XF12yFnayws3Wa4Fv34DA39F9r10 qFWjg343Ca1UJFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U45lnUUUUU= X-Originating-IP: [210.73.4.168] X-CM-SenderInfo: lslt02xdpdqiywtou0bp/1tbishhoQFUL3vFHsQABsE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 发自我的 iPhone > 在 2015年9月2日,上午3:39,Arnaldo Carvalho de Melo 写道: > > Em Sat, Aug 29, 2015 at 04:21:55AM +0000, Wang Nan escreveu: >> From: He Kuang >> >> This patch moves filter.h from include/linux/kernel.h to > > I said that before: this is not moving anything, it is copying :-) > >> tools/include/linux/filter.h to enable other libraries use macros in >> it, like libbpf which will be introduced by further patches. Currenty, >> the moved filter.h only contains the useful macros needed by libbpf >> for not introducing too much dependence. >> >> MANIFEST is also updated for 'make perf-*-src-pkg'. > > So, I did a: > > $ diff -u include/linux/filter.h tools/include/linux/filter.h > > And noticed these: > > -/* Endianess conversion, cpu_to_{l,b}e(), {l,b}e_to_cpu() */ > +/* Endianness conversion, cpu_to_{l,b}e(), {l,b}e_to_cpu() */ > > -/* Short form of mov based on type, BPF_X: dst_reg = src_reg, BPF_K: dst_reg = imm32 */ > +/* Short form of mov based on type, > + * BPF_X: dst_reg = src_reg, BPF_K: dst_reg = imm32 > + */ > > -/* Conditional jumps against registers, if (dst_reg 'op' src_reg) goto pc + off16 */ > +/* Conditional jumps against registers, > + * if (dst_reg 'op' src_reg) goto pc + off16 > + */ > > -/* Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 */ > +/* Conditional jumps against immediates, > + * if (dst_reg 'op' imm32) goto pc + off16 > + */ > > ------------------------------------------------------------------ > I think these changes are made after we made this patch. Thank you for checking it. > Please refrain from doing that... I.e. spell checking is kinda useful, > introducing gratuitous further drift from include/linux/FOO.h to > tools/include/linux/FOO.h is not. > > So either resist the urge to do these stylistic changes or do those changes in > include/linux/FOO.h and _then_ copy it to tools/include/linux/FOO.h. > > If the copy was already done, fix both, so that when we do that diff again, we > can see what is really different in kernel and userspace copies and that maybe > will help us spot things that aren't diverging over time. > > - Arnaldo