Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5099596ybi; Tue, 30 Jul 2019 13:47:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/rs1+qCakMeR3RJs9qnndefgKMZ7O+IfYI8elC6TWsjhyEKO7U73+LrnnI1052i84McIf X-Received: by 2002:a17:90a:2768:: with SMTP id o95mr118394793pje.37.1564519636188; Tue, 30 Jul 2019 13:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564519636; cv=none; d=google.com; s=arc-20160816; b=LvohK9Vg0+iHvQOrXt6hk2B15vFcQAHU0cRJxq6pogvSF70W5pWgEt99P6NH0rDmJm CXaYv9cKk8cfYiaCWn4sAK4WqxBwVuP6Xq2vvDBV+QDgKAHccNbHWhPzlMWqUFMQi+ue rLfErhG0pQPn6Ehehq5czd9UF+5bOGihOMcCZxjVKuliayeGP+8tJqADxuNQEBgHkgDl ZWwXIETcouwGEIunilElZS3TnXjUCyj8u18UyEZUnwY/x6uM6YeEKXQf5caTSt+cdYgB z0nz7C9bxLpGDyJeZ9nkxbSxyiXMmNoc4GefsnAmEkqX3xeqIrPVkLuAXWrgrDMp+cqS YfKA== 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=50VWY4DOvJCsLbogXvcfIy87Phisvb7R/qkulHRQtQE=; b=xAl5yENpRTK3Y3uUCc6UZaOSc/QOUtFftZ+hEg0hBYQT8QbPlpGMHep/fkj+iLzCuS t8BgnbIvnXX5stxCt/vaHrT1ZkBGu9eKNjvupfSj/ywGMu3MpvPHE1ik0imKJxylWymf 4WP8rfBua+CBbfhb7LSTZGThaDL9yiYkwz6do1eCNxdTk/kVyF3kSuo6l1Y/3RLggnNF kq4tLQIJPSl5/WyvmQJqd6FxDRStcUGnHYOFAcW/2MzDOPEJmHCKhn3zlB9dUa6H88C/ h7B/+4LMsBosv6Thpfb6MveiLZkv9fL+J74VYy4T7L7pukrvHn7jCmnXwWdrmgnMoEH/ KCMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=b3mg+KDm; 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 u17si31227615pfc.210.2019.07.30.13.47.00; Tue, 30 Jul 2019 13:47:16 -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=b3mg+KDm; 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 S1728835AbfG3SQH (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:07 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33196 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728743AbfG3SQG (ORCPT ); Tue, 30 Jul 2019 14:16:06 -0400 Received: by mail-pf1-f194.google.com with SMTP id g2so30264694pfq.0 for ; Tue, 30 Jul 2019 11:16:06 -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=50VWY4DOvJCsLbogXvcfIy87Phisvb7R/qkulHRQtQE=; b=b3mg+KDmpIO81yQrcZUSpzOusHXsPRu2YTZBtorn1AEo3N6GiptcooL6U8tMTo+gTG lIYB8l6l6OrtiBRTPCwwVeU7F0QlclDCDwnUbiuFLyyK+81JVEa7Lq5TKHvVQ610YkBF neATcqsL6f5giH+IoqxpKjFEtws9P29MaAOJY= 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=50VWY4DOvJCsLbogXvcfIy87Phisvb7R/qkulHRQtQE=; b=Ne0omnCWVcG5E5rvd4rFGCEuKIdfR7k3WnjTXMTQoWbUDmXUJvG3L8xnufOoKlyEDI iYtz5UaynnUHWNhbIT8zQ3Q1AQdfDBG/dofIcoxsKKj2rx6bJJiZlRI1SZtcjitz6CJm w1nRVpRIfBq2LJmrVvht4OyUGiPIwLt1CGsFbrLlalJFFsXmI+y4fXSMih7j66nuL8To DhHj/b7zMIJIz2o5452Q0aaCxehce+lsNrFIATSHQuHPvTO4Di1MWqmAmzO2Py6D2647 l+8hJPfv/bVXnZZ4AbCM0A1xbuPwoZbUKKbxVMJnMSV4/7iaYyZKlkQZidgWOIV5WPnO cUUg== X-Gm-Message-State: APjAAAV2NRxXpZWsSl0XglqPoDK9H4K42g0+tg5LL7LCS9dOPZD2C7Ik IVG6Q+XNJKecUv3A53GlJAmCxnFRzzM= X-Received: by 2002:a65:64c6:: with SMTP id t6mr112287304pgv.323.1564510565436; Tue, 30 Jul 2019 11:16:05 -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.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:05 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Russell King , Shawn Guo , Tony Lindgren , Maxime Ripard , Simon Horman , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman Subject: [PATCH v6 07/57] ARM: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:07 -0700 Message-Id: <20190730181557.90391-8-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: Russell King Cc: Shawn Guo Cc: Tony Lindgren Cc: Maxime Ripard Cc: Simon Horman Cc: Chen-Yu Tsai Cc: linux-arm-kernel@lists.infradead.org Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- Please apply directly to subsystem trees arch/arm/plat-omap/dma.c | 1 - arch/arm/plat-pxa/ssp.c | 5 ++--- arch/arm/plat-samsung/adc.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 79f43acf9acb..9386b2e9b332 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1371,7 +1371,6 @@ static int omap_system_dma_probe(struct platform_device *pdev) strcpy(irq_name, "0"); dma_irq = platform_get_irq_byname(pdev, irq_name); if (dma_irq < 0) { - dev_err(&pdev->dev, "failed: request IRQ %d", dma_irq); ret = dma_irq; goto exit_dma_lch_fail; } diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index 9a6e4923bd69..88b5dd99f6bc 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c @@ -146,10 +146,9 @@ static int pxa_ssp_probe(struct platform_device *pdev) } ssp->irq = platform_get_irq(pdev, 0); - if (ssp->irq < 0) { - dev_err(dev, "no IRQ resource defined\n"); + if (ssp->irq < 0) return -ENODEV; - } + if (dev->of_node) { const struct of_device_id *id = diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index ee3d5c989a76..4bbeca3cbd9e 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c @@ -354,10 +354,8 @@ static int s3c_adc_probe(struct platform_device *pdev) } adc->irq = platform_get_irq(pdev, 1); - if (adc->irq <= 0) { - dev_err(dev, "failed to get adc irq\n"); + if (adc->irq <= 0) return -ENOENT; - } ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev), adc); -- Sent by a computer through tubes