From patchwork Fri Nov 23 00:53:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 13099 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 266A023E08 for ; Fri, 23 Nov 2012 00:57:27 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id B3A30A18BB3 for ; Fri, 23 Nov 2012 00:57:26 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so3478388iag.11 for ; Thu, 22 Nov 2012 16:57:26 -0800 (PST) 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=a8n3cDYIOWWct3hHaTQjzdssASpEusPqMBvCYO0xsyQ=; b=K0HZ9CYkm6QT2lZx58q0kkbipcHj51QJv0A8EANDhz6+kipIDJP6vp6hu9NpjqL7mp wBXmD066/ZfEDr+jNbmfLyj0JOVbberKyw+XUo7PHzeYLLrgmpF158efwlK3YfGdinPj xWsgoc8Ou9gDBaBpHa+IMuD5lVQXRMz6q2y10DrrWLMVZIVIGjxRpyyjRhWuqxhKwqGX gF3C44/ajhaBF9gi/RkdEA4HHe9Z971BRMTaGaYtzjy8tKidN07HhUL/jHpA4HjKpgg9 QQ+IQcqMVMEwJ/HVrSd+eLItrLj6z0sUYvf+7k80752NYzfR+OVQrbN3qPeM1RFgVQoY AFNw== Received: by 10.50.187.197 with SMTP id fu5mr2019964igc.70.1353632246173; Thu, 22 Nov 2012 16:57:26 -0800 (PST) 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.50.67.148 with SMTP id n20csp282669igt; Thu, 22 Nov 2012 16:57:25 -0800 (PST) Received: by 10.182.43.2 with SMTP id s2mr1674848obl.18.1353632244958; Thu, 22 Nov 2012 16:57:24 -0800 (PST) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by mx.google.com with ESMTPS id r10si4262027obv.155.2012.11.22.16.57.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 16:57:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.214.169 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.214.169; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.214.169 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by mail-ob0-f169.google.com with SMTP id lz20so7753059obb.28 for ; Thu, 22 Nov 2012 16:57:24 -0800 (PST) Received: by 10.60.171.133 with SMTP id au5mr1644660oec.90.1353632244673; Thu, 22 Nov 2012 16:57:24 -0800 (PST) Received: from localhost (ip-64-134-239-153.public.wayport.net. [64.134.239.153]) by mx.google.com with ESMTPS id fo6sm4468323obc.20.2012.11.22.16.57.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Nov 2012 16:57:24 -0800 (PST) From: Anton Vorontsov To: Andrew Morton Cc: Jason Wessel , John Stultz , 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, 22 Nov 2012 16:53:51 -0800 Message-Id: <1353632036-5354-2-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.8.0 In-Reply-To: <20121123005315.GA12690@lizard.mcd25758.sjc.wayport.net> References: <20121123005315.GA12690@lizard.mcd25758.sjc.wayport.net> X-Gm-Message-State: ALoCoQnDdoRDWHw/OiThzfADRNU36WvB6f0f/QyUVif93pM1WI3+jDxazKcrpOGvemscyOkh8atj 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 7f6fe6e..cbd1c28 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h @@ -17,7 +17,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 **); @@ -146,7 +146,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 */ static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; } diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index cdaaa52..c7a1797 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -992,7 +992,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]) @@ -2700,7 +2700,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; @@ -2749,7 +2749,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 f8245b3..9e1b8e9 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 */