Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5106106ybi; Tue, 30 Jul 2019 13:56:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6PpAf4TzNK/K8vygYQUmadxVEiLGMwuXQ2/QJKpfJGKC5lXRhetG2x5rXnIm7QUz7vpoQ X-Received: by 2002:a17:90a:30aa:: with SMTP id h39mr119505853pjb.32.1564520183246; Tue, 30 Jul 2019 13:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564520183; cv=none; d=google.com; s=arc-20160816; b=IZIb2EyNe/ms7HUImcPcocOeSK0aN6ZZSA1qvnbsfMrG9O3qGXHs6JLL95d64J5xWy VsQ2k+S1STn5FMVQGbPVMKN1bvW4Yu0bD+mdIHqIqMzBSa6G4+JT4MkyuYmO7bve0Z4V sSk5MGWSDBY288WSrXSQYHmGkRsJ9KAW5bO0CILOY4cMhF8toF+tNosG67v2S0fd91NB rqyOt4IHdZQTS375g3MOym2j+diOOk0whw5ytNM2EO7QEP0XfQvEURoXdCWTbOH0M2rR UQXRlwv3+VbWKLtl+KCytHuf6lgfMScRfJrXlDga0CfQwP65B8OMp7OL/bR+YLKTJdLm oKrQ== 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=fKD21YltjNdX0Gh4aRiK3v6esh13LM/jUbhsmCEcsM8=; b=UvtdPMC/HpIHwS0vQxetviEc/jprTKNi07cROY6kw7y2mow1mTADW/xjmBw/QAWEk6 RvOOSi5y5/a57D1KVHcHWlKhXecVvEorInOmuxLyOuFz+rWNSm0Z4DTjE664BdDTmUKF AHKiMjp/bpnwudS/N+SFS6dL3iWXIQueIEJ0lCPHsa99vsAaz9bkJtq9lPILn3Qi7DML /lPic4wnPHk45hCtswiq+o0rbbDbAfLDc1QAT1iz9giwynfXmY9wGUqTnRraYpIz+w+q fLV3BXbLAzyO18eHB9igvK/L48qAaHU7qvI+1x6qxtzUhQbAKaENuyCUOs30+qVK7j89 6quQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="c9/kS111"; 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 j74si30143273pje.12.2019.07.30.13.56.07; Tue, 30 Jul 2019 13:56:23 -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="c9/kS111"; 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 S1728573AbfG3SRG (ORCPT + 99 others); Tue, 30 Jul 2019 14:17:06 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43941 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388132AbfG3SQn (ORCPT ); Tue, 30 Jul 2019 14:16:43 -0400 Received: by mail-pg1-f195.google.com with SMTP id r22so2876955pgk.10 for ; Tue, 30 Jul 2019 11:16:42 -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=fKD21YltjNdX0Gh4aRiK3v6esh13LM/jUbhsmCEcsM8=; b=c9/kS111G3SGImYr1U5vCbj0hdX0U7JXwROeG49nc6dkg0afxl5NMuC6U0VYyvNoml IQ7k9VCSv8yu7OhA1vsV/1QXI1xTj1+8lh0VVirk0n2tUisVVdmz9ZNIWsz5X55idcjN hYzGHEpH+7gqW/uQVu/s2qHD1YFhx1L5qIWS0= 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=fKD21YltjNdX0Gh4aRiK3v6esh13LM/jUbhsmCEcsM8=; b=CKqyr31NsGbvdR/hshrqMUqcTXZ95LbiIle5XG6uSpMPhpjiJxyT/X1laHYAgbQd6g xmQZZoLhTCWOYWpiw+mly1WLqjbWN7uZevI3aMgvIlXVT6oFDA+lBA7AknEd7ungGrUD GFwXfJmO5wwoZ1+9rpeekLGLFHUJEBhgrWuqjHpsKg6vBR0iCMAOtrAfJUjsL8pHL8j4 EZfpEU6Porg8YihjvGP6nXjgQPpIl6VCXtvTrBVXc0a0H8iTz9aLhnO2cTZWf7fifmDU 7h7NIikoSDVRyg0xwLQTBt+M43xxDUTEcqNKxYAeqUwDBGAgDXzN6fArGTafRZvK/n/s UV1w== X-Gm-Message-State: APjAAAVwD+DWl5Hb68pAeJQoXI0LPGkM/IaVTH9Qre/a2eM6cvOfQDrU Xgz2RTuyh78ZVJJqW40nMHv6j6UpNC8eSg== X-Received: by 2002:a65:4844:: with SMTP id i4mr111825638pgs.113.1564510602339; Tue, 30 Jul 2019 11:16:42 -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.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:41 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Greg Kroah-Hartman , Enric Balletbo i Serra , Hans de Goede , "Darren Hart (VMware)" , Roman Kiryanov , Vadim Pasternak Subject: [PATCH v6 52/57] platform/x86: intel_pmc_ipc: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:52 -0700 Message-Id: <20190730181557.90391-53-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 Shevchenko Cc: Greg Kroah-Hartman Cc: Enric Balletbo i Serra Cc: Hans de Goede Cc: "Darren Hart (VMware)" Cc: Roman Kiryanov Cc: Vadim Pasternak Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- Please apply directly to subsystem trees drivers/platform/x86/intel_pmc_ipc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c index 55037ff258f8..5c1da2bb1435 100644 --- a/drivers/platform/x86/intel_pmc_ipc.c +++ b/drivers/platform/x86/intel_pmc_ipc.c @@ -936,10 +936,8 @@ static int ipc_plat_probe(struct platform_device *pdev) spin_lock_init(&ipcdev.gcr_lock); ipcdev.irq = platform_get_irq(pdev, 0); - if (ipcdev.irq < 0) { - dev_err(&pdev->dev, "Failed to get irq\n"); + if (ipcdev.irq < 0) return -EINVAL; - } ret = ipc_plat_get_res(pdev); if (ret) { -- Sent by a computer through tubes