Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3756449ybh; Tue, 6 Aug 2019 00:47:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA7nH0+XxRJPb8HjGc0oR1lovu9ubkfi8FjVcY/6zKIvfeHiD+xCBVR7cT3FxdNDarwNFS X-Received: by 2002:a63:5b23:: with SMTP id p35mr1799613pgb.366.1565077623889; Tue, 06 Aug 2019 00:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565077623; cv=none; d=google.com; s=arc-20160816; b=ArHs6XHNo/6wBf5iJWVZFigJN8hEMQVMJ5tij2LiVQbhWXOO47/Gu2BQXgFGYK9QZi EjEXhkBnGW+7J1yPA8biLAdX8bisakmq6YgiTDhY/3Jt8TuciH5z5SLuupYH7cUt0nYk jLLYew+FFL2wHa1AKg5CQilLQ3x0xCHhuVGwQUrKmiqA102bxRU7o8sMk0sQATP65aQb ZSKpn9BAs6EaFACXGn+XBA1cD+n9sxl9ifFKzq1teve7rsbGK9fW3Ilp45EMF0cn8VlI 2JJ3MuF0VF5/HwinrezvcVu5vFm6RzvNGpIzfxXV2imU6ZCJ6TPDqxj9BTQoF9h/lQLH jBmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=rjYrzV7oHZse8Of7KzT8ZIWiaTjwIb29XPphB/LAtRk=; b=RY4y1Xibs8mJOzsBJx+eyLxHuu2l9wz88i095TcvKdheLjPcu/kJ+a9TFK4BG1ZTDx 2za0yXqGwPIegWZqn6rcgCogR5JCSHkZvonTZbw3WcbJj+oLOOqs55H41Z0atTOliwsZ efbSSRFuk1h6IElvEhwepWgBOOYEUBFx8A9n9oIoNVq7mOVAN9aGvXrNjRxTJneniJtT cF4ORzEkCho41J/BXCk1JayvxKOtYSLy4ORvcu982KQ+Xnx7p6RELHn0Y9p8qRZRTbqG rKnegg/1k5JevUWCPQrxsfyj+jWK4Y825rhiVzX/Zo6HFdayzn0DWa5HS66tEP4ugBgM /2Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1si14350910pjq.17.2019.08.06.00.46.47; Tue, 06 Aug 2019 00:47:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730222AbfHFHpk (ORCPT + 99 others); Tue, 6 Aug 2019 03:45:40 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:52627 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfHFHpj (ORCPT ); Tue, 6 Aug 2019 03:45:39 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1huuA4-000499-7m; Tue, 06 Aug 2019 09:45:36 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1huuA2-00079K-Tu; Tue, 06 Aug 2019 09:45:34 +0200 Date: Tue, 6 Aug 2019 09:45:34 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Schrempf Frieder Cc: "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-imx@nxp.com" , Greg Kroah-Hartman , "geert+renesas@glider.be" , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , Jiri Slaby , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v3 2/4] serial: mctrl_gpio: Add a NULL check to mctrl_gpio_to_gpiod() Message-ID: <20190806074534.5w773nltywxyiljz@pengutronix.de> References: <20190802100349.8659-1-frieder.schrempf@kontron.de> <20190802100349.8659-2-frieder.schrempf@kontron.de> <20190802121231.wk6yg5mkyivs3rni@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Frieder, On Mon, Aug 05, 2019 at 09:01:39AM +0000, Schrempf Frieder wrote: > On 02.08.19 14:12, Uwe Kleine-K?nig wrote: > > On Fri, Aug 02, 2019 at 10:04:10AM +0000, Schrempf Frieder wrote: > >> From: Frieder Schrempf > >> > >> As it is allowed to use the mctrl_gpio_* functions before > >> initialization (as the 8250 driver does according to 434be0ae7aa7), > > > > Actually I was surprised some time ago that 8250 used serial_mctrl > > without first initializing it and expecting it to work. I didn't look in > > detail, but I wouldn't go so far to call this "allowed". The commit > > itself calls it "workaround" which seems a better match. > > Ok, but if this is considered to be a workaround and as the 8250 driver > does not use mctrl_gpio_to_gpiod(), we should maybe just drop this patch > instead of encouraging others to use mctrl_gpio before initialization. > > I'm really not sure what's best, so depending on what you will propose, > I'll send a new version of this patch with adjusted commit message or not. I wouldn't encourage usage of mctrl-gpio before it's initialized. So I suggest to drop this patch. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |