From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4B0CC4332F for ; Mon, 21 Nov 2022 21:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231784AbiKUV5T (ORCPT ); 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 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.