Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5064212ybi; Tue, 30 Jul 2019 13:05:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/+sBqMK84oXnDCbYfZz7+mex86FAalKtF8ZVqmp2lAwV0hrcO33qQwX34Vg1hOri9LXjm X-Received: by 2002:a17:902:204:: with SMTP id 4mr30284014plc.178.1564517148647; Tue, 30 Jul 2019 13:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564517148; cv=none; d=google.com; s=arc-20160816; b=Cz2w3tK2rp74j2tnA698YWlz8Zxxr2a4N81Q9oWYgKbPt23/iL5xJSUPTWjh7UO5// Pb3AJlMr0rlYQW7d3HDWDKRrmf96W6Ew4PjECGwGtuJ1iJeydxeRrWG5touetlz4T9j5 b3fXuIVRqQCFpLWO83v4N+pzbPYM5TtnBqEtLJZUyhH+c8Bt91SAH1/Cr+1OLIO9mJ63 M9Wvw9r8I3kJ0m9nk9i889u2AzcHF/lVB8memGtrLgAoTo9gVH1WwymIH/9/hSkSKNj4 wuyzVpPRcfRyul+skU9CofPmEFQ28kFggP7Ucu3WPJb4FVL0cfVR4vV/W+qRI2Ssy9i/ SA7Q== 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=LxEPX0Crt+HozwMckgTER6BzS7Gj7DRj6+re4zZk/6c=; b=I/HLMhgnos4gf2PUH8e5c+g9r+X1l7IqWhrYd9wJV8SyHNFw9CDBwRKXd29p2SQ07O QTn3qdMJgXDzKOCXhGrOKaucH4N60g14iiU1ngYDo3kimBcfQpBFjvK065fNA1KWFG6N +3cTRHZRE092I+jp7coRyosh3ru/8+d1Qe7lHheR5zcF4+RszdAVS2zOxZbtuaRGjcoQ IOy2+/8AoI+yu7wzrlrG4eBS1+jM8B0lr7dyAR0WPNtnUDHFWLR9ZSt5lEIumcwMslqg hB+oDAoMGjy2m0YG5qijNkObdk1ck+h+HX2mIb9uZ7TfUUZ6iwI6XVvzW6pjMDmpf8C3 +vPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GVGjSJLr; 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 x8si9435510plr.252.2019.07.30.13.05.33; Tue, 30 Jul 2019 13:05:48 -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=GVGjSJLr; 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 S2387915AbfG3SQS (ORCPT + 99 others); Tue, 30 Jul 2019 14:16:18 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41948 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727512AbfG3SQK (ORCPT ); Tue, 30 Jul 2019 14:16:10 -0400 Received: by mail-pf1-f193.google.com with SMTP id m30so30270958pff.8 for ; Tue, 30 Jul 2019 11:16:10 -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=LxEPX0Crt+HozwMckgTER6BzS7Gj7DRj6+re4zZk/6c=; b=GVGjSJLrWBTsdA1KeCTr4CnfI7MnJBxVGr27mIz4n6aw7/OB+K0ph/a7E4sQqaNoY3 2nPzxcjkDDEkxnRsbIWiUrVSiT9uoK2eb2oQrwGDOaWIrPaGLF2/30/A0yBuV3Kl6PKl PE0ND22m63oDOPxMaiv0vPBd0xZ6g8YBoelBM= 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=LxEPX0Crt+HozwMckgTER6BzS7Gj7DRj6+re4zZk/6c=; b=B2FXg755K/qF6hmEfdbIEV2jE4ouimvBYmjiZJxrMXase2M4qRxkmoyATTn4BhsEhE VIbWGl0XcOVA5wfWPbjldZdMaz9aiDsQrpvBM2tiI1vffOIbEFbVJ5h2ZtNL3Xs9xa2U gWopT5DoGpPLd0kXyv/HMnt4TPm/uN1D4kxk/5Tb/Tt7RAtrmtabBYBaWmtkyl3k7pDs JlngyyFrOBAgwzVlxkJCVl+fB5QgcHKzj4g+QiTJAwErzO2SsS+D2s7vU/v16hbkmPis /4+uFSQmXL4wlA4urE6IU2uV5aq0TGw1Jt4ySWSocFbcdxNzW7KEjadBxC/ha+xCCWOT I1Wg== X-Gm-Message-State: APjAAAVWGurw+0XleBEkVvkepX+bObz39cpwEtrO4TiTL0pyOCsKh91J 4DgGu1Zy5hTQBrHmtWN2NlTFhzsQOac= X-Received: by 2002:a17:90a:ad93:: with SMTP id s19mr117904573pjq.36.1564510569568; Tue, 30 Jul 2019 11:16:09 -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.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:16:09 -0700 (PDT) From: Stephen Boyd To: linux-kernel@vger.kernel.org Cc: MyungJoo Ham , Chanwoo Choi , Greg Kroah-Hartman Subject: [PATCH v6 12/57] extcon: Remove dev_err() usage after platform_get_irq() Date: Tue, 30 Jul 2019 11:15:12 -0700 Message-Id: <20190730181557.90391-13-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: MyungJoo Ham Cc: Chanwoo Choi Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- Please apply directly to subsystem trees drivers/extcon/extcon-adc-jack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index ee9b5f70bfa4..ad02dc6747a4 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c @@ -140,10 +140,8 @@ static int adc_jack_probe(struct platform_device *pdev) return err; data->irq = platform_get_irq(pdev, 0); - if (data->irq < 0) { - dev_err(&pdev->dev, "platform_get_irq failed\n"); + if (data->irq < 0) return -ENODEV; - } err = request_any_context_irq(data->irq, adc_jack_irq_thread, pdata->irq_flags, pdata->name, data); -- Sent by a computer through tubes