* [PATCH v2 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED}
[not found] <cover.1667330271.git.nabijaczleweli@nabijaczleweli.xyz>
@ 2022-11-01 23:05 ` Ahelenia Ziemiańska
2022-11-04 18:35 ` [PATCH v2 00/15] magic-number.rst funeral rites Jakub Kicinski
1 sibling, 0 replies; 2+ messages in thread
From: Ahelenia Ziemiańska @ 2022-11-01 23:05 UTC (permalink / raw)
Cc: Jonathan Corbet, Federico Vaga, Alex Shi, Yanteng Si, Hu Haowen,
Russell King, James E.J. Bottomley, Martin K. Petersen,
Greg Kroah-Hartman, Jiri Slaby, linux-doc, linux-kernel,
linux-doc-tw-discuss, linux-arm-kernel, linux-scsi
[-- Attachment #1.1: Type: text/plain, Size: 6033 bytes --]
We have largely moved away from this approach, and we have better
debugging instrumentation nowadays: kill it.
Link: 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 00/15] magic-number.rst funeral rites
[not found] <cover.1667330271.git.nabijaczleweli@nabijaczleweli.xyz>
2022-11-01 23:05 ` [PATCH v2 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} Ahelenia Ziemiańska
@ 2022-11-04 18:35 ` Jakub Kicinski
1 sibling, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-11-04 18:35 UTC (permalink / raw)
To: Ahelenia Ziemiańska
Cc: Andrew Morton, Kees Cook, coda, codalist, linux-arm-kernel,
linux-doc-tw-discuss, linux-doc, linux-fsdevel, linux-hams,
linux-kernel, linux-mips, linux-scsi, netdev, x86
On Wed, 2 Nov 2022 00:04:54 +0100 Ahelenia Ziemiańska wrote:
> 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/20220927003727.slf4ofb7dgum6apt@tarta.nabijaczleweli.xyz/
> ) I sent in September, and the same reasoning applies:
No idea how you want this to get merged, but FWIW you can add my
Acked-by: Jakub Kicinski <kuba@kernel.org>
to patches 1, 2, 11 and 12.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-04 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1667330271.git.nabijaczleweli@nabijaczleweli.xyz>
2022-11-01 23:05 ` [PATCH v2 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} Ahelenia Ziemiańska
2022-11-04 18:35 ` [PATCH v2 00/15] magic-number.rst funeral rites Jakub Kicinski
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).