linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	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>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc-tw-discuss@lists.sourceforge.net
Subject: Re: [PATCH v3] Documentation: remove magic number doc
Date: Thu, 15 Sep 2022 15:16:18 +0200	[thread overview]
Message-ID: <YyMlovoskUcHLEb7@kroah.com> (raw)
In-Reply-To: <20220914233254.zcuaw23nl2wgs7f3@tarta.nabijaczleweli.xyz>

On Thu, Sep 15, 2022 at 01:32:54AM +0200, наб wrote:
> The entire file blames back to the start of git
> (minus whitespace from the RST translation and a typo fix):
>   * there are changelog comments for March 1994 through to Linux 2.5.74
>   * struct tty_ldisc is two pointers nowadays, so naturally no magic
>   * GDA_MAGIC is defined but unused, and it's been this way
>     since start-of-git
>   * M3_CARD_MAGIC isn't defined, because
>     commit d56b9b9c464a ("[PATCH] The scheduled removal of some OSS
>     drivers") removed the entire driver in 2006
>   * CS_CARD_MAGIC likewise since
>     commit b5d425c97f7d ("more scheduled OSS driver removal") in 2007
>   * KMALLOC_MAGIC and VMALLOC_MAGIC were removed in
>     commit e38e0cfa48ac ("[ALSA] Remove kmalloc wrappers"),
>     six months after start of git
>   * SLAB_C_MAGIC has never even appeared in git
>     (removed in 2.4.0-test3pre6)
> 
> At a glance, the only ones still in use are in drivers which are mostly
> untouched since git (TTY, SLIP,
> SCSI (drivers/scsi/{arm/queue.c,ncr53c8xx.c}), &c.).
> 
> A rough estimate of magic numbers in the kernel is obtained by:
>   # git grep define | grep '_MAGIC\b' |
>     grep -ve IOC  -e ^tools/ -e '_IO[(WR]' -e _SUPER | wc -l
>   780
> Note that the word 'magic' may have different meaning from magic
> number context.
> There are also magic numbers which aren't listed here, like
> SR_EEPROM_MAGIC, L2TP_TUNNEL_MAGIC, and MD_SB_MAGIC.
> 
> Therefore, magic-number.rst is a low-value historial relic at best and
> misleading cruft at worst, so remove the documentation.
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

Please only remove the ones that are not used anymore.

Then work on actually removing the remaining ones (hint, the tty layer
should not need this and I'll gladly take patches), and only after they
are all gone, can you remove the whole file.

thanks,

greg k-h

  reply	other threads:[~2022-09-15 13:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  0:38 [PATCH] Documentation/process/magic-number.rst: kill наб
2022-09-07  3:50 ` Bagas Sanjaya
2022-09-07 23:11   ` [PATCH v2] Documentation: remove magic number doc наб
2022-09-14  2:22     ` Bagas Sanjaya
2022-09-14 23:32       ` [PATCH v3] " наб
2022-09-15 13:16         ` Greg KH [this message]
2022-09-15 22:38           ` [PATCH v4 01/18] Documentation: remove nonexistent magic numbers наб
2022-09-15 22:38           ` [PATCH v4 02/18] a.out: remove define-only CMAGIC, previously magic number наб
2022-09-26  8:16             ` Geert Uytterhoeven
2022-09-26 15:15               ` наб
2022-09-26 16:47                 ` Greg KH
2022-09-15 22:39           ` [PATCH v4 03/18] Bluetooth: RFCOMM: remove define-only RFCOMM_TTY_MAGIC ex-magic-number наб
2022-09-15 22:39           ` [PATCH v4 04/18] MIPS: remove define-only GDA_MAGIC, previously magic number наб
2022-09-15 22:39           ` [PATCH v4 05/18] Documentation: HFS is not a user of magic numbers наб
2022-09-15 22:39           ` [PATCH v4 06/18] Documentation: sndmagic.h doesn't exist наб
2022-09-15 22:39           ` [PATCH v4 07/18] Documentation: zh: remove references to IrDA наб
2022-09-15 22:39           ` [PATCH v4 08/18] Documentation: zh: remove stale magic numbers наб
2022-09-15 22:39           ` [PATCH v4 09/18] Documentation: CG_MAGIC isn't a magic number наб
2022-09-15 22:39           ` [PATCH v4 10/18] Documentation: FULL_DUPLEX_MAGIC " наб
2022-09-15 22:39           ` [PATCH v4 11/18] Documentation: RIEBL_MAGIC " наб
2022-09-15 22:39           ` [PATCH v4 12/18] Documentation: SAVEKMSG_MAGIC[12] aren't magic numbers наб
2022-09-15 22:39           ` [PATCH v4 13/18] Documentation: COW_MAGIC isn't a magic number наб
2022-09-15 22:40           ` [PATCH v4 14/18] Documentation: EEPROM_MAGIC_VALUE " наб
2022-09-15 22:40           ` [PATCH v4 15/18] Documentation: FW_HEADER_MAGIC " наб
2022-09-15 22:40           ` [PATCH v4 16/18] nbd: remove define-only NBD_MAGIC, previously " наб
2022-09-15 22:40           ` [PATCH v4 17/18] Documentation: NBD_REPLY_MAGIC isn't a " наб
2022-09-15 22:40           ` [PATCH v4 18/18] Documentation: ENI155_MAGIC " наб

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=YyMlovoskUcHLEb7@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexs@kernel.org \
    --cc=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=federico.vaga@vaga.pv.it \
    --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 \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).