Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1587001ybv; Thu, 20 Feb 2020 23:48:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzi7jaoyNoERVBS/XFv2LrR4v45NiqQ+m+/FsnGjK7euVtSnneujdiDeVxafybvPsvEbr35 X-Received: by 2002:a9d:20a:: with SMTP id 10mr26130778otb.319.1582271302894; Thu, 20 Feb 2020 23:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582271302; cv=none; d=google.com; s=arc-20160816; b=BhBVl22taleDH+laok1yE2g0MbbCVi4bzaxuZP1Rci84kHtidiZPWg0IUQQgqp/k8S Sf0nvvg/Mjk2NuYALeZzXcSWEGnKYLosJpZOsThihTUp5ar6lydigKBrtib9XMeKeH7n idFMadw4P2C1raOzOWefzm7JW0vQQd9E8hMbvJD+tSOGsbI1bBL+Bgrk3jtOaZYPQpqp VKZNNxL48wXKtT67edTyQK9GYmADsmvFfsxLrbEOCg61Py6HUVxaJcbrIm1q+Neu3u5C s7sXns3WTyagMJ0zjN/bDqrVXGcsXhTyvVCbaihcZweaz5nmRkkokRKD6c8+/GyKUNIN kjUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=sSF4oRCHeACPsG/7LQ/BenXya6gXa31WyYG54H/pRg0=; b=i67RJDQmN2OoiSK5SZShSiE9yNsr6jd2yFdYqETNM+O3POC8euWiO6PYVv+hy+imI6 7ysLIbzGPaOYRLDMP4nSXyzGHjF+nHl6bJD/XDsRsUNLAgfUtu7EppULf5vzMsN+xW9A rGfkhdKbRyFzHYtCBLIq6W/tZRu8FeqKvFN8x0r1CNucHNY26zB8vWmdgUgBlUgwbwNk 4Az5OJ9dTZwDuHI/9wxUoYu8AfSWx6lGHRLC76CjVL953Htx7tmqAZ46CS3SuHn7mCQ8 +f/lXfLWieIebQ0dMPiGcLE8Mpf+zwLgcg3jngp3zz/I81drDiMB/UJbiHuauyGPKTuX rpWw== 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 p189si482222oic.134.2020.02.20.23.48.10; Thu, 20 Feb 2020 23:48:22 -0800 (PST) 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 S1728972AbgBUHrr (ORCPT + 99 others); Fri, 21 Feb 2020 02:47:47 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:56486 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728567AbgBUHrq (ORCPT ); Fri, 21 Feb 2020 02:47:46 -0500 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23993981AbgBUHrmjARU3 (ORCPT + 1 other); Fri, 21 Feb 2020 08:47:42 +0100 Date: Fri, 21 Feb 2020 08:47:40 +0100 From: Ladislav Michl To: Chanwoo Choi Cc: "H. Nikolaus Schaller" , MyungJoo Ham , linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com, linux-omap@vger.kernel.org Subject: Re: [PATCH v3] extcon: palmas: hide error messages if gpio returns -EPROBE_DEFER Message-ID: <20200221074740.GA44103@lenoch> References: <20200218102140.GA193069@lenoch> <20200218104810.GA194120@lenoch> <34f3cd11-321b-9aab-31a7-a3fb03691980@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34f3cd11-321b-9aab-31a7-a3fb03691980@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 08:09:16PM +0900, Chanwoo Choi wrote: > On 2/18/20 7:48 PM, Ladislav Michl wrote: > > On Tue, Feb 18, 2020 at 07:35:47PM +0900, Chanwoo Choi wrote: > >> On 2/18/20 7:21 PM, Ladislav Michl wrote: > >>> On Tue, Feb 18, 2020 at 12:28:25PM +0900, Chanwoo Choi wrote: > >>>> On 2/17/20 10:38 PM, H. Nikolaus Schaller wrote: > >>>>> If the gpios are probed after this driver (e.g. if they > >>>>> come from an i2c expander) there is no need to print an > >>>>> error message. > >>>>> > >>>>> Signed-off-by: H. Nikolaus Schaller > >>>>> --- > >>>>> drivers/extcon/extcon-palmas.c | 8 ++++++-- > >>>>> 1 file changed, 6 insertions(+), 2 deletions(-) > >>>>> > >>>>> diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c > >>>>> index edc5016f46f1..cea58d0cb457 100644 > >>>>> --- a/drivers/extcon/extcon-palmas.c > >>>>> +++ b/drivers/extcon/extcon-palmas.c > >>>>> @@ -205,14 +205,18 @@ static int palmas_usb_probe(struct platform_device *pdev) > >>>>> > >>>>> palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id", > >>>>> GPIOD_IN); > >>>>> - if (IS_ERR(palmas_usb->id_gpiod)) { > >>>>> + if (PTR_ERR(palmas_usb->id_gpiod) == -EPROBE_DEFER) { > >>>>> + return -EPROBE_DEFER; > > > > Here we returned... > > hmm. you better to suggest the result of cocci script > to understand why it is matter. You can browse similar fixes online :) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=else+after+return Best regards, ladis