All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Federico Vaga <federico.vaga@vaga.pv.it>,
	Alex Shi <alexs@kernel.org>, Yanteng Si <siyanteng@loongson.cn>,
	Hu Haowen <src.res@email.cn>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc-tw-discuss@lists.sourceforge.net
Subject: Re: [PATCH 2/5] tty: remove TTY_DRIVER_MAGIC
Date: Fri, 16 Sep 2022 08:51:32 +0200	[thread overview]
Message-ID: <2469c582-3532-2a11-d874-5ac6cbdeb499@kernel.org> (raw)
In-Reply-To: <723478a270a3858f27843cbec621df4d5d44efcc.1663288066.git.nabijaczleweli@nabijaczleweli.xyz>

On 16. 09. 22, 3:55, наб wrote:
> According to Greg, in the context of magic numbers as defined in
> magic-number.rst, "the tty layer should not need this and I'll gladly
> take patches"
> 
> Ref: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

Acked-by: Jiri Slaby <jirislaby@kernel.org>

> ---
>   Documentation/process/magic-number.rst                    | 1 -
>   Documentation/translations/it_IT/process/magic-number.rst | 1 -
>   Documentation/translations/zh_CN/process/magic-number.rst | 1 -
>   Documentation/translations/zh_TW/process/magic-number.rst | 1 -
>   drivers/tty/tty_io.c                                      | 1 -
>   include/linux/tty_driver.h                                | 5 -----
>   6 files changed, 10 deletions(-)
> 
> diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst
> index b4c7ec61437e..d47799ba0ca4 100644
> --- a/Documentation/process/magic-number.rst
> +++ b/Documentation/process/magic-number.rst
> @@ -85,7 +85,6 @@ STRIP_MAGIC           0x5303           strip                    ``drivers/net/st
>   SIXPACK_MAGIC         0x5304           sixpack                  ``drivers/net/hamradio/6pack.h``
>   AX25_MAGIC            0x5316           ax_disp                  ``drivers/net/mkiss.h``
>   MGSL_MAGIC            0x5401           mgsl_info                ``drivers/char/synclink.c``
> -TTY_DRIVER_MAGIC      0x5402           tty_driver               ``include/linux/tty_driver.h``
>   MGSLPC_MAGIC          0x5402           mgslpc_info              ``drivers/char/pcmcia/synclink_cs.c``
>   USB_SERIAL_MAGIC      0x6702           usb_serial               ``drivers/usb/serial/usb-serial.h``
>   FULL_DUPLEX_MAGIC     0x6969                                    ``drivers/net/ethernet/dec/tulip/de2104x.c``
> diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst
> index bcb23384fefd..24022ab52ebb 100644
> --- a/Documentation/translations/it_IT/process/magic-number.rst
> +++ b/Documentation/translations/it_IT/process/magic-number.rst
> @@ -91,7 +91,6 @@ STRIP_MAGIC           0x5303           strip                    ``drivers/net/st
>   SIXPACK_MAGIC         0x5304           sixpack                  ``drivers/net/hamradio/6pack.h``
>   AX25_MAGIC            0x5316           ax_disp                  ``drivers/net/mkiss.h``
>   MGSL_MAGIC            0x5401           mgsl_info                ``drivers/char/synclink.c``
> -TTY_DRIVER_MAGIC      0x5402           tty_driver               ``include/linux/tty_driver.h``
>   MGSLPC_MAGIC          0x5402           mgslpc_info              ``drivers/char/pcmcia/synclink_cs.c``
>   USB_SERIAL_MAGIC      0x6702           usb_serial               ``drivers/usb/serial/usb-serial.h``
>   FULL_DUPLEX_MAGIC     0x6969                                    ``drivers/net/ethernet/dec/tulip/de2104x.c``
> diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst
> index 6250087d36c5..811804996283 100644
> --- a/Documentation/translations/zh_CN/process/magic-number.rst
> +++ b/Documentation/translations/zh_CN/process/magic-number.rst
> @@ -74,7 +74,6 @@ STRIP_MAGIC           0x5303           strip                    ``drivers/net/st
>   SIXPACK_MAGIC         0x5304           sixpack                  ``drivers/net/hamradio/6pack.h``
>   AX25_MAGIC            0x5316           ax_disp                  ``drivers/net/mkiss.h``
>   MGSL_MAGIC            0x5401           mgsl_info                ``drivers/char/synclink.c``
> -TTY_DRIVER_MAGIC      0x5402           tty_driver               ``include/linux/tty_driver.h``
>   MGSLPC_MAGIC          0x5402           mgslpc_info              ``drivers/char/pcmcia/synclink_cs.c``
>   USB_SERIAL_MAGIC      0x6702           usb_serial               ``drivers/usb/serial/usb-serial.h``
>   FULL_DUPLEX_MAGIC     0x6969                                    ``drivers/net/ethernet/dec/tulip/de2104x.c``
> diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst
> index fd169d760bbd..8e37e00590f5 100644
> --- a/Documentation/translations/zh_TW/process/magic-number.rst
> +++ b/Documentation/translations/zh_TW/process/magic-number.rst
> @@ -77,7 +77,6 @@ STRIP_MAGIC           0x5303           strip                    ``drivers/net/st
>   SIXPACK_MAGIC         0x5304           sixpack                  ``drivers/net/hamradio/6pack.h``
>   AX25_MAGIC            0x5316           ax_disp                  ``drivers/net/mkiss.h``
>   MGSL_MAGIC            0x5401           mgsl_info                ``drivers/char/synclink.c``
> -TTY_DRIVER_MAGIC      0x5402           tty_driver               ``include/linux/tty_driver.h``
>   MGSLPC_MAGIC          0x5402           mgslpc_info              ``drivers/char/pcmcia/synclink_cs.c``
>   USB_SERIAL_MAGIC      0x6702           usb_serial               ``drivers/usb/serial/usb-serial.h``
>   FULL_DUPLEX_MAGIC     0x6969                                    ``drivers/net/ethernet/dec/tulip/de2104x.c``
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index 33962109bd10..d036fc59a2e8 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -3321,7 +3321,6 @@ struct tty_driver *__tty_alloc_driver(unsigned int lines, struct module *owner,
>   		return ERR_PTR(-ENOMEM);
>   
>   	kref_init(&driver->kref);
> -	driver->magic = TTY_DRIVER_MAGIC;
>   	driver->num = lines;
>   	driver->owner = owner;
>   	driver->flags = flags;
> diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
> index 4841d8069c07..b0421f5de8a6 100644
> --- a/include/linux/tty_driver.h
> +++ b/include/linux/tty_driver.h
> @@ -396,7 +396,6 @@ struct tty_operations {
>   /**
>    * struct tty_driver -- driver for TTY devices
>    *
> - * @magic: set to %TTY_DRIVER_MAGIC in __tty_alloc_driver()
>    * @kref: reference counting. Reaching zero frees all the internals and the
>    *	  driver.
>    * @cdevs: allocated/registered character /dev devices
> @@ -432,7 +431,6 @@ struct tty_operations {
>    * @driver_name, @name, @type, @subtype, @init_termios, and @ops.
>    */
>   struct tty_driver {
> -	int	magic;
>   	struct kref kref;
>   	struct cdev **cdevs;
>   	struct module	*owner;
> @@ -489,9 +487,6 @@ static inline void tty_set_operations(struct tty_driver *driver,
>   	driver->ops = op;
>   }
>   
> -/* tty driver magic number */
> -#define TTY_DRIVER_MAGIC		0x5402
> -
>   /**
>    * DOC: TTY Driver Flags
>    *

-- 
js
suse labs


  reply	other threads:[~2022-09-16  6:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16  1:54 [PATCH 1/5] tty: remove TTY_MAGIC наб
2022-09-16  1:55 ` [PATCH 2/5] tty: remove TTY_DRIVER_MAGIC наб
2022-09-16  6:51   ` Jiri Slaby [this message]
2022-09-16  1:55 ` [PATCH 3/5] tty: n_hdlc: remove HDLC_MAGIC наб
2022-09-16  6:51   ` Jiri Slaby
2022-09-16  1:55 ` [PATCH 4/5] tty: synclink_gt: remove MGSL_MAGIC наб
2022-09-16  6:52   ` Jiri Slaby
2022-09-16  1:55 ` [PATCH 5/5] tty: hvc: remove HVC_IUCV_MAGIC наб
2022-09-16  1:55   ` наб
2022-09-16  6:52   ` Jiri Slaby
2022-09-16  6:51 ` [PATCH 1/5] tty: remove TTY_MAGIC Jiri Slaby
2022-09-16  7:33 ` Theodore Ts'o
2022-09-16  8:45   ` Jiri Slaby
2022-09-22 14:12 ` Greg Kroah-Hartman

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=2469c582-3532-2a11-d874-5ac6cbdeb499@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=alexs@kernel.org \
    --cc=corbet@lwn.net \
    --cc=federico.vaga@vaga.pv.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc-tw-discuss@lists.sourceforge.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    --cc=siyanteng@loongson.cn \
    --cc=src.res@email.cn \
    /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.