Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4989379rwb; Mon, 21 Nov 2022 15:00:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lTz+zHViPcYGB6/x8E/Z4Ek855O2l0yGQSdPoKDemA3FD/4Yzu43zCBoRWebJLPzqCMFI X-Received: by 2002:a17:902:d893:b0:188:542a:68d8 with SMTP id b19-20020a170902d89300b00188542a68d8mr3035547plz.126.1669071641054; Mon, 21 Nov 2022 15:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669071641; cv=none; d=google.com; s=arc-20160816; b=jnvgUvQOVW9xWTtyLLOZ+w0XmpJMnXaylrhNDHToiOXGuAtwZY68ItblBfMVqyFzll w9bCLLbhM8P/5PKPTEJEn+D3Kn9k4ACrQW7XurVs/bQx9fz4zdx0aMIlG+cs3wNTPPTT FYemgDUuXkrtF43co1lt66KEPaMQZXIybXyT74yuaxaXf6qoOorOZMnO7tusjwKaQaf2 fdrX/7tHCE8rMgSU1BV714j9+Tl4PENeI6DIz3Nl3fgU4veeydmgvY890pm/DC774RWJ +69xBzjd0OSxw0my+1iKZeySYLBJcuMjkxnn4ADF2M4L+UHS1LmWslWE9vM7dHtTeKsV F7Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nCA9n5gf0Ai7p0G6cqtrYlbu/nYb1Pt/ObksYVnEkAc=; b=Hkpv74rG50lW+ZAxlIMe6/ImfIF6V2YCkk8idk2upMgUCO2Ovy64Yf7TBGI05zDamp EW1RlqC0ocLzQVNdYGY6DyWLlYncZzb2nfggL5IuF5puoi/VqQAZQJRyD0NqJMbJpDs3 Xo4/gG9tvr5mu0Cf3fDNIOnuJ0kbs2fEYTya/K2jpgkE1eEwZiYWDRdsyVNrpQ8OgH3U Bpzk9wUxY8KGnmDPkQ0NHBnJNl58H3jQxYCllYTe+UWxM6uixHBB6vp9fNZS4X8mFZOj WGe7KP+HToRWvY2E8YViK3Bo58pvd5nsHTEZKtpnZ136tfgKfnUyVQ7N1prkQ6kSN+RZ wpKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=ihXFCwVv; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020a17090a8d0900b00218abadb6a3si4825887pjo.65.2022.11.21.15.00.20; Mon, 21 Nov 2022 15:00:41 -0800 (PST) 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=@linux-foundation.org header.s=korg header.b=ihXFCwVv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231500AbiKUV5T (ORCPT + 91 others); Mon, 21 Nov 2022 16:57:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232021AbiKUV5M (ORCPT ); Mon, 21 Nov 2022 16:57:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A5EC11A13 for ; Mon, 21 Nov 2022 13:57:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B5A16B81668 for ; Mon, 21 Nov 2022 21:57:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E05F6C433C1; Mon, 21 Nov 2022 21:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1669067829; bh=tW6oDiQLZzIDYUBrQo2sq/hmd7+t5SdreSyS6ItzKtk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ihXFCwVvli5ByfuA4LL+UaxP0w9KQIz+0rjMq6WwB+cjRLGVDyZtRn4Xu26X1ZxwP +5wI+t62G4SaW4IKMPck8YpkWpE5qlAo+1H0wQwcZDHl3sW3VQscKYMZKZEuc1SdY/ ioiWFVYEuV271SIUlWN8MN7L5VgNmX/TrX1XB5XI= Date: Mon, 21 Nov 2022 13:57:08 -0800 From: Andrew Morton To: Xu Qiang Cc: , , , , , , , , , , , Subject: Re: [PATCH RESEND] panic: Add register_panic_notifier and unregister_panic_notifier Message-Id: <20221121135708.47f9a852a81d664a9b695336@linux-foundation.org> In-Reply-To: <20221119080305.111863-1-xuqiang36@huawei.com> References: <20221119080305.111863-1-xuqiang36@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 19 Nov 2022 08:03:05 +0000 Xu Qiang wrote: > Add two methods to manipulate panic_notifier_list and export them. > Subsequently, panic_notifier_list is changed to static variable. Fair enough, I guess. But... - It would be better to include a followup patch which converts at least some of the existing sites, so we know the code is getting tested. - Better names would be panic_notifier_register() and panic_notifier_unregister() - You forgot to make panic_notifier_list static to panic.c.