Re: [PATCH] kgdboc: Disable kgdboc failed by echo “ ” to /sys/module/kgdboc/parameters/kgdboc"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wentao

Thanks for following up. The code it still fine but I think the mail
structure around it needs to be closer to the typical form for patches
otherwise various people's automatic tooling can't pick it up.


On Wed, Mar 06, 2019 at 11:27:00AM +0800, 王文涛 wrote:
> Hi Andrew,

Firstly your mail might be misaddressed. For me scripts/get_maintainers.pl
offered the following circulation list:

Jason Wessel <jason.wessel@xxxxxxxxxxxxx> (maintainer:KGDB / KDB /debug_core)
Daniel Thompson <daniel.thompson@xxxxxxxxxx> (maintainer:KGDB / KDB /debug_core)
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> (maintainer:SERIAL DRIVERS)
Jiri Slaby <jslaby@xxxxxxxx> (supporter:TTY LAYER)
kgdb-bugreport@xxxxxxxxxxxxxxxxxxxxx (open list:KGDB / KDB /debug_core)
linux-serial@xxxxxxxxxxxxxxx (open list:SERIAL DRIVERS)
linux-kernel@xxxxxxxxxxxxxxx (open list)

All of the above should be on To or Cc (preferences vary slightly but a
good rule of thumb is to put maintainers in To: and all others on Cc:).

Addressing matters because some maintainers are very busy and rely on
automatic filtering and other tools. In particular changes in
drivers/tty/serial are usually picked by Greg KH and with the current
addressing I'm not entirely sure he will even see it.


> In main stream, echo "" to /sys/module/kgdboc/parameters/kgdboc will fail
> like:
> root@ubuntu:/home/matt/git-source# echo "" >
> /sys/module/kgdboc/parameters/kgdboc
> bash: echo: write error: No such device
> 
> This is caused by function "configure_kgdboc" who init err to ENODEV when
> the config is empty (legal input) the code go out with ENODEV  returned.

Explanation of what the patch does and why should be in the patch
description located above the current Signed-off-by: line).


> Daniel pointed out it looks the change of error code was introduced by
> 2dd453168643d
> ("kgdboc: Fix restrict error").
> This fix assign err to normal to handle it.

Again this needs to be expressed so automatic tooling can find it.
This means putting it in the patch description (I usually put it just
above the Signed-off-by:) with the following form:

Fixes: 2dd453168643d ("kgdboc: Fix restrict error")

 
> From 74354e3895e5b2eb9b564e019218e74882f4fa3b Mon Sep 17 00:00:00 2001
> From: Wentao Wang <“witallwang@xxxxxxxxx”>
> Date: Mon, 4 Mar 2019 21:58:33 +0800
> Subject: [PATCH] Disable kgdboc failed by echo  to
>  /sys/module/kgdboc/parameters/kgdboc
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit

You mailer will add of the above (at least the ones that matter) when it
sends the mail. No need to repeat them in the body of the e-mail.

Just as maintainers rely on tools to *read* patches you can rely on
tools to *format* patches for you.

For a single patch this usually looks something like:

    git format-patch -1

    # Review patch... if there is any additional information you think
    # you need to add then use `git commit --amend` to update the
    # description and then format it again.

    scripts/get_maintainer.pl 0001-*.patch

    # Read the output of get_maintainer and add the To: and Cc: list
    # when formatting the patch.
    git format-patch -1 \
      --to a.maintainer@xxxxxxxxxx \
      --to another.maintainer@xxxxxxxxxx \
      --cc a.list@xxxxxxxxxx \
      ...

    # Final review

    # Send it (be careful with wildcards if you have old patches in this
    # directory)!
    git send-email 0001-*.patch

Configuring `git send-email` is a big time saver in the long term. In
the short term it is tempting to convert the patch by hand but if you
can get `git send-email` working your workflow will be more comfortable.

> Signed-off-by: Wentao Wang <“witallwang@xxxxxxxxx”>

I've never seen quotes like this in an e-mail address. Is it really
valid (the From in the real mail headers don't have these quotes)?

The above might seem fussy right now but if you write more patches
you'll probably appreciate getting tools configured to help you!


Daniel.


> ---
>  drivers/tty/serial/kgdboc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
> index 6fb312e..bfe5e9e 100644
> --- a/drivers/tty/serial/kgdboc.c
> +++ b/drivers/tty/serial/kgdboc.c
> @@ -148,8 +148,10 @@ static int configure_kgdboc(void)
>         char *cptr = config;
>         struct console *cons;
> -       if (!strlen(config) || isspace(config[0]))
> +       if (!strlen(config) || isspace(config[0])) {
> +               err = 0;
>                 goto noconfig;
> +       }
>         kgdboc_io_ops.is_console = 0;
>         kgdb_tty_driver = NULL;
> --
> 2.7.4
> 
> Regards,
> Wentao





[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Fedora Users]

  Powered by Linux