Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1702179pxb; Wed, 9 Feb 2022 02:36:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwKapyncpHobjr5etYEyANziiOZpTtYeRJVja6T6FLTni6hnXDF79Yoz6XPwhPQunbYTKr X-Received: by 2002:a17:90b:3b52:: with SMTP id ot18mr2733758pjb.34.1644402990788; Wed, 09 Feb 2022 02:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644402990; cv=none; d=google.com; s=arc-20160816; b=ZwFav0nnAOdI/Q7Rm/sJOaJfU6ajeQ+jkS0WCI7P3Wo/20rwt3eOgjVm6ekFcYpxTO zt46HU2wjIwyD4/aJ+2DGaJzfgvUhY6EuM438W5yJnuTTXaGmvOG+A1QWWG6jBUg81di Gwg6kWyz2ZfVhp7ovncV0rsHmhX7MAW4g5/STAH4iA5L3MA3/qe+t3FvAupOdPn8sepg n9KzXU4B40u+sm9xorpVl81I7h4WryskiiQLljQL+4Tf2esfY7W0P2z1WkUvFY1Mbgy9 jQW4OkRUcdsvtNrULblX/RfsUQ8iy3pa9ZINVV7gPdA+LF7eki2dJsAPeh87Ch45whN+ ahlQ== 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; bh=0jcZhW240q/V+F937iAT51+jAJ4wMTWthnKOU1oFwYY=; b=cmJvNNunYGI+HzvSb+7SCa8oTidfqs3+7I1URugc0CzLJoTxafybvsnzp8bYRg6vAb WTlH0/Tet1pfwkJZJvQ3uDxoPj+WrMN5K2XOjAYN+KGOM0nc9CaSsIquI5QxekcSXe9n 34X7aHrKxH3s4xaj23PHCAeaVF3UHt1ggx9TT9hdMjmlzYVPK4rqm6IJs4DY4ggiJo61 /IqX6AfER5X9rOOwdxCob0JIOxKVkoFae3mgNFUusJ1XKLkDtEGuTWTZwct0WKAEr8SI ums0Jx936aDlygfpW2Ovj4Z2os3OwdsZaFLlSYmGavqrnTvHVSzX5+0iHft9bg5PaqC5 uW+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=RvN9RXsH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q6si15680015plx.478.2022.02.09.02.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:36:30 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=RvN9RXsH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 02829E0A8BDA; Wed, 9 Feb 2022 01:23:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386935AbiBHWfg (ORCPT + 99 others); Tue, 8 Feb 2022 17:35:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386725AbiBHVIu (ORCPT ); Tue, 8 Feb 2022 16:08:50 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 537EEC0612BA for ; Tue, 8 Feb 2022 13:08:49 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id l67-20020a1c2546000000b00353951c3f62so153819wml.5 for ; Tue, 08 Feb 2022 13:08:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0jcZhW240q/V+F937iAT51+jAJ4wMTWthnKOU1oFwYY=; b=RvN9RXsH98HQ7R4ASK94Wa721S7v3e9uYupFyjpxCVnHmyUZk9Z0e0fiSif0AsX195 hJ8mBsbov8YE3ijlPln772kRVM7ChshKzGAhsKXYeIBbkNk0RX0OB2TONi3m39pCKQhc m8pJ7WEZ//h8h6RloxQYTj4Gg7Q9rT68dL5eI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0jcZhW240q/V+F937iAT51+jAJ4wMTWthnKOU1oFwYY=; b=kpdZzWoiYvXlK/f4PcA02jOhSw9jfG/H9DNclC1xXZOVlorZtpsP9qE6hYTNGmWLMG NMS7Aghe6V6QN57LlPvmTRtSvnvXJMXdh/2XYVg/sPZO4nrFJUNdyd8GkjuXmYc0zhNw 7xfxCs2bgTs8NQ3ym9VrZ8SJXDWaA1F4dmEyZZMUr1T0XY4gDYDIgk6fr5LX9HxQ2+Fj 7wvFabzMYEMRyp4uPx4eWIbupir98V5wQV1t6fSRAFwVxBeHbbnYhUVyU2VFRkQjwhxL vySpvvIo7iwLt69cka9Ic9jAHwBdib8QaKrm7KQQ9Qn11OfSz516uDG8AdeSlssTofdR hhNQ== X-Gm-Message-State: AOAM532J2W+TDkF8+tH8UvFenDLpZfc0fUmLGrFCMazMAqBTT94zDLFQ 23fJUu+ofKZCqWfltDDJhUNwOw== X-Received: by 2002:a05:600c:3848:: with SMTP id s8mr2565869wmr.151.1644354527869; Tue, 08 Feb 2022 13:08:47 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id o14sm3033561wmr.3.2022.02.08.13.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 13:08:47 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , linux-fbdev@vger.kernel.org, LKML , Daniel Vetter , Sam Ravnborg , Daniel Vetter , Daniel Vetter , Thomas Zimmermann , Greg Kroah-Hartman , Claudio Suarez , Du Cheng , Tetsuo Handa Subject: [PATCH v2 10/19] fbcon: Ditch error handling for con2fb_release_oldinfo Date: Tue, 8 Feb 2022 22:08:15 +0100 Message-Id: <20220208210824.2238981-11-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220208210824.2238981-1-daniel.vetter@ffwll.ch> References: <20220208210824.2238981-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 It doesn't ever fail anymore. Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Thomas Zimmermann Cc: Greg Kroah-Hartman Cc: Claudio Suarez Cc: Du Cheng Cc: Tetsuo Handa --- drivers/video/fbdev/core/fbcon.c | 37 +++++++++++--------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 3e1a3e7bf527..a60891005d44 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -739,9 +739,8 @@ static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, return err; } -static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, - struct fb_info *newinfo, int unit, - int oldidx, int found) +static void con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, + struct fb_info *newinfo) { struct fbcon_ops *ops = oldinfo->fbcon_par; int ret; @@ -770,8 +769,6 @@ static int con2fb_release_oldinfo(struct vc_data *vc, struct fb_info *oldinfo, "detected unhandled fb_set_par error, " "error code %d\n", ret); } - - return 0; } static void con2fb_init_display(struct vc_data *vc, struct fb_info *info, @@ -825,7 +822,7 @@ static int set_con2fb_map(int unit, int newidx, int user) int oldidx = con2fb_map[unit]; struct fb_info *info = registered_fb[newidx]; struct fb_info *oldinfo = NULL; - int found, err = 0; + int found, err = 0, show_logo; WARN_CONSOLE_UNLOCKED(); @@ -854,18 +851,15 @@ static int set_con2fb_map(int unit, int newidx, int user) * fbcon should release it. */ if (!err && oldinfo && !search_fb_in_map(oldidx)) - err = con2fb_release_oldinfo(vc, oldinfo, info, unit, oldidx, - found); + con2fb_release_oldinfo(vc, oldinfo, info); - if (!err) { - int show_logo = (fg_console == 0 && !user && - logo_shown != FBCON_LOGO_DONTSHOW); + show_logo = (fg_console == 0 && !user && + logo_shown != FBCON_LOGO_DONTSHOW); - if (!found) - fbcon_add_cursor_work(info); - con2fb_map_boot[unit] = newidx; - con2fb_init_display(vc, info, unit, show_logo); - } + if (!found) + fbcon_add_cursor_work(info); + con2fb_map_boot[unit] = newidx; + con2fb_init_display(vc, info, unit, show_logo); if (!search_fb_in_map(info_idx)) info_idx = newidx; @@ -2769,7 +2763,7 @@ static inline void fbcon_unbind(void) {} /* called with console_lock held */ void fbcon_fb_unbind(struct fb_info *info) { - int i, new_idx = -1, ret = 0; + int i, new_idx = -1; int idx = info->node; WARN_CONSOLE_UNLOCKED(); @@ -2803,13 +2797,8 @@ void fbcon_fb_unbind(struct fb_info *info) if (con2fb_map[i] == idx) { con2fb_map[i] = -1; if (!search_fb_in_map(idx)) { - ret = con2fb_release_oldinfo(vc_cons[i].d, - info, NULL, i, - idx, 0); - if (ret) { - con2fb_map[i] = idx; - return; - } + con2fb_release_oldinfo(vc_cons[i].d, + info, NULL); } } } -- 2.34.1