Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18493197ybl; Fri, 3 Jan 2020 03:30:14 -0800 (PST) X-Google-Smtp-Source: APXvYqxkuIzRrsAn8UC/det6U16VUzVCJXbDPVC2N+TE0pRGCc2QdQ9eeAhzBW04WcLrY0CT15Fu X-Received: by 2002:a9d:588c:: with SMTP id x12mr94764832otg.2.1578051014689; Fri, 03 Jan 2020 03:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578051014; cv=none; d=google.com; s=arc-20160816; b=xc6tdCMPuvGbyTsNXPxuLd+Y78hmH9zkw/SIIzQuKZVgdOImozJlMV7hEvIJ2O6t5c FmhjUFYhrlQY64g/E7mOxDY8ga2YMd8l6zEZXd8CvtwsrJbbmKavXhOv00VSl7NSLkZV phuinIb4vrls5ToE2967W2frrlBdNfOy+b0/CXJSjntWFLrf2A3iKENQGnn/XoCIZL7P 7qpVoSVC1XGXqpOP2qy0Hf5O793RegyQnt2xJqRQTdyF1JplEoe/7Ae4dkIUnsUtOCSS 2j0l0XW3uk2b+mayznrrXGJE4CBeUmR86o+5mA3x6EkZlR38Yw1Gjy6VwjiDXN2DDzw+ 7RZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=am8YhLIAmvCg+DCVx15rfPBNjQlNGbRxSRmJOWIfPqA=; b=CfEigomkpCJWSfcOMwjCbhd3ShCBJPkqsSF+z+dQMzdNRtVSNR0FWv6lZIvXr/saZq kMn5KZTNBZN01GmbEWJhFpIxdoygWXT3uFAvFLZ2TncOL6Yu/3MmKxu5fP2OAdJ5VHQX l4yVkS3q2t3VSeE5Rxuacx2qkHpI2ketEQZsJkUwqK4WExmud/9MM/oDXTi3dOp3L8+v 3aKe1uxJNwo8NmN67+B7xVK3wZ7rE3ujAgGq6cDcRHfSxLZEzKd6ECVEZlLbELTLYo3S bWpJtv1LvS0q3VDr7Mhs+ASxojOUDBYQx7JGvOeH9z1rhZtz/q++ENblm1cQWSEnPMMO JF/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=p9jSuphV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si31152788oti.47.2020.01.03.03.30.02; Fri, 03 Jan 2020 03:30:14 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=p9jSuphV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727571AbgACL3K (ORCPT + 99 others); Fri, 3 Jan 2020 06:29:10 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:47747 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727453AbgACL3K (ORCPT ); Fri, 3 Jan 2020 06:29:10 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200103112908euoutp0137a08b208e466c865706d060599ca069~mXPn7xOgs0109601096euoutp012 for ; Fri, 3 Jan 2020 11:29:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200103112908euoutp0137a08b208e466c865706d060599ca069~mXPn7xOgs0109601096euoutp012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1578050948; bh=am8YhLIAmvCg+DCVx15rfPBNjQlNGbRxSRmJOWIfPqA=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=p9jSuphVLinln3fYTCsZuplo1gUL/0ZgkzDc23YTSS8hj6Triub4w1x5EKdZCkD5Q Q5NalnkQpn/ECeEplVDnlnBRl9304a3NDRAooSWdKpGoHRYZU7gH+1gTrekkNgrr/T qcHGaaNHNsml2l/IsBKxffUsnjGsBJ/HHtu/uzUM= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200103112908eucas1p12c154fecd493b8a09259e6bf983e8a2f~mXPn0nsqJ2519525195eucas1p1Z; Fri, 3 Jan 2020 11:29:08 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id F9.C2.60679.3852F0E5; Fri, 3 Jan 2020 11:29:07 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200103112907eucas1p188fb06f73886f73aadc49d5411ab9269~mXPniM9Sz2395423954eucas1p1W; Fri, 3 Jan 2020 11:29:07 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200103112907eusmtrp27883519da0894befd1f5f1c05c51a3e8~mXPnhAaJp2970329703eusmtrp2P; Fri, 3 Jan 2020 11:29:07 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-73-5e0f25838d0f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5B.A0.08375.3852F0E5; Fri, 3 Jan 2020 11:29:07 +0000 (GMT) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200103112907eusmtip1e2d8eb1389728a13df5b5ee81b77cae8~mXPnLbAr70358403584eusmtip1l; Fri, 3 Jan 2020 11:29:07 +0000 (GMT) Subject: Re: [PATCH v6 47/57] video: Remove dev_err() usage after platform_get_irq() To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Greg Kroah-Hartman From: Bartlomiej Zolnierkiewicz Message-ID: <467ee450-e6de-e517-b8d9-7048c14a1931@samsung.com> Date: Fri, 3 Jan 2020 12:29:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190730181557.90391-48-swboyd@chromium.org> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLKsWRmVeSWpSXmKPExsWy7djPc7rNqvxxBt3HbSyufH3PZtG8eD2b xYm+D6wWl3fNYbM4fucpkwOrx+yGiywe++euYfe4332cyePzJrkAligum5TUnMyy1CJ9uwSu jD8LV7MUbNevuD3nI1sD4ya1LkZODgkBE4kd7YvZuhi5OIQEVjBKNBzewQrhfGGUOLZ0HZTz mVGi6eY3dpiW/R/Xs0AkljNKzNp4Bcp5yyjR0fuFBaRKWCBM4uLaBWAdIgJqErM/HGcCKWIW mMgosX7ZV1aQBJuAlcTE9lWMIDavgJ3EwZ4LbCA2i4CKxJpFa8FqRAUiJD49OMwKUSMocXLm E7AFnEC9+yYfBOtlFhCXuPVkPhOELS+x/e0cZohTF7FLrNjvA2G7SKx6dowJwhaWeHV8C9Q7 MhL/d84HO05CYB2jxN+OF8wQznZGieWT/7FBVFlL3Dn3C8jmANqgKbF+lz5E2FFiWuMlsLCE AJ/EjbeCEDfwSUzaNp0ZIswr0dEmBFGtJrFh2QY2mLVdO1cyT2BUmoXks1lIvpmF5JtZCHsX MLKsYhRP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Ukn5 ce6G1M3m6q9ZDJacnOmK8Y9S9vzvszhW0s7kybBH7emun0+kJDgfJc7TKnWYdD77Z1pq2E/W XearTBjU/6cwF654GHTr1CbGXUd9925Vu+gnryyw4gnP5GOdN9qUWIozEg21mIuKEwHRgph3 wgIAAA== X-CMS-MailID: 20200103112907eucas1p188fb06f73886f73aadc49d5411ab9269 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190730181641epcas3p26b5bd99f64726e7d110e20f1b673efeb X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190730181641epcas3p26b5bd99f64726e7d110e20f1b673efeb References: <20190730181557.90391-1-swboyd@chromium.org> <20190730181557.90391-48-swboyd@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Sorry for the late reply. On 7/30/19 8:15 PM, Stephen Boyd wrote: > We don't need dev_err() messages when platform_get_irq() fails now that > platform_get_irq() prints an error message itself when something goes > wrong. Let's remove these prints with a simple semantic patch. This patch changes handling of -EPROBE_DEFER in the modified drivers (most don't support it and error message will no longer be printed). I cannot apply it as it is (seems that -EPROBE_DEFER handling should be audited/fixed in the affected drivers first). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > // > @@ > expression ret; > struct platform_device *E; > @@ > > ret = > ( > platform_get_irq(E, ...) > | > platform_get_irq_byname(E, ...) > ); > > if ( \( ret < 0 \| ret <= 0 \) ) > { > ( > -if (ret != -EPROBE_DEFER) > -{ ... > -dev_err(...); > -... } > | > ... > -dev_err(...); > ) > ... > } > // > > While we're here, remove braces on if statements that only have one > statement (manually). > > Cc: Bartlomiej Zolnierkiewicz > Cc: dri-devel@lists.freedesktop.org > Cc: linux-fbdev@vger.kernel.org > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > > Please apply directly to subsystem trees > > drivers/video/fbdev/atmel_lcdfb.c | 1 - > drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 1 - > drivers/video/fbdev/nuc900fb.c | 4 +--- > drivers/video/fbdev/pxa168fb.c | 4 +--- > drivers/video/fbdev/pxa3xx-gcu.c | 4 +--- > drivers/video/fbdev/pxafb.c | 1 - > drivers/video/fbdev/s3c2410fb.c | 4 +--- > drivers/video/fbdev/vt8500lcdfb.c | 1 - > 8 files changed, 4 insertions(+), 16 deletions(-) > > diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c > index 5ff8e0320d95..4a16354d65c8 100644 > --- a/drivers/video/fbdev/atmel_lcdfb.c > +++ b/drivers/video/fbdev/atmel_lcdfb.c > @@ -1114,7 +1114,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) > > sinfo->irq_base = platform_get_irq(pdev, 0); > if (sinfo->irq_base < 0) { > - dev_err(dev, "unable to get irq\n"); > ret = sinfo->irq_base; > goto stop_clk; > } > diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c > index 17174cd7a5bb..d6124976139b 100644 > --- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c > +++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c > @@ -447,7 +447,6 @@ static int mmphw_probe(struct platform_device *pdev) > > irq = platform_get_irq(pdev, 0); > if (irq < 0) { > - dev_err(&pdev->dev, "%s: no IRQ defined\n", __func__); > ret = -ENOENT; > goto failed; > } > diff --git a/drivers/video/fbdev/nuc900fb.c b/drivers/video/fbdev/nuc900fb.c > index 4fd851598584..c4606c734f44 100644 > --- a/drivers/video/fbdev/nuc900fb.c > +++ b/drivers/video/fbdev/nuc900fb.c > @@ -526,10 +526,8 @@ static int nuc900fb_probe(struct platform_device *pdev) > display = mach_info->displays + mach_info->default_display; > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "no irq for device\n"); > + if (irq < 0) > return -ENOENT; > - } > > fbinfo = framebuffer_alloc(sizeof(struct nuc900fb_info), &pdev->dev); > if (!fbinfo) > diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c > index 1410f476e135..d9e5258503f0 100644 > --- a/drivers/video/fbdev/pxa168fb.c > +++ b/drivers/video/fbdev/pxa168fb.c > @@ -625,10 +625,8 @@ static int pxa168fb_probe(struct platform_device *pdev) > } > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "no IRQ defined\n"); > + if (irq < 0) > return -ENOENT; > - } > > info = framebuffer_alloc(sizeof(struct pxa168fb_info), &pdev->dev); > if (info == NULL) { > diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c > index 74ffb446e00c..07414d43cb3f 100644 > --- a/drivers/video/fbdev/pxa3xx-gcu.c > +++ b/drivers/video/fbdev/pxa3xx-gcu.c > @@ -614,10 +614,8 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev) > > /* request the IRQ */ > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(dev, "no IRQ defined: %d\n", irq); > + if (irq < 0) > return irq; > - } > > ret = devm_request_irq(dev, irq, pxa3xx_gcu_handle_irq, > 0, DRV_NAME, priv); > diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c > index 4282cb117b92..b44f402ce552 100644 > --- a/drivers/video/fbdev/pxafb.c > +++ b/drivers/video/fbdev/pxafb.c > @@ -2353,7 +2353,6 @@ static int pxafb_probe(struct platform_device *dev) > > irq = platform_get_irq(dev, 0); > if (irq < 0) { > - dev_err(&dev->dev, "no IRQ defined\n"); > ret = -ENODEV; > goto failed_free_mem; > } > diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c > index a702da89910b..2a846fd5da2a 100644 > --- a/drivers/video/fbdev/s3c2410fb.c > +++ b/drivers/video/fbdev/s3c2410fb.c > @@ -849,10 +849,8 @@ static int s3c24xxfb_probe(struct platform_device *pdev, > display = mach_info->displays + mach_info->default_display; > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) { > - dev_err(&pdev->dev, "no irq for device\n"); > + if (irq < 0) > return -ENOENT; > - } > > fbinfo = framebuffer_alloc(sizeof(struct s3c2410fb_info), &pdev->dev); > if (!fbinfo) > diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c > index be8d9702cbb2..a10088e1cdb0 100644 > --- a/drivers/video/fbdev/vt8500lcdfb.c > +++ b/drivers/video/fbdev/vt8500lcdfb.c > @@ -372,7 +372,6 @@ static int vt8500lcd_probe(struct platform_device *pdev) > > irq = platform_get_irq(pdev, 0); > if (irq < 0) { > - dev_err(&pdev->dev, "no IRQ defined\n"); > ret = -ENODEV; > goto failed_free_palette; > }