Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5068682ybi; Tue, 30 Jul 2019 13:10:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHqIelbDfp6tstcBMKOGCjI7mQxqqaxYYURjWwfFEfndokccfS2ZrZkeaafvlyftaxxZBN X-Received: by 2002:a63:4c12:: with SMTP id z18mr8160863pga.229.1564517412429; Tue, 30 Jul 2019 13:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564517412; cv=none; d=google.com; s=arc-20160816; b=sBLn6GgR+AU2Cy5UKXuml+9/JEkLV+50Bs8StF/C6K4ltef/XAOIcNKeE6VTTV/U5y ea9/2DBdzG6rVKlkofveX3v0wavBuFn5ae2SS+A7vYh43elywiJ9AjFEIuPthDHGBBlq WWDtZofkT2QdWNjY5W3DfhF/7STQBK8rO5K2vjuIxI9+UCw3x9hmAle+e64bkMa8SZuo qxsei4UbODLUQSuev7jy8FmoldppSREJqUknf42MAdSC7a0QdRnrg9X8ktx1Y6lsxrnt hboendA1E6eVi+dPFsbh1NzXDAG/54d8PtTPW2dLVR0eeDlHO34+HZQXOG5XhWCknOSU fvhA== 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=kIrb+9QaGrA4CxQXfjzh8R8nezV9TE3Cr6X1Du3E37A=; b=098u8yGvkgaUISWLS9awa9vEuuLlpI8RpD2s3XSWkMmBIIRXoziJVWsrov7y8rfkry Jw1Fr7z+a6zhQi7xjW7zJGPTg9/X6LqWW1+Sfc3yWBDcknD0EP7KrVgc4BxFR4BTBvNp 9bueBa5i0DZUsxkcJOtJi5Bu413tJ37dbJdGeYdrs9qm/k1c3poC9VaasVdu0w+ebGbU OMWXSdmnjy5JdMkNIFMmjo2pseYCjUCZi0xUknirEPLSe4M2z0egQbNLdYM4IXuC01VV +3mDjU9nwWjFS7FrqdsuMsG/vzcMzRfXGOqEj78YamqPW68zWACU8v9igN7HeGNRhHuv W1gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bBO1J5JP; 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.09.57; Tue, 30 Jul 2019 13:10:12 -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=bBO1J5JP; 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 S2388052AbfG3SQc (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:32 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:38223 "EHLO mail-pg1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387938AbfG3SQV (ORCPT ); Tue, 30 Jul 2019 14:16:21 -0400 Received: by mail-pg1-f170.google.com with SMTP id f5so21657456pgu.5 for ; Tue, 30 Jul 2019 11:16:21 -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=kIrb+9QaGrA4CxQXfjzh8R8nezV9TE3Cr6X1Du3E37A=; b=bBO1J5JP+T89dQ/AK5V/4pokKB9uzaFyrwa96E1/SbzrfJTzO4Y3yUjeEqgJIN0WUw JRU0KK+nKZEkJk6q1EFJSMyazZJYZXlfevGzM35kDazcNK0+LeZzSGRq4Gx6Qn9YLbZT BfqXsfy7fKDgwkMX2KVusmK2TSONRi9xdXNks= 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=kIrb+9QaGrA4CxQXfjzh8R8nezV9TE3Cr6X1Du3E37A=; b=VyUcyzfjmSMD3UGwybXNd1r3K01BcrF3j1ZUTZfti9HfLHzFRnm4x7sBgrdoHtQeQY DmHFQ3J3kFt5XnxmOCCMiL5CyESDh2Redh/PR2hP7r/d5sDC6q7OEEoaZPY42rVz9fan BTSfYjOi8+jqom+Q+BlJltxaXXapwxdUX9nscP2E/ZFv28JOTgqAp1sDTzRLDV9P84HN zIKqtvGVJuzAjVkdKQ1TVBgAIvVCCn234Mb8yzy8mESEZt1SWN0eblaZQt9NAJnAL6kM B+JoYf57mxxCyNCDI/4+pRxQHlsyq5lrFtY3w1xu/pVekjZGioBTV1qXN/On2z2AhzUJ 3BTw== X-Gm-Message-State: APjAAAWnWlylsqrMJre73QFUwobrKkGuk96pQfocRjK9wQz1CSZ+XrtS xQw29SNgOXqgex6SfxNcUhnv94BbNU8= X-Received: by 2002:a63:7d49:: with SMTP id m9mr102025210pgn.161.1564510580676; Tue, 30 Jul 2019 11:16:20 -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.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:20 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Dmitry Osipenko , Thierry Reding , Greg Kroah-Hartman , Joerg Roedel , Markus Mayer , Thomas Gleixner , Masahiro Yamada , Paul Cercueil Subject: [PATCH v6 26/57] memory: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:26 -0700 Message-Id: <20190730181557.90391-27-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: Dmitry Osipenko Cc: Thierry Reding Cc: Greg Kroah-Hartman Cc: Joerg Roedel Cc: Markus Mayer Cc: Thomas Gleixner Cc: Masahiro Yamada Cc: Paul Cercueil Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- Please apply directly to subsystem trees drivers/memory/emif.c | 5 +---- drivers/memory/tegra/mc.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 402c6bc8e621..f021687ecc5c 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1563,11 +1563,8 @@ static int __init_or_module emif_probe(struct platform_device *pdev) goto error; irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(emif->dev, "%s: error getting IRQ resource - %d\n", - __func__, irq); + if (irq < 0) goto error; - } emif_onetime_settings(emif); emif_debugfs_init(emif); diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index 3d8d322511c5..851983c67fc1 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -677,10 +677,8 @@ static int tegra_mc_probe(struct platform_device *pdev) } mc->irq = platform_get_irq(pdev, 0); - if (mc->irq < 0) { - dev_err(&pdev->dev, "interrupt not specified\n"); + if (mc->irq < 0) return mc->irq; - } WARN(!mc->soc->client_id_mask, "missing client ID mask for this SoC\n"); -- Sent by a computer through tubes