From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabor Juhos Date: Thu, 22 Aug 2013 17:50:12 +0000 Subject: Re: [PATCH 6/6] MIPS: ath79: simplify platform_get_resource_byname/devm_ioremap_resource Message-Id: <52164F54.2070209@openwrt.org> List-Id: References: <1376902316-18520-1-git-send-email-Julia.Lawall@lip6.fr> <1376902316-18520-7-git-send-email-Julia.Lawall@lip6.fr> In-Reply-To: <1376902316-18520-7-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Julia Lawall Cc: Ralf Baechle , kernel-janitors@vger.kernel.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org 2013.08.19. 10:51 keltez=E9ssel, Julia Lawall =EDrta: > From: Julia Lawall >=20 > Remove unneeded error handling on the result of a call to > platform_get_resource_byname when the value is passed to devm_ioremap_res= ource. >=20 > A simplified version of the semantic patch that makes this change is as > follows: (http://coccinelle.lip6.fr/) >=20 > // > @@ > expression pdev,res,e,e1; > expression ret !=3D 0; > identifier l; > @@ >=20 > res =3D platform_get_resource_byname(...); > - if (res =3D NULL) { ... \(goto l;\|return ret;\) } > e =3D devm_ioremap_resource(e1, res); > // >=20 > Signed-off-by: Julia Lawall Acked-by: Gabor Juhos Thanks! -Gabor -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Aug 2013 19:50:03 +0200 (CEST) Received: from phoenix3.szarvasnet.hu ([87.101.127.16]:44107 "EHLO mail.szarvasnet.hu" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6831921Ab3HVRty3y0G0 (ORCPT ); Thu, 22 Aug 2013 19:49:54 +0200 Received: from localhost (localhost [127.0.0.1]) by phoenix3.szarvasnet.hu (Postfix) with ESMTP id 378992C0CE5; Thu, 22 Aug 2013 19:49:49 +0200 (CEST) Received: from mail.szarvasnet.hu ([127.0.0.1]) by localhost (phoenix3.szarvasnet.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hvSKg2hboHbR; Thu, 22 Aug 2013 19:49:49 +0200 (CEST) Received: from [192.168.254.50] (catvpool-576570d8.szarvasnet.hu [87.101.112.216]) by phoenix3.szarvasnet.hu (Postfix) with ESMTPA id CB8622C0CE4; Thu, 22 Aug 2013 19:49:48 +0200 (CEST) Message-ID: <52164F54.2070209@openwrt.org> Date: Thu, 22 Aug 2013 19:50:12 +0200 From: Gabor Juhos User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Julia Lawall CC: Ralf Baechle , kernel-janitors@vger.kernel.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] MIPS: ath79: simplify platform_get_resource_byname/devm_ioremap_resource References: <1376902316-18520-1-git-send-email-Julia.Lawall@lip6.fr> <1376902316-18520-7-git-send-email-Julia.Lawall@lip6.fr> In-Reply-To: <1376902316-18520-7-git-send-email-Julia.Lawall@lip6.fr> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 37648 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: juhosg@openwrt.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 2013.08.19. 10:51 keltezéssel, Julia Lawall írta: > From: Julia Lawall > > Remove unneeded error handling on the result of a call to > platform_get_resource_byname when the value is passed to devm_ioremap_resource. > > A simplified version of the semantic patch that makes this change is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression pdev,res,e,e1; > expression ret != 0; > identifier l; > @@ > > res = platform_get_resource_byname(...); > - if (res == NULL) { ... \(goto l;\|return ret;\) } > e = devm_ioremap_resource(e1, res); > // > > Signed-off-by: Julia Lawall Acked-by: Gabor Juhos Thanks! -Gabor