From patchwork Tue Nov 1 23:05:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 13960 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3262991wru; Tue, 1 Nov 2022 16:08:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6iE5UNbf7gWE9P9KEsLclhq44N8ST9pAK7Lq5KlFTGxo1rbfrfxxOFwj+wHab42cqHoKpg X-Received: by 2002:a05:6402:2c1:b0:463:bddf:a77d with SMTP id b1-20020a05640202c100b00463bddfa77dmr4441048edx.277.1667344139348; Tue, 01 Nov 2022 16:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667344139; cv=none; d=google.com; s=arc-20160816; b=G+jUQixlhTa9wBaKUIrAkv3JlY/+EuyT1BB/UXfUWTJXcpfVdNX231Rxn+9Ayx3tiR Vd4ElE7I70Jeb4OQHmg4VCB8fJM6G3gk9em/6D21C2r/bee7L081bQTIcgUtSf2slBxW MS40IMSDafEA6jQB2HFD5JCGZAK4uC8c+awXSCG5VfP7296gxsF/uIE2TdrTqpYecVhX +Q131lHS5T0RSIy6mLAklUHJdgKa03U9nY5ZUEH3W5bSx2Insbb6YL1FluxvwWEmOCF7 p6xOP/Yb9VBZNLAwJtM6nt1eKwS7r4qJUCfZ8J4wp4/wr7w1PxpWCtzcpWXx9PDNTZIO x+uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=N2+NKBL3U30SlTKH6VAk9C4m8d+tEHqkPgLwb4wyCJI=; b=SYYaXkTN8EJ30U+dbGjoUrwpTEFhYGOiilxXPbYUgLC2qvkJ21/JGSHsR09dqY2DRR +MHbfhuYwtw9EGuYBac4j2FVByPtZH5TsgCx+eLw9JWFbJ9T+YdFespfXvMFDI7sACih i77Ygfx+PZCx+qQQ1SEUIio5iFyZQYQsH2sshtU487TGuezybjOxjxGK6DtN75CdPVY2 ORCUXOBL2Lt2EEND2YqLcldKkGI2LUdwU/xWpaOvNnhYskIEMBi+ls/+IowbMMRGbhjE aEXcJFOzIxMKMqZSOSC/uvzmie4QV58inucq1pcBEE0O/tFEFXGMbJrVLzeOARGPaCIm vZew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202205 header.b="F3/Z8Z03"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a05640211cd00b00461eb5cdcdcsi17431210edw.23.2022.11.01.16.08.35; Tue, 01 Nov 2022 16:08:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202205 header.b="F3/Z8Z03"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbiKAXHR (ORCPT + 99 others); Tue, 1 Nov 2022 19:07:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231433AbiKAXGF (ORCPT ); Tue, 1 Nov 2022 19:06:05 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D6476444; Tue, 1 Nov 2022 16:05:47 -0700 (PDT) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id DA5594E2E; Wed, 2 Nov 2022 00:05:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1667343946; bh=KPLxLEvEsq/B2PBaYPKenFHyW0xpBnqpgZ5eCop6z4Y=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=F3/Z8Z03YwtWXHw61U/ZaoHURISnMiZOPPyYEzBYpWlJRAiPbluz3d7S+ISXrX/xF MjoRv/R6CiWv+wDz2QK/STrpfwH0BWfPVHI4V3iP7sKTc4fJQhtqPh03IQ9DU+S9uI ulviDCARR7cNi1rpIIFnMBHQ+EFzsPdnB7Wc4PfAaCyLxXgwn2mtbjrjUeE2udllk4 am/HfmPXXNN6OYPI7ZA6bqFVsm4fSgeteHRNVLYRCOlRTHgVTMJip8SvlXldWF5ppZ jNFXFOqnjHkADlHKEnptboM7kOCKKB1ooP4Kc3CIGQQ4LInA32FU6yRW12K5cPrcb+ DuPiWBEDxvM8BKYu2a3YKg8jxluyPv6K/JAePc6Tl9yK4jy2SpT/EIPS91yfjAzsHa O1Q+BtGCNDhJRiJ6vKcJhu9kAFdzwvuLaJiGzZd1F/mVSfMXiOzXCAn7pXjOq72Y5s 6acAXYJ+hS0cMO+BvDzclwfer4LEIOcmizZPaQOIh/9sMTP9w9kqhcnfWt4+K81U2x dTXGkMygcODlR4zfCkMbyZfhvmnDJhkxsXbLE34CMxL5zXMC2xwG0FA3ZFFL1jwW2P YT+p4dT9+YtV+9lyiS0/jCh5s1JfPK/YJhHvXxxKF40tlYmess6rheeSHSMaP4QE9u c19XJii0gy41/ycQZl5Y0i5w= Date: Wed, 2 Nov 2022 00:05:45 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= 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@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 v2 10/15] scsi: acorn: remove QUEUE_MAGIC_{FREE,USED} Message-ID: <7e9abe0511428bdb665eae5b9517a0d45e72de75.1667330271.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, MISSING_HEADERS,PDS_OTHER_BAD_TLD,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748337048459587975?= X-GMAIL-MSGID: =?utf-8?q?1748337048459587975?= 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 --- 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 #include -#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;