From mboxrd@z Thu Jan 1 00:00:00 1970 From: Duan Jiong Subject: Re: [PATCH] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Date: Thu, 07 Nov 2013 09:15:17 +0800 Message-ID: <527AE9A5.8080003@cn.fujitsu.com> References: <1383724435-15380-1-git-send-email-duanj.fnst@cn.fujitsu.com> <527A7333.9090409@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <527A7333.9090409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Stephen Warren , kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org, airlied-cv59FeDIM0c@public.gmane.org Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thierry Reding , =?UTF-8?B?VGVyamUgQmVyZ3N0csO2bQ==?= List-Id: linux-tegra@vger.kernel.org =E4=BA=8E 2013=E5=B9=B411=E6=9C=8807=E6=97=A5 00:49, Stephen Warren =E5= =86=99=E9=81=93: > On 11/06/2013 12:53 AM, Duan Jiong wrote: >> This patch fixes coccinelle error regarding usage of IS_ERR and >> PTR_ERR instead of PTR_ERR_OR_ZERO. >=20 >> diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem= =2Ec >=20 >> @@ -199,10 +199,7 @@ int tegra_bo_dumb_create(struct drm_file *file,= struct drm_device *drm, >> =20 >> bo =3D tegra_bo_create_with_handle(file, drm, args->size, 0, >> &args->handle); >> - if (IS_ERR(bo)) >> - return PTR_ERR(bo); >> - >> - return 0; >> + return PTR_ERR_OR_ZERO(bo); >> } >=20 > I suppose that's fine, although I wonder if it'll cause churn should = we > ever need to add code to the tail end of the function. >=20 > BTW, why were all the similar patches that had nothing to do with Teg= ra > sent to the linux-tegra@ mailing list? You also didn't CC the > maintainers of drivers/gpu/drm/tegra/ on this patch. Plus this patch = has > nothing to do with the rtc-linux@ mailing list. I'm sorry for that. i just get the maintainers and the mail lists by th= e script get_maintainer.pl. > -- > To unsubscribe from this list: send the line "unsubscribe linux-kerne= l" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395Ab3KGB3I (ORCPT ); Wed, 6 Nov 2013 20:29:08 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:39519 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752053Ab3KGB3G convert rfc822-to-8bit (ORCPT ); Wed, 6 Nov 2013 20:29:06 -0500 X-IronPort-AV: E=Sophos;i="4.93,647,1378828800"; d="scan'208";a="8966375" Message-ID: <527AE9A5.8080003@cn.fujitsu.com> Date: Thu, 07 Nov 2013 09:15:17 +0800 From: Duan Jiong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stephen Warren , kernel@pengutronix.de, linux@arm.linux.org.uk, a.zummo@towertech.it, airlied@linux.ie CC: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Thierry Reding , =?UTF-8?B?VGVyamUgQmVyZ3N0csO2bQ==?= Subject: Re: [PATCH] drm/tegra: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO References: <1383724435-15380-1-git-send-email-duanj.fnst@cn.fujitsu.com> <527A7333.9090409@wwwdotorg.org> In-Reply-To: <527A7333.9090409@wwwdotorg.org> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/11/07 09:15:22, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/11/07 09:27:09 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2013年11月07日 00:49, Stephen Warren 写道: > On 11/06/2013 12:53 AM, Duan Jiong wrote: >> This patch fixes coccinelle error regarding usage of IS_ERR and >> PTR_ERR instead of PTR_ERR_OR_ZERO. > >> diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c > >> @@ -199,10 +199,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, >> >> bo = tegra_bo_create_with_handle(file, drm, args->size, 0, >> &args->handle); >> - if (IS_ERR(bo)) >> - return PTR_ERR(bo); >> - >> - return 0; >> + return PTR_ERR_OR_ZERO(bo); >> } > > I suppose that's fine, although I wonder if it'll cause churn should we > ever need to add code to the tail end of the function. > > BTW, why were all the similar patches that had nothing to do with Tegra > sent to the linux-tegra@ mailing list? You also didn't CC the > maintainers of drivers/gpu/drm/tegra/ on this patch. Plus this patch has > nothing to do with the rtc-linux@ mailing list. I'm sorry for that. i just get the maintainers and the mail lists by the script get_maintainer.pl. > -- > 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/ >