Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5066723ybi; Tue, 30 Jul 2019 13:08:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/PelYnZJ6YOFVyZSugQ3AI+WqJQr1CzATTejCeR8dfrQ/6wFqaucXlcEcmYF8gRqOLOSn X-Received: by 2002:a17:902:ff05:: with SMTP id f5mr112973889plj.116.1564517294047; Tue, 30 Jul 2019 13:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564517294; cv=none; d=google.com; s=arc-20160816; b=EMFwTreQpy4r9wFQWP0jWAUcHRVBWzzRgpTru0W9OhpZQHYY5eIGLBhPEQnmMTDnmT svIE0zTsQWcVH4c4TAaAeegrF0kUPPJoWCFKkBemwypjecPqYG57Be+yBFZSmmT4OFHD k2z7XTFspH/E0j3rHS2Ho6Tgpa+qu6+pDk+RYZCkXGLSP9MG0eEUkGclk+p4x0u6roHu TPsxEsHQoBAg6X0+w27Y13+UQ6oXGC30ekqdt/wEpe1qXan5RgJ6xwpW1YRaR4++X5CW KZzTjqBzqMQn/Y7nunGDBiHJgLyNQPaYuLKEZQAwk3n0/gASVOaJ/s/zBJVl1ANYbzJ4 CnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pSxaD1cvDX0l0dBtzAMeJgIp940IH2B46uMy0iM1GB4=; b=MlO1NINBvhl4YM0g/N2Cppok4bUNAN8dk977EeMdr8YKROQUJ8ZyKMKoFrEuDK6A6A /IzWQbg9WC8O2uJ34S0FGUU8KAkYQAZIiNrzX2ygc5RXJn/Xw0QEMjej3ZdGfz0ZAPgQ QTMzmYvh0AVE2LupkJpJs1Vik7YuE7zho9PY0YS+kILHnIwinkVvpNqizdi7/h4iTRlV 0/SiGlzOMwv6rCkz+ze2bStZX667mfzzZjU5HgsSG5dqPrQLSe7neVpabVZ3lsBhDlKd YD2VuXiG32kI146Fp6ztFmCbyvfga+VOasYovcj082Gs8fmAZq+KE9AZhM7zVAAxHco0 m8ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dVuSDzML; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v136si30198124pfc.9.2019.07.30.13.07.58; Tue, 30 Jul 2019 13:08:14 -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; dkim=pass header.i=@chromium.org header.s=google header.b=dVuSDzML; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387935AbfG3SQV (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:21 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:35387 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728655AbfG3SQM (ORCPT ); Tue, 30 Jul 2019 14:16:12 -0400 Received: by mail-pg1-f193.google.com with SMTP id s1so24174646pgr.2 for ; Tue, 30 Jul 2019 11:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pSxaD1cvDX0l0dBtzAMeJgIp940IH2B46uMy0iM1GB4=; b=dVuSDzMLTviKBGZ53KKiOY0XqYsOyAgG25J621ZBW6qyaxu0WMuC8HeQIxZkmWGKhh /EdV7NmqaIEZRNmikoQx4MADMjjEpHXudU1KTzY2LyXQu5ugIjzuQeTcWX5PgXyiVUEo 4j3e25Qx8a+r6/FIMt2T10YU0KCfd/Gw/6R84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pSxaD1cvDX0l0dBtzAMeJgIp940IH2B46uMy0iM1GB4=; b=PGnUncN3jvZh2vQ7REGCt1MgiPlmKR6Xbz83naE6ZY7OoL4YEq7qJ6SjkZPyeNArIH LYTh8Rhoj8wnZNUi1cAWNwiWAU7LTmQmpD95kAINqdOmqBFkJEBxjUz7mzmc/dDE+yC6 0FYYYkklFG+TJg08nPU4ZX4+XdWKLHGmtIhH7gDIgDyORIOfeRUYD0EHrGB/euw3cQ/K UIXoTv8fjr3/jJ+ViPlPATtFEl0GWyaHYPjJ5VErx/RUqrHfV/EK/hJaNzMOzmQvc02t VsfvHKi6Ika6henQ32r0rB4IwnirnbtvwA0P0oPfhbrY4D/pojFhBLChm7moEPBbPudj LVhw== X-Gm-Message-State: APjAAAXO0VvWnbj343Zrre2DXvHTPMO6M4zWy3wkoKwD44C/8EcDno7p yZ7hyaGzEzU5QFA7B1MgGmyc0SEPNlE= X-Received: by 2002:a62:1bd1:: with SMTP id b200mr42338409pfb.210.1564510571326; Tue, 30 Jul 2019 11:16:11 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:1:fa53:7765:582b:82b9]) by smtp.gmail.com with ESMTPSA id g1sm106744083pgg.27.2019.07.30.11.16.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:10 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Moritz Fischer , linux-fpga@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH v6 14/57] fpga: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:14 -0700 Message-Id: <20190730181557.90391-15-swboyd@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190730181557.90391-1-swboyd@chromium.org> References: <20190730181557.90391-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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