Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1272189iog; Tue, 14 Jun 2022 02:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0Fv/lsf784x8g6tWurXCPHx6f/kNyN+mE1uUYFk9gBcjfG+lnKdqWJqmMsGvpItbLkyXa X-Received: by 2002:a17:906:3693:b0:718:4125:f08d with SMTP id a19-20020a170906369300b007184125f08dmr3382257ejc.146.1655200157623; Tue, 14 Jun 2022 02:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655200157; cv=none; d=google.com; s=arc-20160816; b=t233ZKm3i2AEBn7ESw4y/piYYE4h6aliotE6SWErKqcAwv8qVBWDb+N+rhCIsDK43A ZWnX80dx0AHwCNAKTtQxT4g9a4kjs20I78kwqLqDumAEtIQ1PN0RfHKEOSOvVrdtCQAP nN8ELbmTUVZnRc1iOu0J2EqBQOyJCSmLmNT+kKwI3jtLPRUG5DmANQXTKemC4eJ4tqKJ ll3Nt3nwVL0JbmZUXHtvoEyWHQE1jJqqxuuf1+lJ/OYsWbkdqNmR4A8H+soUY3TYHGGS 3/2kVcVA7nYQNgcUN+dD5BTdyzqK9A7eQEB3Et0BFQTUrehE/297M/wuD18A5XOoni+N l6Kg== 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=4aJUUWhtSMEqiKUiJXbZqYTMlQNrO13UAYQJXLB/zTQ=; b=YkEvFJ74mYVOidtmlk7Yxjce17Nb91DZ0Uf7xO1MxmTE6nAUu0UvZ2Rl93wkQK62GG IkwiKzQr4NzZLFdNt4Kjc5+7k+nKfIyhjfAIlYGfxTSFQJOwdgC/cfZxIiOEoYc7cpS4 qohqv/luo0qyy2Q12Th9DkVU6Qc/NjpgjKOr7N93/WXFoICe/8lxzfenV6ChF5VCx5PK ISaslMQw4S3NroTxu0n4zQ2rM8+wXEMPGV71Ox6wNdE2fRXQpcMbj4kBeMKsHYewfPDq XMa2VfWKrtekq2sugulAj4BrW+2WKFyMgdmGVpnEet7jLxrJFSMLyxFDlFGS2oFSbGil gwUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=mQalSBD8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=zbo62cHP; 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 x1-20020a05640225c100b0042dcd84e8c8si10542415edb.376.2022.06.14.02.48.52; Tue, 14 Jun 2022 02:49:17 -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=mQalSBD8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=zbo62cHP; 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 S1352702AbiFNJGJ (ORCPT + 99 others); Tue, 14 Jun 2022 05:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239786AbiFNJFn (ORCPT ); Tue, 14 Jun 2022 05:05:43 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B2A63E5F5; Tue, 14 Jun 2022 02:05:43 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 06F5921AF6; Tue, 14 Jun 2022 09:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1655197542; 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=4aJUUWhtSMEqiKUiJXbZqYTMlQNrO13UAYQJXLB/zTQ=; b=mQalSBD8ti7+HqE6QvGbZyNwm/6JbR7tR1T472mmQnVmDE/p6HnHeo48lejuQDVnTisN3k Izq+G2QB1RGnRsYR6FThH/XyzHmHgj+qIhiGC5BcvmaHY6dJP6eqNWz6ou+DM9UYXZeY4T Wg3W7Tr9et1sOuXMfvcvW4TkqJxM230= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1655197542; 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=4aJUUWhtSMEqiKUiJXbZqYTMlQNrO13UAYQJXLB/zTQ=; b=zbo62cHPxH7GlTz6N3kb1h+EZxxtPYqdvzFvUSPXJZ+3wLTc2qJWAPZpY2c5kO6FJmkqQd 05rV4U2w2yoHpjBw== 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 CA19E2C142; Tue, 14 Jun 2022 09:05:41 +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 v2 7/8] tty/vt: consolemap: remove dflt reset from con_do_clear_unimap() Date: Tue, 14 Jun 2022 11:05:36 +0200 Message-Id: <20220614090537.15557-7-jslaby@suse.cz> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220614090537.15557-1-jslaby@suse.cz> References: <20220614075713.32767-1-jslaby@suse.cz> <20220614090537.15557-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 Reviewed-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