Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1459498rwi; Wed, 26 Oct 2022 15:59:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM769yXyImYMQvLtwIMP5LXtWZVjvcrtXoIUpEwtysrpwJF5DbAVkuGLBulsgm3N9Z3jlfM/ X-Received: by 2002:a17:90a:6c41:b0:212:fdaf:d79c with SMTP id x59-20020a17090a6c4100b00212fdafd79cmr6638114pjj.134.1666825187435; Wed, 26 Oct 2022 15:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666825187; cv=none; d=google.com; s=arc-20160816; b=QQOClCUqK64Ai+fCk8+LmAnvffJtolC19HooZDGHQt7e1K86o6NTx6TPb9N59Knton CwVpYrZX4mJ2rH2uc4fKFUydLqcEPEwzUUauZ3CtKPjD8/YVC/NzsYIWYJnT+e8lhcM6 wW+g2N6rmumGp8FP2UE493WgX0uVRlAvqXgkWTt717x/1H3IlzAwsq+kJB5jdhm31iHG 95g5CMH6HbCZWXD+6n7HnUpM/LixmBPPnazUcYQZnUL6Me1DGbyfPusmZbcNHVx9IbZ8 s1x/gzgYx/7K0EcqL3P7nfL0pKkG581DSphxDcYuHLKj92/yVLZc4PyU1DSiyF7Px5Ep ZIOA== 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=7FOgr8Vp0wGw/s77XzoxaT7WTCaUAl9ZNCX+qTjfjZw=; b=wF1Xjv6tJYPNotMItzTjAru8V1xEedxTP5l8DBEpwat+5D49JPXADJoITkICVwCNEX I3mzo8phe+julH/wgkVhzTmKJNBvLmt5TNLCh3NWQVlyqHDVZI9nVk1oOtAkkFJSbagr EkE3epkBx8AZamtiTtE3D6Ucqm3HlQaNypxReLALVF+3+KwHPJdeem23SPpshZeu8k9T z3G954gQeNOaeiCmdoGCVlFXA0qcCeR3WDWw2pTVjRAoK65MaU8knOt8Y1r+bZXPNn3i qjAEH37S53Y5VH1mMI7ilNapKRy0zqAroC8rplLaztjKSHqGQRg2Cnbmy+t1La1T4tGT /cYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202205 header.b=EPwaNgB2; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170902d54600b001768876fc87si7882648plf.362.2022.10.26.15.59.24; Wed, 26 Oct 2022 15:59:47 -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=EPwaNgB2; 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 S233826AbiJZWoD (ORCPT + 99 others); Wed, 26 Oct 2022 18:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233668AbiJZWni (ORCPT ); Wed, 26 Oct 2022 18:43:38 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F47511700C; Wed, 26 Oct 2022 15:43:17 -0700 (PDT) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 222C24832; Thu, 27 Oct 2022 00:43:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1666824197; bh=pYNAXn7meYx+O/2Uw04Ex9qd0o7Lea6vZv0pqijKfL0=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=EPwaNgB2n2n0Td7OkYlPzf/50q8c0WbVu+UD9unSG1qXZkzK5aB5Ff/eMQgCTQi8x Z4dx4FNXQNVV/v2aCB/84alz4rTWdc4x3EaqWQftZdf31bWT1vIEhOdAiOHbALJUvq pE+j955+xklyf94i5QAWUctm0Zv787sZrBP78neVqg6rDSZbD7BWjJcjFAfycbyqN3 3/6cHVcQ+5G3MqDFgH38stNlcveoskT5NwXXGYbnAP8yr/zSjblZzdIcrKQujGR9We OvMh9hBBwfowvWIc6Jpf2UmX9Whran88EsqN/ryNGKLiEcI6z5qaPbilN8tbMyKCWV 5PaBhS5D4Ow8rsL7QrdcXr7PGDm4FxmZF2UVxP16cpvzXADhMZ+p39uJAy22je4nea aR0Z51DHzKPNfldYCSvjz5A2vhYtqH75nlp1dQDnjPHyyS0pQVvQ0B9Hm8yoF0oUAt 8Nm7pBym5feZ9yAMIHkik23f7oqgJ1jW1tOf1gCslBcuCUp8oW55SM3Joi+Rq2OBF0 SOraSzFQcY1UO7SocT0xTQ4iIfb+ro4lxJctr1ImrmhoPJ3kuSvVLgCWjQSgr9HLMj eP9jYtobTb7Z6SK49r7D4ImnG7uJfDri+bWx+EGU2qFCLqg0ig7E12gTjZxWBbdKFJ V5lWU+NbU/K44IzwC9XYxQx0= Date: Thu, 27 Oct 2022 00:43:16 +0200 From: =?utf-8?B?0L3QsNCx?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Jiri Kosina , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Greg Kroah-Hartman , Jiri Slaby , Kees Cook , Peter Zijlstra , Josh Poimboeuf , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net Subject: [PATCH 09/15] x86/APM: remove APM_BIOS_MAGIC Message-ID: References: <9a453437b5c3b4b1887c1bd84455b0cc3d1c40b2.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="25xdnldcorum34ww" Content-Disposition: inline In-Reply-To: <9a453437b5c3b4b1887c1bd84455b0cc3d1c40b2.1666822928.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=1.9 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,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 --25xdnldcorum34ww Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=C5=84ska --- 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 - arch/x86/kernel/apm_32.c | 9 +-------- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process= /magic-number.rst index d8ffbc21872e..77a96a79c7e8 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -68,7 +68,6 @@ Changelog:: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D Magic Name Number Structure File =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -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`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Do= cumentation/translations/it_IT/process/magic-number.rst index 0e59704aa617..ef509265a3df 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -74,7 +74,6 @@ Registro dei cambiamenti:: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D Nome magico Numero Struttura File =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -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`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Do= cumentation/translations/zh_CN/process/magic-number.rst index 17a73661ef17..6437c408dd67 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -57,7 +57,6 @@ Linux =E9=AD=94=E6=9C=AF=E6=95=B0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =E9=AD=94=E6=9C=AF=E6=95=B0=E5=90=8D =E6=95=B0=E5=AD=97 = =E7=BB=93=E6=9E=84 =E6=96=87=E4=BB=B6 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -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`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Do= cumentation/translations/zh_TW/process/magic-number.rst index 9d44d49b93bf..453cc205e6c3 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -60,7 +60,6 @@ Linux =E9=AD=94=E8=A1=93=E6=95=B8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =E9=AD=94=E8=A1=93=E6=95=B8=E5=90=8D =E6=95=B8=E5=AD=97 = =E7=B5=90=E6=A7=8B =E6=96=87=E4=BB=B6 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D -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`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/= linux/hdlcdrv.h`` diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 60e330cdbd17..f3dd21dc56b7 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c @@ -330,7 +330,6 @@ extern int (*console_blank_hook)(int); * The per-file APM data */ struct apm_user { - int magic; struct apm_user *next; unsigned int suser: 1; unsigned int writer: 1; @@ -346,11 +345,6 @@ struct apm_user { apm_event_t events[APM_MAX_EVENTS]; }; =20 -/* - * The magic number in apm_user - */ -#define APM_BIOS_MAGIC 0x4101 - /* * idle percentage above which bios idle calls are done */ @@ -1459,7 +1453,7 @@ static void apm_mainloop(void) =20 static int check_apm_user(struct apm_user *as, const char *func) { - if (as =3D=3D NULL || as->magic !=3D APM_BIOS_MAGIC) { + if (as =3D=3D NULL) { pr_err("%s passed bad filp\n", func); return 1; } @@ -1616,7 +1610,6 @@ static int do_open(struct inode *inode, struct file *= filp) if (as =3D=3D NULL) return -ENOMEM; =20 - as->magic =3D APM_BIOS_MAGIC; as->event_tail =3D as->event_head =3D 0; as->suspends_pending =3D as->standbys_pending =3D 0; as->suspends_read =3D as->standbys_read =3D 0; --=20 2.30.2 --25xdnldcorum34ww Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmNZuAMACgkQvP0LAY0m WPGPXA/+OXXLOZ+tHwUL1HpBXUcqqAANTMsPcIteBX/t++xvVqqEU3u/sLh5BDKj 67FLa2axj9LsfCBLf4GU1v86ck2X3BZ2qo/5w9S/oAPysZfWxh0r7go6Ii21oR7a fBGiO0J6b6laSKC3OUeFsOC2iNNS/H0T4S9117pbIwf+JK468FQ/COLAiAOI8357 Jj2YTN0Kfr8R7QtukTHFQUAzgq39VbO7VXFq3tGtca2JSBCt4Wq0MsxAEkisuVtB UkfHF5W8a664S8VoWO0HUzIDCtX1DDBv9fgXlqnc0rv69+w7aMjoqaLVnooQ35tF T7cPZZeFJte3wrBQmT7THus6NdIBN/JFNR0CGe6BwXEFUvZfVNbTSQJspduqKiBK WuG4giAZBMLJ3h+UZNpx8+qRRtKWTVlFB4FHveAFYvq77QHB812QJOaYKkqj8WHi A4GdLhPKRw3S7TrTL/K1+zw/CBJotTpSVU4xfZbOo8uh1sWwidWu+4LAxmaFKdXS +iYGD1He+AtFRGKQM3ZMMLEipAQQGU0sCferlgGJ+HDuItLSTVivFg2k6ui/xypn SAnCndxa/xh7ExucntkxIiMhX5Pbu1dDGVx7MoYK4pFLrPdKP8fdO3Puphuo+kmH m2CuDJfCZaCQXUz7kgDbzB6wEdkICaEdkEDupWswX4g20wQTTWI= =2BJn -----END PGP SIGNATURE----- --25xdnldcorum34ww--