Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759425Ab3HOUCj (ORCPT ); Thu, 15 Aug 2013 16:02:39 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:36498 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757851Ab3HOUCi (ORCPT ); Thu, 15 Aug 2013 16:02:38 -0400 MIME-Version: 1.0 In-Reply-To: <1376471493-22215-2-git-send-email-Julia.Lawall@lip6.fr> References: <1376471493-22215-1-git-send-email-Julia.Lawall@lip6.fr> <1376471493-22215-2-git-send-email-Julia.Lawall@lip6.fr> Date: Thu, 15 Aug 2013 22:02:37 +0200 Message-ID: Subject: Re: [PATCH 1/29] pinctrl: nomadik: simplify use of devm_ioremap_resource From: Linus Walleij To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1210 Lines: 39 On Wed, Aug 14, 2013 at 11:11 AM, Julia Lawall wrote: > From: Julia Lawall > > Remove unneeded error handling on the result of a call to > platform_get_resource when the value is passed to devm_ioremap_resource. > > Move the call to platform_get_resource adjacent to the call to > devm_ioremap_resource to make the connection between them more clear. > > A simplified version of the semantic patch that makes this change is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression pdev,res,n,e,e1; > expression ret != 0; > identifier l; > @@ > > - res = platform_get_resource(pdev, IORESOURCE_MEM, n); > ... when != res > - if (res == NULL) { ... \(goto l;\|return ret;\) } > ... when != res > + res = platform_get_resource(pdev, IORESOURCE_MEM, n); > e = devm_ioremap_resource(e1, res); > // > > Signed-off-by: Julia Lawall Patch applied. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/