All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiaofei Tan <tanxiaofei@huawei.com>
To: <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linuxarm@openeuler.org>
Subject: Re: [PATCH 02/10] tty/sysrq: Fix issues of code indent should use tabs
Date: Mon, 5 Apr 2021 17:03:57 +0800	[thread overview]
Message-ID: <594fa168-3664-531a-cb13-42a4adfaa250@huawei.com> (raw)
In-Reply-To: <1617593662-25900-3-git-send-email-tanxiaofei@huawei.com>



On 2021/4/5 11:34, Xiaofei Tan wrote:
> Fix issues of code indent should use tabs, reported by checkpatch.pl.
>
> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
> ---
>  drivers/tty/sysrq.c | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index 0372ed7..1ece100 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -548,22 +548,22 @@ static int sysrq_key_table_key2index(int key)
>   */
>  static const struct sysrq_key_op *__sysrq_get_key_op(int key)
>  {
> -        const struct sysrq_key_op *op_p = NULL;
> -        int i;
> +	const struct sysrq_key_op *op_p = NULL;
> +	int i;
>
>  	i = sysrq_key_table_key2index(key);
>  	if (i != -1)
> -	        op_p = sysrq_key_table[i];
> +		op_p = sysrq_key_table[i];
>
> -        return op_p;
> +		return op_p;

Wow, one redundant tab here.

>  }
>
>  static void __sysrq_put_key_op(int key, const struct sysrq_key_op *op_p)
>  {
> -        int i = sysrq_key_table_key2index(key);
> +	int i = sysrq_key_table_key2index(key);
>
> -        if (i != -1)
> -                sysrq_key_table[i] = op_p;
> +	if (i != -1)
> +		sysrq_key_table[i] = op_p;
>  }
>
>  void __handle_sysrq(int key, bool check_mask)
> @@ -587,8 +587,8 @@ void __handle_sysrq(int key, bool check_mask)
>  	orig_log_level = console_loglevel;
>  	console_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
>
> -        op_p = __sysrq_get_key_op(key);
> -        if (op_p) {
> +	op_p = __sysrq_get_key_op(key);
> +	if (op_p) {
>  		/*
>  		 * Should we check for enabled operations (/proc/sysrq-trigger
>  		 * should not) and is the invoked operation enabled?
> @@ -637,13 +637,13 @@ static int sysrq_reset_downtime_ms;
>
>  /* Simple translation table for the SysRq keys */
>  static const unsigned char sysrq_xlate[KEY_CNT] =
> -        "\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
> -        "qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
> -        "dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
> -        "bnm,./\000*\000 \000\201\202\203\204\205"      /* 0x30 - 0x3f */
> -        "\206\207\210\211\212\000\000789-456+1"         /* 0x40 - 0x4f */
> -        "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
> -        "\r\000/";                                      /* 0x60 - 0x6f */
> +	"\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
> +	"qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
> +	"dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
> +	"bnm,./\000*\000 \000\201\202\203\204\205"      /* 0x30 - 0x3f */
> +	"\206\207\210\211\212\000\000789-456+1"         /* 0x40 - 0x4f */
> +	"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
> +	"\r\000/";                                      /* 0x60 - 0x6f */
>
>  struct sysrq_state {
>  	struct input_handle handle;
> @@ -1108,7 +1108,7 @@ int sysrq_toggle_support(int enable_mask)
>  EXPORT_SYMBOL_GPL(sysrq_toggle_support);
>
>  static int __sysrq_swap_key_ops(int key, const struct sysrq_key_op *insert_op_p,
> -                                const struct sysrq_key_op *remove_op_p)
> +				const struct sysrq_key_op *remove_op_p)
>  {
>  	int retval;
>
>


  parent reply	other threads:[~2021-04-05  9:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05  3:34 [PATCH 00/10] tty: Fix some coding style issues Xiaofei Tan
2021-04-05  3:34 ` [PATCH 01/10] tty/sysrq: Add a blank line after declarations Xiaofei Tan
2021-04-05  3:34 ` [PATCH 02/10] tty/sysrq: Fix issues of code indent should use tabs Xiaofei Tan
2021-04-05  6:36   ` kernel test robot
2021-04-05  6:36     ` kernel test robot
2021-04-05  7:57   ` kernel test robot
2021-04-05  7:57     ` kernel test robot
2021-04-05  9:03   ` Xiaofei Tan [this message]
2021-04-09  8:35   ` [kbuild] " Dan Carpenter
2021-04-09  8:35     ` Dan Carpenter
2021-04-09  8:35     ` Dan Carpenter
2021-04-05  3:34 ` [PATCH 03/10] tty: tty_jobctrl: Add a blank line after declarations Xiaofei Tan
2021-04-05  3:34 ` [PATCH 04/10] tty: tty_jobctrl: Fix coding style issues of block comments Xiaofei Tan
2021-04-06  4:42   ` Jiri Slaby
2021-04-06  6:22     ` Xiaofei Tan
2021-04-05  3:34 ` [PATCH 05/10] tty: tty_jobctrl: Remove spaces before tabs Xiaofei Tan
2021-04-05  3:34 ` [PATCH 06/10] tty: tty_ldisc: Fix an issue of code indent should use tabs Xiaofei Tan
2021-04-05  3:34 ` [PATCH 07/10] tty: tty_ldisc: Add a blank line after declarations Xiaofei Tan
2021-04-05  3:34 ` [PATCH 08/10] tty: tty_ldisc: Fix coding style issues of block comments Xiaofei Tan
2021-04-05  3:34 ` [PATCH 09/10] tty: tty_ldisc: Do not use assignment in if condition Xiaofei Tan
2021-04-05  3:34 ` [PATCH 10/10] tty: tty_ldisc: Remove the repeated word 'the' Xiaofei Tan
2021-04-05  7:27 [PATCH 02/10] tty/sysrq: Fix issues of code indent should use tabs kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=594fa168-3664-531a-cb13-42a4adfaa250@huawei.com \
    --to=tanxiaofei@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.