From: наб <nabijaczleweli@nabijaczleweli.xyz> To: unlisted-recipients:; (no To-header on input) 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>, Russell King <linux@armlinux.org.uk>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org Subject: [PATCH 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} Date: Thu, 27 Oct 2022 00:43:20 +0200 [thread overview] Message-ID: <f1330d4027e3d7e85d2a5cd7c5f43fed866b9ef9.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> (raw) In-Reply-To: <9a453437b5c3b4b1887c1bd84455b0cc3d1c40b2.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> [-- Attachment #1: Type: text/plain, Size: 6031 bytes --] We have largely moved away from this approach, and we have better debugging instrumentation nowadays: kill it Ref: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/ Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> --- Documentation/process/magic-number.rst | 2 -- .../it_IT/process/magic-number.rst | 2 -- .../zh_CN/process/magic-number.rst | 2 -- .../zh_TW/process/magic-number.rst | 2 -- drivers/scsi/arm/queue.c | 21 ------------------- 5 files changed, 29 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst index 77a96a79c7e8..c1c68c713cbc 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -72,6 +72,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst index ef509265a3df..5b609ca78a14 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -78,6 +78,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst index 6437c408dd67..ab4d4e32b61f 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -61,6 +61,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst index 453cc205e6c3..a6131d978189 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -64,6 +64,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c index 978df23ce188..fe7d814a73a9 100644 --- a/drivers/scsi/arm/queue.c +++ b/drivers/scsi/arm/queue.c @@ -26,27 +26,11 @@ #include <scsi/scsi_eh.h> #include <scsi/scsi_tcq.h> -#define DEBUG - typedef struct queue_entry { struct list_head list; struct scsi_cmnd *SCpnt; -#ifdef DEBUG - unsigned long magic; -#endif } QE_t; -#ifdef DEBUG -#define QUEUE_MAGIC_FREE 0xf7e1c9a3 -#define QUEUE_MAGIC_USED 0xf7e1cc33 - -#define SET_MAGIC(q,m) ((q)->magic = (m)) -#define BAD_MAGIC(q,m) ((q)->magic != (m)) -#else -#define SET_MAGIC(q,m) do { } while (0) -#define BAD_MAGIC(q,m) (0) -#endif - #include "queue.h" #define NR_QE 32 @@ -74,7 +58,6 @@ int queue_initialise (Queue_t *queue) queue->alloc = q = kmalloc_array(nqueues, sizeof(QE_t), GFP_KERNEL); if (q) { for (; nqueues; q++, nqueues--) { - SET_MAGIC(q, QUEUE_MAGIC_FREE); q->SCpnt = NULL; list_add(&q->list, &queue->free); } @@ -119,9 +102,7 @@ int __queue_add(Queue_t *queue, struct scsi_cmnd *SCpnt, int head) list_del(l); q = list_entry(l, QE_t, list); - BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_FREE)); - SET_MAGIC(q, QUEUE_MAGIC_USED); q->SCpnt = SCpnt; if (head) @@ -144,9 +125,7 @@ static struct scsi_cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) */ list_del(ent); q = list_entry(ent, QE_t, list); - BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_USED)); - SET_MAGIC(q, QUEUE_MAGIC_FREE); list_add(ent, &queue->free); return q->SCpnt; -- 2.30.2 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: наб <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>, Russell King <linux@armlinux.org.uk>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org Subject: [PATCH 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} Date: Thu, 27 Oct 2022 00:43:20 +0200 [thread overview] Message-ID: <f1330d4027e3d7e85d2a5cd7c5f43fed866b9ef9.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> (raw) In-Reply-To: <9a453437b5c3b4b1887c1bd84455b0cc3d1c40b2.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> [-- Attachment #1.1: Type: text/plain, Size: 6031 bytes --] We have largely moved away from this approach, and we have better debugging instrumentation nowadays: kill it Ref: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/ Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> --- Documentation/process/magic-number.rst | 2 -- .../it_IT/process/magic-number.rst | 2 -- .../zh_CN/process/magic-number.rst | 2 -- .../zh_TW/process/magic-number.rst | 2 -- drivers/scsi/arm/queue.c | 21 ------------------- 5 files changed, 29 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst index 77a96a79c7e8..c1c68c713cbc 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -72,6 +72,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst index ef509265a3df..5b609ca78a14 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -78,6 +78,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst index 6437c408dd67..ab4d4e32b61f 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -61,6 +61,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst index 453cc205e6c3..a6131d978189 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -64,6 +64,4 @@ FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/ SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` -QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` -QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` ===================== ================ ======================== ========================================== diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c index 978df23ce188..fe7d814a73a9 100644 --- a/drivers/scsi/arm/queue.c +++ b/drivers/scsi/arm/queue.c @@ -26,27 +26,11 @@ #include <scsi/scsi_eh.h> #include <scsi/scsi_tcq.h> -#define DEBUG - typedef struct queue_entry { struct list_head list; struct scsi_cmnd *SCpnt; -#ifdef DEBUG - unsigned long magic; -#endif } QE_t; -#ifdef DEBUG -#define QUEUE_MAGIC_FREE 0xf7e1c9a3 -#define QUEUE_MAGIC_USED 0xf7e1cc33 - -#define SET_MAGIC(q,m) ((q)->magic = (m)) -#define BAD_MAGIC(q,m) ((q)->magic != (m)) -#else -#define SET_MAGIC(q,m) do { } while (0) -#define BAD_MAGIC(q,m) (0) -#endif - #include "queue.h" #define NR_QE 32 @@ -74,7 +58,6 @@ int queue_initialise (Queue_t *queue) queue->alloc = q = kmalloc_array(nqueues, sizeof(QE_t), GFP_KERNEL); if (q) { for (; nqueues; q++, nqueues--) { - SET_MAGIC(q, QUEUE_MAGIC_FREE); q->SCpnt = NULL; list_add(&q->list, &queue->free); } @@ -119,9 +102,7 @@ int __queue_add(Queue_t *queue, struct scsi_cmnd *SCpnt, int head) list_del(l); q = list_entry(l, QE_t, list); - BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_FREE)); - SET_MAGIC(q, QUEUE_MAGIC_USED); q->SCpnt = SCpnt; if (head) @@ -144,9 +125,7 @@ static struct scsi_cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) */ list_del(ent); q = list_entry(ent, QE_t, list); - BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_USED)); - SET_MAGIC(q, QUEUE_MAGIC_FREE); list_add(ent, &queue->free); return q->SCpnt; -- 2.30.2 [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-26 22:44 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-26 22:42 [PATCH 01/15] hamradio: baycom: remove BAYCOM_MAGIC наб 2022-10-26 22:42 ` наб 2022-10-26 22:42 ` [PATCH 02/15] hamradio: yam: remove YAM_MAGIC наб 2022-10-26 22:42 ` наб 2022-10-28 13:19 ` Bagas Sanjaya 2022-10-28 13:44 ` Dan Carpenter 2022-10-26 22:42 ` [PATCH 03/15] pcmcia: synclink_cs: remove MGSLPC_MAGIC наб 2022-10-28 13:21 ` Bagas Sanjaya 2022-10-26 22:42 ` [PATCH 04/15] pcmcia: synclink_cs: remove dead paranoia_check, warn for missing line наб 2022-10-27 4:53 ` Andy Shevchenko 2022-10-27 11:31 ` наб 2022-10-26 22:42 ` [PATCH 05/15] coda: remove CODA_MAGIC наб 2022-10-28 13:23 ` Bagas Sanjaya 2022-10-28 16:54 ` Jan Harkes 2022-10-26 22:43 ` [PATCH 06/15] Documentation: PG_MAGIC isn't a magic number наб 2022-10-28 13:39 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 07/15] MIPS: IP27: clean out sn/nmi.h наб 2022-10-27 12:26 ` Jason A. Donenfeld 2022-10-28 13:40 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 08/15] MIPS: IP27: remove KV_MAGIC наб 2022-10-28 13:42 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 09/15] x86/APM: remove APM_BIOS_MAGIC наб 2022-10-28 13:45 ` Bagas Sanjaya 2022-10-26 22:43 ` наб [this message] 2022-10-26 22:43 ` [PATCH 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} наб 2022-10-28 13:48 ` Bagas Sanjaya 2022-10-28 13:48 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 11/15] hdlcdrv: remove HDLCDRV_MAGIC наб 2022-10-26 22:43 ` наб 2022-10-28 13:54 ` Bagas Sanjaya 2022-10-28 13:54 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 12/15] drivers: net: slip: remove SLIP_MAGIC наб 2022-10-27 13:11 ` Oliver Hartkopp 2022-10-27 13:45 ` наб 2022-10-28 13:57 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 13/15] fcntl: remove FASYNC_MAGIC наб 2022-10-28 13:59 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 14/15] scsi: ncr53c8xx: replace CCB_MAGIC with bool busy наб 2022-10-28 14:01 ` Bagas Sanjaya 2022-10-26 22:43 ` [PATCH 15/15] Documentation: bury magic-number, now devoid of content наб 2022-10-28 14:04 ` Bagas Sanjaya 2022-10-27 1:37 ` [PATCH 01/15] hamradio: baycom: remove BAYCOM_MAGIC Jakub Kicinski 2022-10-28 1:54 ` Bagas Sanjaya 2022-10-28 13:13 ` Bagas Sanjaya 2022-10-28 13:43 ` Dan Carpenter 2022-10-28 13:50 ` Bagas Sanjaya 2022-10-28 14:07 ` Dan Carpenter 2022-10-28 21:43 ` наб
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=f1330d4027e3d7e85d2a5cd7c5f43fed866b9ef9.1666822928.git.nabijaczleweli@nabijaczleweli.xyz \ --to=nabijaczleweli@nabijaczleweli.xyz \ --cc=alexs@kernel.org \ --cc=corbet@lwn.net \ --cc=federico.vaga@vaga.pv.it \ --cc=gregkh@linuxfoundation.org \ --cc=jejb@linux.ibm.com \ --cc=jirislaby@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-doc-tw-discuss@lists.sourceforge.net \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-scsi@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=martin.petersen@oracle.com \ --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: linkBe 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.