Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2388662ybl; Sat, 31 Aug 2019 13:56:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjv38lBLDVBGaMnGsI1c7Ve91B/YInkeropOEvjEgPvJh0yf+Q79DrqPE1OxGu8Lx3s7ja X-Received: by 2002:a17:902:ab96:: with SMTP id f22mr23199744plr.147.1567285002971; Sat, 31 Aug 2019 13:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567285002; cv=none; d=google.com; s=arc-20160816; b=jdWMRoO7U+BfGu4gJJ9idtyp5bPUY1is3PCTHmci5aLW6rc7Gjw5CUvr5c7UmKHjJS EKeFPP1R9zfFYPXSbFZm8xLTNUflHNRibRzWkFaGxo2JHRxNpg+D8drMV4XgBFrErGZe Lt4KmNIjAfWNd0uAtjdWSeHwgmf5CZ1tKqFYPDl3jyU8gPE7N0skgQcMujZIFtUCGvpv IeFUMCA5pzeJLVurQ/Adktf4zvWFYT5LJvHnd4e5yyM4OsvMg2aHcrExf3UP0Gm4Ryk7 cY/8k1I1ufLiLZowxtL6VgvtLWQNJvcnNa9UNH4Cf5axtCENjS7cE85CPwUICj2HI70m DrVg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iTsu+i5V+uOh4NWIxid/z2sWPR9ERFgbEIMqA93uhyQ=; b=r8jOUEI/c3STNoht0y3b/Niqd4oCJIvD4987XcUKa2Pwf3zlFW6Ne97AFu2CN7+brZ 1WBKaUZecAqtJD9pRIjcyRjkt4l/I2OKysEsvIChHM+mWtjdAu6hcDdPnebEAVQ2RYjV oquVoj7ho7JndZNd+WKe+biFEO4/WASuax+xaCpgoLEMWKLptj4WQsFvcMPOhKpWdQJl RONJ5SxNFIZyuyMyunYkseAQzZyfXxPsEuamc0zz+TDGiqe6dtR0cGNmfQ5Tvql8FdyG xkCArSq5rOPmNqCA+3RpxReMG5fTIi9o76V8RMUykcRFs04g311uRHkUIEaIArQMSlMO jJLQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si9792986pfq.258.2019.08.31.13.56.28; Sat, 31 Aug 2019 13:56:42 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728589AbfHaUzd (ORCPT + 99 others); Sat, 31 Aug 2019 16:55:33 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43163 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727538AbfHaUzd (ORCPT ); Sat, 31 Aug 2019 16:55:33 -0400 Received: by mail-pg1-f196.google.com with SMTP id u72so1082269pgb.10 for ; Sat, 31 Aug 2019 13:55:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=iTsu+i5V+uOh4NWIxid/z2sWPR9ERFgbEIMqA93uhyQ=; b=ZVf9AhTql7V2pCAEnGWITu2mOjRVxdCzHBR7IchamVIOG7NlDkNWuL9A4WB6UVhUnO qOIQwHzQx2tOyc5i9Berj6if4m0H5kjLofyR+CrrrpGuDldvhXqvBn79xy2Ebjl5pGat MlxRYfKmvEtfhZYkRfurhswBBaIyIkchVAxRdtVV4efg/aLmni9amCEIUuRnW8xcHT23 1sXYXggsF0uaF3Dgo3TIXOCO0sSJf6k8Ousge7GBVLed0UqKpCbsURyGalaZYiqQQR+I k4YLk2Uqe8U8RxKcI6tc554b92z/e2tID1sWmUehlwkcvZ9xCmmjDRlbU7g2DguCht7l oTsQ== X-Gm-Message-State: APjAAAWD50svlKXZfh/j21d/TAcjf6TYkA/3Ovr272hEucrVQLiiW/Yg 1m2dTy0jd0yCLuux2JBHbgRiZ9l+DUQ= X-Received: by 2002:a63:755e:: with SMTP id f30mr18700233pgn.246.1567284932358; Sat, 31 Aug 2019 13:55:32 -0700 (PDT) Received: from localhost ([2601:647:5b80:29f7:1bdd:d748:9a4e:8083]) by smtp.gmail.com with ESMTPSA id m9sm11120055pfh.84.2019.08.31.13.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Aug 2019 13:55:31 -0700 (PDT) Date: Sat, 31 Aug 2019 13:55:30 -0700 From: Moritz Fischer To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Moritz Fischer , linux-fpga@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH v6 14/57] fpga: Remove dev_err() usage after platform_get_irq() Message-ID: <20190831205530.GA24385@archbox> References: <20190730181557.90391-1-swboyd@chromium.org> <20190730181557.90391-15-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730181557.90391-15-swboyd@chromium.org> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 30, 2019 at 11:15:14AM -0700, 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. > > // > @@ > 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: Moritz Fischer > Cc: linux-fpga@vger.kernel.org > Cc: Greg Kroah-Hartman > Signed-off-by: Stephen Boyd > --- > > Please apply directly to subsystem trees > > drivers/fpga/zynq-fpga.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c > index 31ef38e38537..ee7765049607 100644 > --- a/drivers/fpga/zynq-fpga.c > +++ b/drivers/fpga/zynq-fpga.c > @@ -578,10 +578,8 @@ static int zynq_fpga_probe(struct platform_device *pdev) > init_completion(&priv->dma_done); > > priv->irq = platform_get_irq(pdev, 0); > - if (priv->irq < 0) { > - dev_err(dev, "No IRQ available\n"); > + if (priv->irq < 0) > return priv->irq; > - } > > priv->clk = devm_clk_get(dev, "ref_clk"); > if (IS_ERR(priv->clk)) { > -- > Sent by a computer through tubes > Applied to for-next. If all goes well I'll queue it for next PR.