From patchwork Thu Jul 26 14:26:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 10271 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7F41B24039 for ; Thu, 26 Jul 2012 14:28:55 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 503E9A18F2B for ; Thu, 26 Jul 2012 14:28:55 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so2027222yhp.11 for ; Thu, 26 Jul 2012 07:28:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=zfnSuCvVggTlZydUn2cvblfH2uYe2pl2N6xaPiNhjzk=; b=XpG5KqYidb3kURQp9DxdVKROaYQZSJ36Wf4/PO+QkKWRJRNVbGPvmxOvsKtlRUO6By B/ijo8LGFRAY6awP5PCKfoGzURXL/sVsCMbXOJeejkWVOQlWg8vttz7aCeBWvvR/4htt auEmKVyN8VS2FID09njpEWYTdw80b8687dqLk3q9GAbXtbjrF72Ajy4bIi4KF/J0Q5HQ vePvt5tkGc83YZe8eCGS8/zJMJp2Nd/azOvTYpIR7GbAdrH0/EsQznSAMK+fXWJHY7I8 wd/Xj7AjDW1GPifs/19/CNexGKbqHcfPFc30T+lKykF/kBDOCGxMaoU16gal3bMAZMPt HCHg== Received: by 10.50.10.166 with SMTP id j6mr1542336igb.38.1343312934956; Thu, 26 Jul 2012 07:28:54 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.43.93.3 with SMTP id bs3csp142663icc; Thu, 26 Jul 2012 07:28:54 -0700 (PDT) Received: by 10.236.200.167 with SMTP id z27mr27984176yhn.131.1343312929557; Thu, 26 Jul 2012 07:28:49 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id e22si21326433yhh.2.2012.07.26.07.28.49 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 07:28:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by yhjj63 with SMTP id j63so2356378yhj.37 for ; Thu, 26 Jul 2012 07:28:49 -0700 (PDT) Received: by 10.66.89.228 with SMTP id br4mr20955738pab.6.1343312928869; Thu, 26 Jul 2012 07:28:48 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id rg9sm16639077pbc.67.2012.07.26.07.28.47 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 07:28:48 -0700 (PDT) From: Anton Vorontsov To: Jason Wessel Cc: Andrew Morton , Steven Rostedt , John Stultz , arve@android.com, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com, kgdb-bugreport@lists.sourceforge.net Subject: [PATCH 2/7] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags Date: Thu, 26 Jul 2012 07:26:26 -0700 Message-Id: <1343312791-9138-2-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20120726142514.GA32158@lizard> References: <20120726142514.GA32158@lizard> X-Gm-Message-State: ALoCoQkSUEV1AK1jHAZn5f6Lg+33oiWn5pWoJiW1mK54kn3NIrwi2tOBFmKhd9khlKQq5Scc/Yg8 We're about to add more options for command behaviour, so let's expand the meaning of kdb_repeat_t. So far we just do various renames, there should be no functional changes. Signed-off-by: Anton Vorontsov --- include/linux/kdb.h | 4 ++-- kernel/debug/kdb/kdb_main.c | 6 +++--- kernel/debug/kdb/kdb_private.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 0647258..029219c 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h @@ -36,7 +36,7 @@ typedef enum { KDB_REPEAT_NONE = 0, /* Do not repeat this command */ KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */ KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */ -} kdb_repeat_t; +} kdb_cmdflags_t; typedef int (*kdb_func_t)(int, const char **); @@ -148,7 +148,7 @@ static inline const char *kdb_walk_kallsyms(loff_t *pos) /* Dynamic kdb shell command registration */ extern int kdb_register(char *, kdb_func_t, char *, char *, short); extern int kdb_register_repeat(char *, kdb_func_t, char *, char *, - short, kdb_repeat_t); + short, kdb_cmdflags_t); extern int kdb_unregister(char *); #else /* ! CONFIG_KGDB_KDB */ #define kdb_printf(...) diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index e2b14ea..c8e1c7b 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -991,7 +991,7 @@ int kdb_parse(const char *cmdstr) if (result && ignore_errors && result > KDB_CMD_GO) result = 0; KDB_STATE_CLEAR(CMD); - switch (tp->cmd_repeat) { + switch (tp->cmd_flags) { case KDB_REPEAT_NONE: argc = 0; if (argv[0]) @@ -2709,7 +2709,7 @@ int kdb_register_repeat(char *cmd, char *usage, char *help, short minlen, - kdb_repeat_t repeat) + kdb_cmdflags_t flags) { int i; kdbtab_t *kp; @@ -2758,7 +2758,7 @@ int kdb_register_repeat(char *cmd, kp->cmd_usage = usage; kp->cmd_help = help; kp->cmd_minlen = minlen; - kp->cmd_repeat = repeat; + kp->cmd_flags = flags; return 0; } diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h index b7869c7..9665af6 100644 --- a/kernel/debug/kdb/kdb_private.h +++ b/kernel/debug/kdb/kdb_private.h @@ -177,7 +177,7 @@ typedef struct _kdbtab { char *cmd_help; /* Help message for this command */ short cmd_minlen; /* Minimum legal # command * chars required */ - kdb_repeat_t cmd_repeat; /* Does command auto repeat on enter? */ + kdb_cmdflags_t cmd_flags; /* Command behaviour flags */ } kdbtab_t; extern int kdb_bt(int, const char **); /* KDB display back trace */