Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5102013ybi; Tue, 30 Jul 2019 13:50:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc36gmtPSaZeJ24IX/2DxqxqIvHfVeCbBzl51DBHnuiTtWzQhiXqY4va7+Xn5Zol5blaW9 X-Received: by 2002:a17:902:7283:: with SMTP id d3mr27256634pll.93.1564519847734; Tue, 30 Jul 2019 13:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564519847; cv=none; d=google.com; s=arc-20160816; b=RuBdF/N6GXaNHYGII9FLvQ2lHiUq79DqVJt+bxZcMHT4QJdGCZqBYPeWPZksYnbxt9 pejbRzPXttkbhBC34MXnkCAJjBjXxleeQ5iT3fwkyjvmCgiaDrVlpkJWmoWOCZl9GkwK p2DQjsrgywkJQFgXoxryhj8PL1+R6fpoRkA646yARsfriQDnlxkGccS0kY6j8TPBQAOk ISoHIFtKSIFW86qCLf4BzS7TbRBpjAKFEc/o+TaCE9rFdhrz+7Yrk49d8LDmdHAuoUbt dnZuA2/DfGR75v3W5AuqCAYT5jrZjnOOa6HfsVpAfMJzeROb5Fcp4z9hB1gB4rUyMq+2 oyaA== 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=4L2lN0Z8KU32HMJkge7a1wqVzJB6Zb60x3LXU/IaFuw=; b=GXgcjhxOf79nvU/9mTBEY1irbHn0ZFtMvbjG3hBwHpIV4CO9R/+26dpTHkQaDtIWSI sooRlvpseiM8C+kVGDPDjyOqNFv4cEh7eQ8nRqPKnU5URpcK54xro4QQLNNAFKduPMdW GJLQbSozSxqKUbQSTmPysuYuh2C7ReTSdosar4UlpePvHQOtXuIspYMzqL9IGgJcNd4Q Iz80cdR+F64n3uZ7/Gr2tUZSSMsRibdCNKMvP6x5dlJSb7VFpxmGM7BZtR2Ma/ReEfHg Zvzp3JgrkjH50Dc0FJxJVoOjcpsg0BDRVvWEMHxh4CSGpMvoBkNoFQMohBjOpWB33HWC qEfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oMDp9F2O; 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 ay3si28273517plb.174.2019.07.30.13.50.31; Tue, 30 Jul 2019 13:50:47 -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=oMDp9F2O; 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 S2388125AbfG3SQm (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:42 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33566 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388055AbfG3SQd (ORCPT ); Tue, 30 Jul 2019 14:16:33 -0400 Received: by mail-pg1-f194.google.com with SMTP id f20so21249012pgj.0 for ; Tue, 30 Jul 2019 11:16:32 -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=4L2lN0Z8KU32HMJkge7a1wqVzJB6Zb60x3LXU/IaFuw=; b=oMDp9F2OSRSbdCFkpJrPXgB4cSABEJoE/I65hGF2l4oq53a246hQl8ONKAPtn3adb4 YMsBYqpJuLa9/3WWS+T9XZuntADnvjhy7VR/y8zxoFARDFHDnaSeMdeAxhzqNFXSGkTB EL9TONSClWnsgoFi7X8uOCMsNK+PvRElWHBlc= 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=4L2lN0Z8KU32HMJkge7a1wqVzJB6Zb60x3LXU/IaFuw=; b=CTK+Ic4c7iMbHrIW43mbZeFD6qmjhqYMC/mU79U0WnHj0A2hAJAnwa9dsYJEeU84z3 HenTyYAM9wK61yVdjeJk+FVwvrCNrPqH6SHPOYp0XzrmG0Ky4ngNDSk7u19giNCyF5kg RGBhGH1WAwOjt+WRHOFHCHn2q47Vwj6M5VUjSxksJ+emg7DNJlO7SluoNFICkDvVnwTc qN0X9PihdigGu7Oc8RLHDrugO0RpNfTh7opuv7WGm/Pkhg1VuBIjr5Fa54GefKebEeaD 73r44oiGhkJS8CXutBVTG133WlJdHsDwojyMa3/H9E5gGo0//PhbkK1Gd/POyv7r0cYA O7Ww== X-Gm-Message-State: APjAAAUN4NYIz4IfutjgIcc9ezEXNVZQgUHblBvs/K69PHCat0IXgDef 8anR3lmLylq5WEyLpe9RGykPNU2b2+V5vA== X-Received: by 2002:a62:e315:: with SMTP id g21mr44397321pfh.225.1564510591912; Tue, 30 Jul 2019 11:16:31 -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.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:31 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Andy Gross , Thierry Reding , Bjorn Andersson , Li Yang , Simon Horman , Greg Kroah-Hartman Subject: [PATCH v6 40/57] soc: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:40 -0700 Message-Id: <20190730181557.90391-41-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: Andy Gross Cc: Thierry Reding Cc: Bjorn Andersson Cc: Li Yang Cc: Simon Horman Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- Please apply directly to subsystem trees drivers/soc/fsl/qbman/bman_portal.c | 4 +--- drivers/soc/fsl/qbman/qman_portal.c | 4 +--- drivers/soc/qcom/smp2p.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/soc/fsl/qbman/bman_portal.c b/drivers/soc/fsl/qbman/bman_portal.c index cf4f10d6f590..e4ef35abb508 100644 --- a/drivers/soc/fsl/qbman/bman_portal.c +++ b/drivers/soc/fsl/qbman/bman_portal.c @@ -135,10 +135,8 @@ static int bman_portal_probe(struct platform_device *pdev) pcfg->cpu = -1; irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(dev, "Can't get %pOF IRQ'\n", node); + if (irq <= 0) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start, diff --git a/drivers/soc/fsl/qbman/qman_portal.c b/drivers/soc/fsl/qbman/qman_portal.c index e2186b681d87..991c35a72e00 100644 --- a/drivers/soc/fsl/qbman/qman_portal.c +++ b/drivers/soc/fsl/qbman/qman_portal.c @@ -275,10 +275,8 @@ static int qman_portal_probe(struct platform_device *pdev) pcfg->channel = val; pcfg->cpu = -1; irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(dev, "Can't get %pOF IRQ\n", node); + if (irq <= 0) goto err_ioremap1; - } pcfg->irq = irq; pcfg->addr_virt_ce = memremap(addr_phys[0]->start, diff --git a/drivers/soc/qcom/smp2p.c b/drivers/soc/qcom/smp2p.c index c7300d54e444..07183d731d74 100644 --- a/drivers/soc/qcom/smp2p.c +++ b/drivers/soc/qcom/smp2p.c @@ -474,10 +474,8 @@ static int qcom_smp2p_probe(struct platform_device *pdev) goto report_read_failure; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(&pdev->dev, "unable to acquire smp2p interrupt\n"); + if (irq < 0) return irq; - } smp2p->mbox_client.dev = &pdev->dev; smp2p->mbox_client.knows_txdone = true; -- Sent by a computer through tubes