Received: by 10.223.164.202 with SMTP id h10csp5720536wrb; Tue, 21 Nov 2017 14:32:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMZuoXXMRuR/sAnm6BgNY2u0rZI7WSwfJ1+SpLtCIQoiG952Cl6UavPT+ywGmw7imTOW1Kw4 X-Received: by 10.101.76.139 with SMTP id m11mr18895744pgt.103.1511303558217; Tue, 21 Nov 2017 14:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511303558; cv=none; d=google.com; s=arc-20160816; b=okD99B//1yxXP2aPfT1PzbB5Zi1Lws7wNbNsIJ8ykQdFJmTQ2/oE6MDcmB85EZl+bJ 8DOxkwK4NgE/hxERfxp2rzpUemKUrRko737unEEZkxbgF/RMeheeXDpBnSxi2+/z/mXo F9DPjMXifHtJFOuHFJqE2nq1c8VOxD86LaEceyf+0iIvqG2DuqCXVBm2NHlyMOHFi3XR BEExfZz4jgnz9MqCnM3NWme7zJ1BoPIkZAfAj8u8DXPyOkckRZQ5nOnJysZBZGwvgdQV dTcjTNWaOnkeHL4JkD1IoNnIP6p8tvldvZjRj/0cyH7Tx949x2ClvQfqfFlObFKeg6XZ AdRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=k+B9n4Ia9aw07sxiCIIXgRap0mKlGjvTHmGPLX00zts=; b=N/CVbH0cHsKLSLcjEVjqtrJFwY/1/Lrfgjhn10UCIIHCsdyKvBTazP9cOnubK0Jnvn RLue3aS13egpA+Nyr8CQrCNdr4V9dly5k08bgBXnGRqcdo7XWQ+WJCKx1TDziy4avv43 p6rOdexseideDMb4OnWQ9o4A8CfVdIo0DtdAPXIrfP4pcHJz4FYVxvquT+U8QTiSzEek 7RXUMbr6LHPQXvZJjFwuoir79RjtEtOq95j/kVbvKoRo9FCsoxeqhHYwMdQNNiqyBoi9 3es2opD676u6UCTtWAX+tdcFLKQ/DV4utuFRsKUR1o5+T+J5L5MhqzRt8Pqsuk+03T3p 4iKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lFNoyRH7; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si11684540pgn.478.2017.11.21.14.32.26; Tue, 21 Nov 2017 14:32:38 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=lFNoyRH7; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbdKUWbt (ORCPT + 76 others); Tue, 21 Nov 2017 17:31:49 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:39279 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbdKUWbr (ORCPT ); Tue, 21 Nov 2017 17:31:47 -0500 Received: by mail-lf0-f65.google.com with SMTP id x76so11343291lfb.6 for ; Tue, 21 Nov 2017 14:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=k+B9n4Ia9aw07sxiCIIXgRap0mKlGjvTHmGPLX00zts=; b=lFNoyRH7nd9g+pyC3GgCv7lyeQFBESzlNlauzMKDn6NMe194859QaOcWhHvusRzZX0 6xmKuA0cbfJztCslhJ7HA1IjYRxkUWhyZ6qO8MrlV5y1C08VjyNmGdm37/yFt0Nvlrc7 xlGyvmUycRTe3zYxb4dBFDYe36sOgZ+GvbI5roekZYPZ5bhSvQQxBwiLViuQWkRPvzwf khnx/21YsEGZW85Dlcu4z+KE/J57O1NVWZNWao7BFO4V/fEXFpQ2bFOPbOPvwahPBAmg 6JcSuTBRP+f32AHEyiWcjmwNrUn/BUNj6AnkHco1SwXGe71ryjuOWmprOYvoYcCu1Otz vj9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=k+B9n4Ia9aw07sxiCIIXgRap0mKlGjvTHmGPLX00zts=; b=WMc53qlifzQNChJBoVxnbzdT7gIOfJsoqJ90p3zSifSF3TmdsF9KOMM9M4P0jc5sl1 +QNscLuQX6lUfSHKgnLZ60eCuYKuN3Viqf+JM6KbaGtL2IBgl7eDeeaLYr02ZbvjRdzs oQFO3rj9WPh9erDumAPk99vUz0r3kszGHe1Z595TzCgvt1Ob1CteRJmRU3GYBQOBH74g 8NavskKm9cb0LRiVse2G3bT5TW0IxWvzrlGhV7EthNqnXqmuSorQLLLwBfDdI2QyhTvd 6q233wfXMEI7MzG53W4gfSvGVp3t7RMlJMhlBPz6LNPWEwI1vt6QhnNnWskmZ/IxJ9Co 4cew== X-Gm-Message-State: AJaThX4JOsexTaSX6MuF3FxgM50CYuOshKZ5t7ASLdATbIY0zDRpNbzM 5wBh8+1HlavCumJfC2akPr0= X-Received: by 10.25.149.211 with SMTP id x202mr5103474lfd.139.1511303505663; Tue, 21 Nov 2017 14:31:45 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id r7sm1492454lja.32.2017.11.21.14.31.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Nov 2017 14:31:44 -0800 (PST) From: Vasyl Gomonovych To: ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, matthias.bgg@gmail.com, dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] drm/mediatek: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Date: Tue, 21 Nov 2017 23:31:33 +0100 Message-Id: <1511303493-14897-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). drivers/gpu/drm/mediatek/mtk_drm_gem.c:223:9-16: WARNING: ERR_CAST can be used with mtk_gem Generated by: scripts/coccinelle/api/err_cast.cocci Signed-off-by: Vasyl Gomonovych --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c index f595ac816b55..5766b42fc174 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c @@ -220,7 +220,7 @@ struct drm_gem_object *mtk_gem_prime_import_sg_table(struct drm_device *dev, mtk_gem = mtk_drm_gem_init(dev, attach->dmabuf->size); if (IS_ERR(mtk_gem)) - return ERR_PTR(PTR_ERR(mtk_gem)); + return ERR_CAST(mtk_gem)); expected = sg_dma_address(sg->sgl); for_each_sg(sg->sgl, s, sg->nents, i) { -- 1.9.1 From 1584834483333870294@xxx Thu Nov 23 05:45:42 +0000 2017 X-GM-THRID: 1584834483333870294 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread