2022-11-11 01:33:31

by Ahelenia Ziemiańska

[permalink] [raw]
Subject: [PATCH v3 00/15] magic-number.rst funeral rites

This is a follow-up for the 18+1-patch series (
https://lore.kernel.org/linux-kernel/8389a7b85b5c660c6891b1740b5dacc53491a41b.1663280877.git.nabijaczleweli@nabijaczleweli.xyz/
https://lore.kernel.org/linux-kernel/[email protected]/
) I sent in September, and the same reasoning applies:

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)
* &c., &c., &c.

magic-number.rst is a low-value historial relic at best and misleading
cruft at worst.

This latter half cleans out the remaining entries (either by recognising
that they aren't actually magic numbers or by cutting them out entirely)
and inters the file.

amd64 allyesconfig builds; this largely touches code that would be
exceedingly expensive to test (and largely untouched since the git
import), but is very receptive to static analysis.

v2:
Messages restyled
Moved printk() in synclink_cs.c became pr_warn
(__func__ instead of prescribed hard function name per checkpatch.pl)

v3:
7/15 no longer cleans out the header that defines NMI_MAGIC

Ahelenia Ziemiańska (15):
hamradio: baycom: remove BAYCOM_MAGIC
hamradio: yam: remove YAM_MAGIC
pcmcia: synclink_cs: remove MGSLPC_MAGIC
pcmcia: synclink_cs: remove dead paranoia_check, warn for missing line
coda: remove CODA_MAGIC
Documentation: remove PG_MAGIC (not a magic number)
Documentation: remove NMI_MAGIC (not a magic number)
MIPS: IP27: remove KV_MAGIC
x86/APM: remove APM_BIOS_MAGIC
scsi: acorn: remove QUEUE_MAGIC_{FREE,USED}
hdlcdrv: remove HDLCDRV_MAGIC
drivers: net: slip: remove SLIP_MAGIC
fcntl: remove FASYNC_MAGIC
scsi: ncr53c8xx: replace CCB_MAGIC with bool busy
Documentation: remove magic-number.rst

Documentation/process/index.rst | 1 -
Documentation/process/magic-number.rst | 85 -----------------
.../translations/it_IT/process/index.rst | 1 -
.../it_IT/process/magic-number.rst | 91 -------------------
.../translations/zh_CN/process/index.rst | 1 -
.../zh_CN/process/magic-number.rst | 74 ---------------
.../translations/zh_TW/process/index.rst | 1 -
.../zh_TW/process/magic-number.rst | 77 ----------------
arch/mips/include/asm/sn/klkernvars.h | 8 +-
arch/mips/sgi-ip27/ip27-klnuma.c | 1 -
arch/x86/kernel/apm_32.c | 9 +-
drivers/char/pcmcia/synclink_cs.c | 79 +---------------
drivers/net/hamradio/baycom_epp.c | 15 +--
drivers/net/hamradio/baycom_par.c | 1 -
drivers/net/hamradio/baycom_ser_fdx.c | 3 +-
drivers/net/hamradio/baycom_ser_hdx.c | 3 +-
drivers/net/hamradio/hdlcdrv.c | 9 +-
drivers/net/hamradio/yam.c | 8 +-
drivers/net/slip/slip.c | 11 +--
drivers/net/slip/slip.h | 4 -
drivers/scsi/arm/queue.c | 21 -----
drivers/scsi/ncr53c8xx.c | 25 ++---
fs/coda/cnode.c | 2 +-
fs/coda/coda_fs_i.h | 2 -
fs/coda/file.c | 1 -
fs/fcntl.c | 6 --
include/linux/fs.h | 3 -
include/linux/hdlcdrv.h | 2 -
28 files changed, 29 insertions(+), 515 deletions(-)
delete mode 100644 Documentation/process/magic-number.rst
delete mode 100644 Documentation/translations/it_IT/process/magic-number.rst
delete mode 100644 Documentation/translations/zh_CN/process/magic-number.rst
delete mode 100644 Documentation/translations/zh_TW/process/magic-number.rst

--
2.30.2


Attachments:
(No filename) (4.43 kB)
signature.asc (849.00 B)
Download all attachments

2022-11-11 01:59:16

by Ahelenia Ziemiańska

[permalink] [raw]
Subject: [PATCH v3 06/15] Documentation: remove PG_MAGIC (not a magic number)

It's part of the userspace I/O packet protocol.

Signed-off-by: Ahelenia Ziemiańska <[email protected]>
---
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 -
4 files changed, 4 deletions(-)

diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst
index 335169e43be1..62a3a2113e7c 100644
--- a/Documentation/process/magic-number.rst
+++ b/Documentation/process/magic-number.rst
@@ -68,7 +68,6 @@ Changelog::
===================== ================ ======================== ==========================================
Magic Name Number Structure File
===================== ================ ======================== ==========================================
-PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst
index 699b681088ac..b20a54ee6fb2 100644
--- a/Documentation/translations/it_IT/process/magic-number.rst
+++ b/Documentation/translations/it_IT/process/magic-number.rst
@@ -74,7 +74,6 @@ Registro dei cambiamenti::
===================== ================ ======================== ==========================================
Nome magico Numero Struttura File
===================== ================ ======================== ==========================================
-PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst
index d1ede86944f1..e7781ab923f7 100644
--- a/Documentation/translations/zh_CN/process/magic-number.rst
+++ b/Documentation/translations/zh_CN/process/magic-number.rst
@@ -57,7 +57,6 @@ Linux 魔术数
===================== ================ ======================== ==========================================
魔术数名 数字 结构 文件
===================== ================ ======================== ==========================================
-PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst
index 1dd01f1e1c17..5cc0bfa97d9d 100644
--- a/Documentation/translations/zh_TW/process/magic-number.rst
+++ b/Documentation/translations/zh_TW/process/magic-number.rst
@@ -60,7 +60,6 @@ Linux 魔術數
===================== ================ ======================== ==========================================
魔術數名 數字 結構 文件
===================== ================ ======================== ==========================================
-PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h``
APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c``
FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
--
2.30.2


Attachments:
(No filename) (4.25 kB)
signature.asc (849.00 B)
Download all attachments