From patchwork Wed Oct 26 22:42:37 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: 11449 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp519084wru; Wed, 26 Oct 2022 15:44:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cCwnUH6s85R3IamCwgeZnvierv3OyaSApoUUfj2j1+w37vPAzdmtjZl4I7D7sR4I85vTS X-Received: by 2002:a17:907:a073:b0:78d:51c4:5b8c with SMTP id ia19-20020a170907a07300b0078d51c45b8cmr38509654ejc.355.1666824279115; Wed, 26 Oct 2022 15:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666824279; cv=none; d=google.com; s=arc-20160816; b=d7Np9c9SDmjLf76swcWEwBkcUHkZgJVY+acOCgs3S4ZQNyJ/lnXVUKKG00ZzvjWvUT tEPwXTg+caYKk0icAF/YceW/E6o/HgiNwO4CdV26gDdTqppt+0ZjxnpMsI66oo9aLPNg j3zlB3lISw4iaiRcN4LlF5liIBC/h+2Ns7r9y7udCxuLYlt7suGtxA67nTxeSpDbvAn/ kdRubvocUkVnX0nyh8V/KL1D56rqQt6uAoVG0z9vlyO98ESizqFllB2sBXphZufa3jKO u0J3Fy94Yl4Wd5l+ZhFLtFA9mFbc6T4Kjl4G4Z+IFYGf5qXCmz7v37q5XlvWinCv4OEq jwUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:content-disposition:mime-version :message-id:subject:cc:from:date:dkim-signature; bh=19eOYi5T1XuaSSCCFPL1fVIkj2jgVYRC+wY2aPpmv88=; b=IRwcaMXWDepN0BlL0RMt20o868E50/0M5A2S6QQLn+MUyE3CtTa2cifTWPD2lf0dmc WoKje+mBsoKGaI5fWjUDsC/mgtLJ+ikOItzQi9nb2Oh2YOauIaS91Exj3yjA+QPSkYHV Viwtq/yz835HbQAKkJboSaEQCcsr3OLIOpaUHMhKZePMaCEPVYwKtyZxbiqLESnnnvxq IKzJgd5wA5/eKWmc6jMru1SmJiUxAesVOvhoNx0j61YRY9VKvGkCqdzai6Dh8GUvBgo9 ueQ9nPeDzPVDqlFxBF+8G8OcpqS2SlIFd7pZ+5L72g4tQDD2RUMjsR2dGYlulSoUFmnb Tl0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202205 header.b=ewqx1vKt; 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 h11-20020a0564020e8b00b00459b0141076si6203272eda.465.2022.10.26.15.44.13; Wed, 26 Oct 2022 15:44:39 -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=ewqx1vKt; 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 S233548AbiJZWmt (ORCPT + 99 others); Wed, 26 Oct 2022 18:42:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbiJZWmp (ORCPT ); Wed, 26 Oct 2022 18:42:45 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0A9B2609; Wed, 26 Oct 2022 15:42:42 -0700 (PDT) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id A76FD4534; Thu, 27 Oct 2022 00:42:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1666824158; bh=aLDkrJ3n4mm7gAwDMQ1n4CJ0WOrIs4GD9cxoyIWSHEI=; h=Date:From:Cc:Subject:From; b=ewqx1vKtJ2h9Xs/DjWq85Dry86Wfew+vhiXIRdkzk86GMVDf+5li+FEsrHjL/9LLQ VBa55g4H2bKpmI4eeD8+RHLltFVX4lhzg3b4mdC9sq0rNxaPMeBfE7YREQMCjzlA0y JyoB5hXbZZNDx9UAgJ+xvTDm3qqumpKAhllTKnpj4a1wTFmmHS/7p9yrZm2gs9SxZ8 zFwOabAb2vdLsdvUTQ6iWPqcEml5W2qiYpHzcXBoRL1x20N+rw0dtZhcBJ6kgfR8f+ 1clFKDBwenPDRIsvKwWqrEv5QkqJjTgT+0kT5ItEZmB5NX97+IRv/c4h19jY9kW4Z5 +1UEWBoqTnKEYM5pBrNuVNUAFJFLukNajVU82LMOCFM0Bd9GPgIH+OhnN3t7kgUgOz MUa+O7E6gkYrKbFpm7FWrxaQQ3hlTI7n2cLaWgXH9k8dA+K1fndkigwNYYT9/+RdLR 1RMHEEtyQHvb3JQX+DNzz1pVbJxU9qEjgltYWFFwq9uyHavqgJUurW/kFhdi/1TFle /QCuw7sl+fRIu8Cj8tva28JAQZATa0IiRaaHGsS2NfVh+OrdgYV0jUDuBnQPeNYxPa RnCRBN4HkomBC9QABLw0d+lCY9NyLzgFbNpuZ9SJsscvu5cpF86yvwEF43j0OCKe0c Qme2WH7/5D+X9ytYjVPPRb68= Date: Thu, 27 Oct 2022 00:42:37 +0200 From: =?utf-8?b?0L3QsNCx?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Thomas Sailer , "David S. Miller" , Eric Dumazet , Jakub =?utf-8?b?S2ljacWEc2tp?= , Paolo Abeni , Greg Kroah-Hartman , Jiri Slaby , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-hams@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 01/15] hamradio: baycom: remove BAYCOM_MAGIC Message-ID: <9a453437b5c3b4b1887c1bd84455b0cc3d1c40b2.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,MISSING_HEADERS,PDS_OTHER_BAD_TLD, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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?1747791935418687768?= X-GMAIL-MSGID: =?utf-8?q?1747791935418687768?= Since defanging in v2.6.12-rc1 it's set exactly once per port on probe and checked exactly once per port on unload: it's useless. Kill it. Notably, magic-number.rst has never had the right value for it with the new-in-2.1.105 network-based driver Signed-off-by: Ahelenia ZiemiaƄska Ref: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/ --- 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/net/hamradio/baycom_epp.c | 15 ++------------- 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst index 64b5948fc1d4..87353e0207c1 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -73,7 +73,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne 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`` -BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.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 02eb7eb2448e..a96712bd8a68 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -79,7 +79,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne 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`` -BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.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 0617ce125e12..44f3a29fce57 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -62,7 +62,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne 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`` -BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.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 f3f7082e17c6..0fde3183e82a 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -65,7 +65,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne 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`` -BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.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/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index 791b4a53d69f..8f018703e74d 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c @@ -45,13 +45,9 @@ /* --------------------------------------------------------------------- */ #define BAYCOM_DEBUG -#define BAYCOM_MAGIC 19730510 /* --------------------------------------------------------------------- */ -static const char paranoia_str[] = KERN_ERR - "baycom_epp: bad magic number for hdlcdrv_state struct in routine %s\n"; - static const char bc_drvname[] = "baycom_epp"; static const char bc_drvinfo[] = KERN_INFO "baycom_epp: (C) 1998-2000 Thomas Sailer, HB9JNX/AE4WA\n" "baycom_epp: version 0.7\n"; @@ -152,8 +148,6 @@ static struct net_device *baycom_device[NR_PORTS]; */ struct baycom_state { - int magic; - struct pardevice *pdev; struct net_device *dev; unsigned int work_running; @@ -1210,7 +1204,6 @@ static void __init baycom_epp_dev_setup(struct net_device *dev) * initialize part of the baycom_state struct */ bc->dev = dev; - bc->magic = BAYCOM_MAGIC; bc->cfg.fclk = 19666600; bc->cfg.bps = 9600; /* @@ -1279,12 +1272,8 @@ static void __exit cleanup_baycomepp(void) struct net_device *dev = baycom_device[i]; if (dev) { - struct baycom_state *bc = netdev_priv(dev); - if (bc->magic == BAYCOM_MAGIC) { - unregister_netdev(dev); - free_netdev(dev); - } else - printk(paranoia_str, "cleanup_module"); + unregister_netdev(dev); + free_netdev(dev); } } parport_unregister_driver(&baycom_epp_par_driver);