From patchwork Tue Nov 1 23:05:13 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: 13952 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3261724wru; Tue, 1 Nov 2022 16:06:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5LwCoayTEVwXUwia2/tTd0zNJOl9Y+gx30PUX7XaHMJpV8Baswz/kLOPCAU8xFtVST08/o X-Received: by 2002:a17:907:a047:b0:7ac:ff72:977c with SMTP id gz7-20020a170907a04700b007acff72977cmr21107608ejc.260.1667344010861; Tue, 01 Nov 2022 16:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667344010; cv=none; d=google.com; s=arc-20160816; b=OHSH3KXUGD1HqYobokHtgNwKEekFw0PAeV4QcbHpNmzySV2PFrbVFf1r01dh6oVc+a BMoFcI32dgFuD02tzC7Jrvammf7LZX68djCQoSKCPtsgn5CweMpYyW1MjpAFRtRb6M2T rZUYU3bCNGzbS8IxkZ90iKWKTfZO1wExK184KeSsaXGpXKIiqFqytNno1EPdUVDd//5q cui1J8JZDLtFcIT/3dT47TtToa8vDE5CFW/xlUc5hROecUlMFnjoYoZx2LGpqouCD5zK lZWSmdgy262w0981QEStr6HhBNNpXNN58iJyuqrIpxZ/dpfdAL9UVhsUIAVTVrg/Ig23 texg== 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=hZrKZ/kjXvMRijozHmIh2zo9SWAXCrPW9qpMOvtkSNY=; b=DY/CSod/wC1CR/JVvSFuOsuGjrJPHxCW1Txlk92c8KtvIxEqdKspzJrDAj5EH4BJZt E8trPruOzfFXYmuJBmAc+C1vePByNLGGRWonpyB2j/F8l/DPKliEDvzoi9XRWlZNLdhI uVremEvHWoFBS+cUlcT12RdXCk9kImkAbsxs+Kw3E2M/OaGyhQG2RvDSCrD3rnAt3GoR xftYGpZKRIhOkvPVepLuD8SPAB0iHF2FpOQJVzdSOSWux6n9sJOO8FkrkqrEpdOxWW9Z 5+VUnRYLOYd3+QFYDuTt3B+iNgtDGah5FjfnFaG3W+1BZYaKN2PGnhWu/Kf6q034NAGD 8VAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202205 header.b=BOtOuXSa; 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 b11-20020a056402084b00b00463ab1bf95bsi5477583edz.94.2022.11.01.16.06.26; Tue, 01 Nov 2022 16:06:50 -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=BOtOuXSa; 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 S231232AbiKAXFh (ORCPT + 99 others); Tue, 1 Nov 2022 19:05:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbiKAXFZ (ORCPT ); Tue, 1 Nov 2022 19:05:25 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA6AD201B6; Tue, 1 Nov 2022 16:05:14 -0700 (PDT) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 364744EDC; Wed, 2 Nov 2022 00:05:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1667343914; bh=+UKsAgRkYwH0P7LvkS7eTSehZSfe3qZMT/OrdLiAgRQ=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=BOtOuXSaZ5DQvmBE5tVcDRKYynMHpX4YonAA4WKIe5cJWUZV91jAkUS8M3wgMhwem hbZ2+HIv/WZrpW/LxznzOWtDeeR/i3VaU4voW0FHWaTTkkAwql3Bo7Nrat2CXx0xw7 oip5KYOSVMZO4ZOa9LScUP0oLvsprica7wx221C8bIxLd3rLChWbh8QeSQeTgGr2Rp QmFvYutz4sjvGa7k2MBuY/SKArkn+PiMwNjUgMbMQihQ+Q/k+HKVZIr+FQb4FU/sQm nlqFQZYiK+7yRxSfJwppVA1U7I3az/07LiRbm4GFhwQcY8uAfkTc3k2lvBSkUfhXQ2 8pJ8qr7MH1VGa5cOLp4ZUwIjCIF8SsRYGO9QYVNXuIQTfDcPL6BzOuI6epIpuE1haw 9UgqHuJf0ypYO3FEvxZ7t51fnZUuPwicIXJzycf1pBmJaOddwqWPI3OnLpM6WSk65e qGywaT3VBCxqdcyhsf7qJCDRkiq9OONteJwWiLPQ9His4TjwWSzMXe3z2aA3xyVq6d SAXHyyJmqCqD9tuE2o/Cnx9SIzxNcn+0HvNgl4wTr/5jTetWbEOYILN1B5Kngese2l ALLWcRit1+Ps7BMJSYvyf2AD9CxphKbXJd2KhVazOG7reTk8ZDbh1WFSRvH10cnTdJ MgCq+qmiL/MGb2/2PDomCRmE= Date: Wed, 2 Nov 2022 00:05:13 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Arnd Bergmann , Greg Kroah-Hartman , Jiri Slaby , Ilpo =?utf-8?b?SsOkcnZpbmVu?= , Haowen Bai , Andy Shevchenko , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net Subject: [PATCH v2 03/15] pcmcia: synclink_cs: remove MGSLPC_MAGIC Message-ID: <97d4e73a458993348cf46711c63cbbb53b65ebdd.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?1748336913683448526?= X-GMAIL-MSGID: =?utf-8?q?1748336913683448526?= MGSLPC_PARANOIA_CHECK has never been defined automatically, and in the context of magic numbers as defined in magic-number.rst, "the tty layer should not need this". This is 100% dead cruft, and we have better debugging tooling nowadays: kill it. Link: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/ Signed-off-by: Ahelenia ZiemiaƄska --- Documentation/process/magic-number.rst | 1 - .../translations/it_IT/process/magic-number.rst | 1 - .../translations/zh_CN/process/magic-number.rst | 1 - .../translations/zh_TW/process/magic-number.rst | 1 - drivers/char/pcmcia/synclink_cs.c | 10 ---------- 5 files changed, 14 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst index a4414b7e15aa..18f8b1e3a993 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -72,7 +72,6 @@ PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/ 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`` -MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h`` diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst index f51c5ef9d93f..827167b18f15 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -78,7 +78,6 @@ PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/ 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`` -MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h`` diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst index 3b53bd67e41b..9553475e9867 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -61,7 +61,6 @@ PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/ 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`` -MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h`` diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst index 7d176a87ec3c..8a64f56ae267 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -64,7 +64,6 @@ PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/ 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`` -MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h`` diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index b2735be81ab2..262f087bfc01 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -137,7 +137,6 @@ struct _input_signal_events { typedef struct _mgslpc_info { struct tty_port port; void *if_ptr; /* General purpose pointer (used by SPPP) */ - int magic; int line; struct mgsl_icount icount; @@ -228,8 +227,6 @@ typedef struct _mgslpc_info { } MGSLPC_INFO; -#define MGSLPC_MAGIC 0x5402 - /* * The size of the serial xmit buffer is 1 page, or 4096 bytes */ @@ -525,7 +522,6 @@ static int mgslpc_probe(struct pcmcia_device *link) return -ENOMEM; } - info->magic = MGSLPC_MAGIC; tty_port_init(&info->port); info->port.ops = &mgslpc_port_ops; INIT_WORK(&info->task, bh_handler); @@ -652,8 +648,6 @@ static inline bool mgslpc_paranoia_check(MGSLPC_INFO *info, char *name, const char *routine) { #ifdef MGSLPC_PARANOIA_CHECK - static const char *badmagic = - "Warning: bad magic number for mgsl struct (%s) in %s\n"; static const char *badinfo = "Warning: null mgslpc_info for (%s) in %s\n"; @@ -661,10 +655,6 @@ static inline bool mgslpc_paranoia_check(MGSLPC_INFO *info, printk(badinfo, name, routine); return true; } - if (info->magic != MGSLPC_MAGIC) { - printk(badmagic, name, routine); - return true; - } #else if (!info) return true;