From patchwork Wed Jun 7 14:05:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 104537 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp240627vqr; Wed, 7 Jun 2023 07:27:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kTbBO5cUzhdhJwn5nF7xEViSDJUo6BDP2P8klB24IPjETa7kvpd/GESxWmR9jTFAyAP0U X-Received: by 2002:a05:6a20:8f07:b0:117:7ad7:d9a1 with SMTP id b7-20020a056a208f0700b001177ad7d9a1mr3620408pzk.20.1686148079254; Wed, 07 Jun 2023 07:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686148079; cv=none; d=google.com; s=arc-20160816; b=JfqBuJF1RyZBnYu53vrcpuoE84NehZawCNMg3ZnxR4yKG/GhWqZZKiHW7lIjTF5Itb /v68v9YRKc8MsD0tonh19fxt3EyFU0yYLYKr8Iau44l9Wv1ph0JTp6VXtYMqyON52jDq qPBrEReuaLcH+JSZZ1Hr/LzOKVFlipr/lJFnKd/30rxLazXixmWNelVBPKCCU/LPfY5B zIIfttMxoQ9+kAkE0JHFuSGXcaO6foVlewZ1dWfNBi1dPhUThxXWvrunTq95pfdTV241 ldalWIR1Idq/xaeF6XRf0sN9rzniwvo25OhlJ/XTc5FgPK276yF1N2swy7UMsQInR6Dx 2nAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=OoqPn3uFTVj2niFKmMsjNPUNbU9bH8b3tzoLfr8jTrA=; b=y9yERjDljhWTxUuzcjIkdgjZuBIDloZ13kVhOnZXAeGXYD2VhpjGtOoNuHc5TtEYA9 3V6fgKjepx9/Hcw7WQJw1WqqgdHaWdAZxmluhJ4TKlUsBIkQfIOlT/yJrrKNtyr39p51 CPva9NOI4GVTbrl22Y9IGedVHWRj+ZYgeUBJTshND4N4bLRQIqqbsFmn+EIS9xZCRHa8 G3O9DH/Y4Co//IVJMoThIyyoR2q5D94s6pv0STANrmyeb8/zc1PVjhtOUKqS2DY2l6OF YR5tBaWx3rM0fgKWmZi2CVDYZylavoWZ0Yks2cFdI++C/JkY4fVopmzCONrSETK65cZ/ SKSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=yvKr2sgJ; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv129-20020a632e87000000b0051b930ef847si8967198pgb.134.2023.06.07.07.27.41; Wed, 07 Jun 2023 07:27:59 -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=fail header.i=@hugovil.com header.s=x header.b=yvKr2sgJ; 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 S241069AbjFGOHV (ORCPT + 99 others); Wed, 7 Jun 2023 10:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241059AbjFGOHG (ORCPT ); Wed, 7 Jun 2023 10:07:06 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E7526AE; Wed, 7 Jun 2023 07:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OoqPn3uFTVj2niFKmMsjNPUNbU9bH8b3tzoLfr8jTrA=; b=yvKr2sgJ8C5vl5CDBhc/Bax2LK JRSkenZ9irNsartVwdcjDFPReyPqL8jV8TT6VeQoC8zFMpxgDrePtdlWl+b69qcG8D4Zl+jmWvQBx EHdSruxd+jnjnnAYAyUm6WO69fpoxnhxx/iAxNKJ+Nl57jSqykUob0sOsqoLgaQULmys=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:57832 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q6tn5-0005dF-W8; Wed, 07 Jun 2023 10:05:36 -0400 From: Hugo Villeneuve To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, jesse.sung@canonical.com, isaac.true@canonical.com, l.perczak@camlintechnologies.com, tomasz.mon@camlingroup.com Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com, linux-gpio@vger.kernel.org, Hugo Villeneuve Date: Wed, 7 Jun 2023 10:05:17 -0400 Message-Id: <20230607140525.833982-4-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230607140525.833982-1-hugo@hugovil.com> References: <20230607140525.833982-1-hugo@hugovil.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v8 03/10] serial: sc16is7xx: remove obsolete out_thread label X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768054408480147297?= X-GMAIL-MSGID: =?utf-8?q?1768054408480147297?= From: Hugo Villeneuve Commit c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe") moved GPIO setup code later in probe function. Doing so also required to move ports cleanup code (out_ports label) after the GPIO cleanup code. After these moves, the out_thread label becomes misplaced and makes part of the cleanup code illogical. This patch remove the now obsolete out_thread label and make GPIO setup code jump to out_ports label if it fails. Fixes: c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe") Signed-off-by: Hugo Villeneuve --- I put a "Fixes" tag, even if the patch doesn't fix a "real" bug. It could have been merged with later patch 6/10, but then the explanation for the change would have been somewhat lost in the noise, and I think it is important to clearly state in the logs why this change was done, to fix a "logical" regression introduced by a previous patch. I can remove the tag if it is deemed non appropriate. drivers/tty/serial/sc16is7xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 0c903d44429c..9e9856846643 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1516,7 +1516,7 @@ static int sc16is7xx_probe(struct device *dev, s->gpio.can_sleep = 1; ret = gpiochip_add_data(&s->gpio, s); if (ret) - goto out_thread; + goto out_ports; } #endif @@ -1542,8 +1542,6 @@ static int sc16is7xx_probe(struct device *dev, #ifdef CONFIG_GPIOLIB if (devtype->nr_gpio) gpiochip_remove(&s->gpio); - -out_thread: #endif out_ports: