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 1C569C433EF for ; Tue, 14 Jun 2022 07:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355502AbiFNH5r (ORCPT ); Tue, 14 Jun 2022 03:57:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355427AbiFNH50 (ORCPT ); Tue, 14 Jun 2022 03:57:26 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A76493FBC8; Tue, 14 Jun 2022 00:57:19 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 581A121B80; Tue, 14 Jun 2022 07:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1655193436; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5qoKbvJC0REg3jVh12YPL0trFwv8mfDnBd9bswtjvBs=; b=bl38xbcpyZBj4wetIAx46gc7MZt5NIJSYLg6eZsmI5o+0Ny58c2R9q9duldysWZshd2eW/ dAFiDKIUPtlG+TRcs9T+zEYXu7IvhhdT80NKG6jndLOGIlyfHIDEAyZuDxfwCMbByPU9ih HFGLejjwPeUDcUfqEasb9pHYcsfyCgE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1655193436; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5qoKbvJC0REg3jVh12YPL0trFwv8mfDnBd9bswtjvBs=; b=34srPxoO6kuKMBDVksSdwFOO+XMwbuUiEEw5Hd9LZq1FQELOoVKG1p/I2IRXFickiGdVc3 qczpZqnBhpbDVNAg== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 2BED42C141; Tue, 14 Jun 2022 07:57:16 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 7/7] tty/vt: consolemap: remove dflt reset from con_do_clear_unimap() Date: Tue, 14 Jun 2022 09:57:13 +0200 Message-Id: <20220614075713.32767-7-jslaby@suse.cz> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220614075713.32767-1-jslaby@suse.cz> References: <20220614075713.32767-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org con_do_clear_unimap() sets dflt to NULL and then calls con_release_unimap() which does the very same as the first thing. So remove the former as it is apparently superfluous. Suggested-by: Ilpo Järvinen Signed-off-by: Jiri Slaby --- drivers/tty/vt/consolemap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index 9e94ec0e0f83..5f3e58165b98 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c @@ -563,8 +563,6 @@ static int con_do_clear_unimap(struct vc_data *vc) if (!old || old->refcount > 1) return con_allocate_new(vc); - if (old == dflt) - dflt = NULL; old->sum = 0; con_release_unimap(old); -- 2.36.1