Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1224246iog; Tue, 14 Jun 2022 01:37:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v4DrtjjKcrva2uk/Jk7bxFWUSuCs2KhZZtTFlQVthLtVLn+7Ot04hyC6abVGWD+L2SNSOg X-Received: by 2002:a17:902:aa4b:b0:164:11ad:af0f with SMTP id c11-20020a170902aa4b00b0016411adaf0fmr3588043plr.54.1655195853066; Tue, 14 Jun 2022 01:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655195853; cv=none; d=google.com; s=arc-20160816; b=Da9V8qpsc7xJHaTR+TDP+QRK3ZKSPg39BeF8Wapiggz0VJxEOcoJ3X42q0bJLEVB14 dB7VR/NGXkycHzIKVEHtDrfAfUizbfUzoVV+rR8er9Q3TbISQE83uC732Yf5m22iOpX2 welZE/5bpvYS/vt1iieGPqvufX7OWNUQdhKdSxR3jYo4JHSAunkMN3ac29MKXJsP0egh Uaz4TBT3CrpHj/zNCliFG+uzQaYTmXNjPPeJv8dPGGIpAcAZocrW+mz3MJ7XqYk+yzf4 GJ+dkZl9uTdtVaMGwniAcZjVXy6hquZusgHqt9vC4ETKvXJPiTTvH7kbyGwVWrIflcR0 XB0g== 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:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=5qoKbvJC0REg3jVh12YPL0trFwv8mfDnBd9bswtjvBs=; b=T+Y0ra9IZL7G1T0imQC0sFWw/lyqmDouW2qqZRY+Fj92Ut/IYqNe9t7YRs0CBUpZLT oHb7CGh1MMcmGMs4vMEGGF6l1wGT/Q8L7c402aRPEFVDzsAQqWNG9jkItzgyhIxhtktP WuYlBmzpRhoe92MZwAy8QUl3V75OONN/hgse1/7Um0ZPTcu3H/yt65Lc+Cv20sY81gQL sWwZirmzh2k9/zBmIuB8349UcQB/8s6d8J/I2FEwvHZF6YqR5yqR018GVhkd+v15jZqD URboGUQ90czMKtexINGUoeiqmgIHIzMZqqnBsknP6IMB+Zm+v/wynSEpTlnPgAUuxKyB OwUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=bl38xbcp; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=34srPxoO; 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 s185-20020a632cc2000000b00408a86a843csi1410607pgs.531.2022.06.14.01.37.20; Tue, 14 Jun 2022 01:37:33 -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=@suse.cz header.s=susede2_rsa header.b=bl38xbcp; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=34srPxoO; 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 S1355492AbiFNH5o (ORCPT + 99 others); Tue, 14 Jun 2022 03:57:44 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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