From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4596EC32750 for ; Fri, 2 Aug 2019 17:04:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21EE420644 for ; Fri, 2 Aug 2019 17:04:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390457AbfHBRET (ORCPT ); Fri, 2 Aug 2019 13:04:19 -0400 Received: from foss.arm.com ([217.140.110.172]:55160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731663AbfHBRET (ORCPT ); Fri, 2 Aug 2019 13:04:19 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C34BA1570; Fri, 2 Aug 2019 10:04:18 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 007C73F819; Fri, 2 Aug 2019 10:04:17 -0700 (PDT) Subject: Re: [PATCH v6 11/57] edac: Remove dev_err() usage after platform_get_irq() To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Mauro Carvalho Chehab , linux-edac@vger.kernel.org, Greg Kroah-Hartman References: <20190730181557.90391-1-swboyd@chromium.org> <20190730181557.90391-12-swboyd@chromium.org> From: James Morse Message-ID: Date: Fri, 2 Aug 2019 18:04:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190730181557.90391-12-swboyd@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-edac-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org Hi, On 30/07/2019 19:15, Stephen Boyd wrote: > 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. I assume this is part of a series that makes this the case... > 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). Reviewed-by: James Morse Thanks, James