From patchwork Fri Nov 15 14:36:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 3188471 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 47FD19F39E for ; Fri, 15 Nov 2013 14:37:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B2B72030D for ; Fri, 15 Nov 2013 14:36:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26C24202EC for ; Fri, 15 Nov 2013 14:36:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751437Ab3KOOgz (ORCPT ); Fri, 15 Nov 2013 09:36:55 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.226]:38243 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751172Ab3KOOgx (ORCPT ); Fri, 15 Nov 2013 09:36:53 -0500 Received: from [67.255.60.225] ([67.255.60.225:50060] helo=gandalf.local.home) by cdptpa-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 91/F9-19454-D7136825; Fri, 15 Nov 2013 14:36:51 +0000 Date: Fri, 15 Nov 2013 09:36:45 -0500 From: Steven Rostedt To: LKML Cc: Michal Marek , linux-kbuild@vger.kernel.org, Yang Bai , Stephen Boyd , Andrew Morton Subject: [PATCH] scripts: Have make TAGS not include structure members Message-ID: <20131115093645.6dc03918@gandalf.local.home> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.20; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is really annoying when I use emacs TAGS to search for something like "dev_name" and have to go through 12 iterations before I find the function "dev_name". I really do not care about structures that include "dev_name" as one of its fields, and I'm sure pretty much all other developers do not care either. There's a "remove_structs" variable used by the scripts/tags.sh, which I'm guessing is suppose to remove these structures from the TAGS file, but it must do a poor job at it, as I'm always hitting structures when I want the actual declaration. Luckily, the etags and ctags program comes with an option "--no-members", which does exactly what I want, and I'm sure all other kernel developers want too. Signed-off-by: Steven Rostedt --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/tags.sh b/scripts/tags.sh index 74f02e4..b985371 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -218,7 +218,7 @@ exuberant() emacs() { - all_target_sources | xargs $1 -a \ + all_target_sources | xargs $1 -a --no-members \ --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \ --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \ --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \ @@ -248,13 +248,13 @@ emacs() --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/' - all_kconfigs | xargs $1 -a \ + all_kconfigs | xargs $1 -a --no-members \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' - all_kconfigs | xargs $1 -a \ + all_kconfigs | xargs $1 -a --no-members \ --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/CONFIG_\3/' - all_defconfigs | xargs -r $1 -a \ + all_defconfigs | xargs -r $1 -a --no-members \ --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/' }