From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.4]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E2974414; Wed, 20 Aug 2025 10:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755686749; cv=none; b=YFPqaCCISX2+10mwfxKWVBiI6KrTpxcLmJRW3gbpEBr5TH21ASERf5E/gOPOpGsL2pAKSm6P2ln0WWBE2h99cb1e0DNNpAd4qxdk7BnFh2irn7yT0DbS8T4WRBYl3bImfY/vgkeu4g8i2/Exmys79/lL/jb8ZlxlnsigQvpVjEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755686749; c=relaxed/simple; bh=qGxKsdAFEHHSpPMZrdV+9RkQ/WpCc+7uFmKumcp5pho=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fc8SIuyJoPO0JpSBXyq9T0g5pBUuUo5G91TJ/Yc4oTQVszRDu1LD3GtBeoMVbFk/cos6oqzxxF9O4JyCZ3TFZ0Sb0zYT+Sytyok0axPw1l8YEvkVxZ8K45W01dXU2OYA9xW/PLoCEzoQ/XFhJCZxjxHNs+YSJ+qH6J8vPPFo+BA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=WlAqn8SE; arc=none smtp.client-ip=117.135.210.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="WlAqn8SE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:To:Subject:Message-ID:MIME-Version: Content-Type; bh=igVC+r9t1pPO+MPUsLfAQNKa2CjPT9tsw6veSywFJ7o=; b=WlAqn8SEoQNWxMua51YoTVqNPFgUmaOExPK+RVA2lkjis7GxmR/xaVNk49K6ev QBWfDq+jhDkeB0hOMOF9tU8j1lN37UN6pe8wuA1O3oM4WyjhQoej4/hdDmb4pK16 9FviIu7XONm8gbzCL3R6/CHDVonHx2FiFVavx286OxkTU= Received: from localhost (unknown []) by gzga-smtp-mtada-g0-4 (Coremail) with SMTP id _____wC3r3ILp6Voc_S3Cg--.25064S2; Wed, 20 Aug 2025 18:44:28 +0800 (CST) Date: Wed, 20 Aug 2025 18:44:27 +0800 From: Qianqiang Liu To: Jinchao Wang Cc: pmladek@suse.com, akpm@linux-foundation.org, Simona Vetter , Helge Deller , Thomas Zimmermann , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Shixiong Ou , Sravan Kumar Gundu , Zsolt Kajtar , Kees Cook , linux-kernel@vger.kernel.org, feng.tang@linux.alibaba.com, joel.granados@kernel.org, john.ogness@linutronix.de, namcao@linutronix.de, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 2/9] fbdev: Use panic_in_progress() helper Message-ID: References: <20250820091702.512524-1-wangjinchao600@gmail.com> <20250820091702.512524-2-wangjinchao600@gmail.com> <20250820091702.512524-3-wangjinchao600@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250820091702.512524-3-wangjinchao600@gmail.com> X-CM-TRANSID:_____wC3r3ILp6Voc_S3Cg--.25064S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Cr1xCF4Utr4rJF45AFW7twb_yoW8Xw43pF 45JFW3GF4Dtr15Ga97Wr47AFyFyws7JryUXFZ7t3WFq3Way3yIg3y0kFy0qFWftryxCw1S vr1Ut3WrGFyUCFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UQqXQUUUUU= X-CM-SenderInfo: xtld01pldqwhxolxqiywtou0bp/1tbiYByuamikVa45BQACsx On Wed, Aug 20, 2025 at 05:14:47PM +0800, Jinchao Wang wrote: > This patch updates the fbcon_skip_panic() function to use > the panic_in_progress() helper. > > The previous direct access to panic_cpu is less > readable and is being replaced by a dedicated function > that more clearly expresses the intent. > > This change is part of a series to refactor the kernel's > panic handling logic for better clarity and robustness. > > Signed-off-by: Jinchao Wang > --- > drivers/video/fbdev/core/fbcon.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c > index 55f5731e94c3..b062b05f4128 100644 > --- a/drivers/video/fbdev/core/fbcon.c > +++ b/drivers/video/fbdev/core/fbcon.c > @@ -279,14 +279,7 @@ static int fbcon_get_rotate(struct fb_info *info) > > static bool fbcon_skip_panic(struct fb_info *info) > { > -/* panic_cpu is not exported, and can't be used if built as module. Use > - * oops_in_progress instead, but non-fatal oops won't be printed. > - */ > -#if defined(MODULE) > - return (info->skip_panic && unlikely(oops_in_progress)); > -#else > - return (info->skip_panic && unlikely(atomic_read(&panic_cpu) != PANIC_CPU_INVALID)); > -#endif > + return (info->skip_panic && unlikely(panic_in_progress())); > } > > static inline bool fbcon_is_active(struct vc_data *vc, struct fb_info *info) > -- > 2.43.0 Acked-by Qianqiang Liu -- Best, Qianqiang Liu