Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp607681imm; Wed, 23 May 2018 02:30:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo2xZF4poqm/3qg/nJeaKwdlgUVH0oC8Cpz7pMNYiqPTBMlrt1hqNuzNastUX0OC4gixrbL X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11-v6mr2145688plb.95.1527067859830; Wed, 23 May 2018 02:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527067859; cv=none; d=google.com; s=arc-20160816; b=nXhv75stE+pDWQI8yFbYo4fwmWRNVEsOq3SxMpnEF/xZuSLU5iUjDThL3cdi0mb+92 kbvuLJPOyxmtTbS1dlA7F3htN7T95aDkUXot8fBxUWxCOmgHxlnyxz6f4CIBXzOSE/+P UrZEwrUzFNss9OvA4jLamhA80DHK27YLv31Ne0SUGgH33cFxzxQQAKt9rJQ5QD9EdNee BiMnUhpsNCzw6jwcWyvgbYNN0dCJtcchgKmX67so13xgpHofMhVF19TFeMe24gW/R+Cv lGLoLPJIlyKvEbu30fUXYWyb1GB9ftvqksatCrIIfTb5ozuwRfe7sybf1s1qzzK2X+VK VJPA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=tTuVNkTwyiq2nteQqwYiN6VRCh9xPcKhRJ2AL07chUc=; b=wsd1SFZe3KmAOrPUlKlTDxUMpnEWPNMr0qMebuK1Au/zUBA9tK6WtLHpSmiyaInWDu JAuo+9aRou3kxUbUokW1Ft+eJl7lqqNKf31fls+n10eCmYhOAD8GuSAZky94mkGLFPIl TRHUJQXPpcOGSpbJessHJP5g+BBqjmcQaqhEZcex6hjq9PqE67BDGZLO1PNWTx6o08jt +8jCh7NZ4hg5ubJtE0T1ZL5J15AYFNAqkNVmf8Hs/TMht8rJpemPN4Zqgu9aD6WiGXur DhvrTj/30TcsGtx0Ol10TXRzsruBKosjzoM0bCOtSphEACIP7JdV1eHe6m3uv9acvtAb MHsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EWssdSY8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17-v6si14494262pgp.214.2018.05.23.02.30.45; Wed, 23 May 2018 02:30:59 -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=@ti.com header.s=ti-com-17Q1 header.b=EWssdSY8; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932235AbeEWJ3A (ORCPT + 99 others); Wed, 23 May 2018 05:29:00 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:50964 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932137AbeEWJ26 (ORCPT ); Wed, 23 May 2018 05:28:58 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4N9SrZK019443; Wed, 23 May 2018 04:28:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1527067733; bh=tTuVNkTwyiq2nteQqwYiN6VRCh9xPcKhRJ2AL07chUc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=EWssdSY8UPhQSli+UZ6qaryjKksm6k0278NkH5W1rMUBCQdK9Xt7LRFeP9wEr8taj zqtNp7ViZYK/jfF4AuHXTdUFVjdMONUNHvHb3HY+B2yd1bANa6IZDwQS7HefhfE86v H44pH19E16fKUPDMSOuBtTdg9RRhVJ2DKIblO7D0= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4N9Srii012932; Wed, 23 May 2018 04:28:53 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 23 May 2018 04:28:53 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 23 May 2018 04:28:52 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4N9SpRF011125; Wed, 23 May 2018 04:28:52 -0500 Subject: Re: [PATCH] drm/omap: dss: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) To: =?UTF-8?Q?Hern=c3=a1n_Gonzalez?= CC: , , , References: <1526254581-4388-1-git-send-email-hernan@vanguardiasur.com.ar> From: Tomi Valkeinen Message-ID: Date: Wed, 23 May 2018 12:28:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1526254581-4388-1-git-send-email-hernan@vanguardiasur.com.ar> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/05/18 02:36, Hernán Gonzalez wrote: > Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). > > drivers/gpu/drm/omapdrm/dss/dss.c:959:9-16: WARNING: ERR_CAST can be used with d > Generated by: scripts/coccinelle/api/err_cast.cocci > > Signed-off-by: Hernán Gonzalez > --- > drivers/gpu/drm/omapdrm/dss/dss.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c > index 0b908e9..be043c8 100644 > --- a/drivers/gpu/drm/omapdrm/dss/dss.c > +++ b/drivers/gpu/drm/omapdrm/dss/dss.c > @@ -956,7 +956,7 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name, > &dss_debug_fops); > if (IS_ERR(d)) { > kfree(entry); > - return ERR_PTR(PTR_ERR(d)); > + return ERR_CAST(d); > } > > entry->dentry = d; > Thanks, I've picked this up. Tomi -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki