Received: by 10.223.164.202 with SMTP id h10csp5710104wrb; Tue, 21 Nov 2017 14:21:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMZmDTY1mdN5rdcKu6XtW1n25c20YLnwet1/VHhQkoi1pLRn3lBVO6NPiep/uogRBWi92R+G X-Received: by 10.84.246.201 with SMTP id j9mr7238723plt.333.1511302887736; Tue, 21 Nov 2017 14:21:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511302887; cv=none; d=google.com; s=arc-20160816; b=jks3l2WgGkx2uN51NGVUYRD48sOUCxrJkjQaB+lbYl0J+33XKSckvS7ExWVQE5RXxY dQsjEfQgrwUfllXLcDz/XhfzKvjs3ET6Gn6DM5wUm780EIso73vJETBQALhYh++PnDIf kCvz/2C0JVG7RyXUPXJ2uuCEFAECT73JdtcRGfubmV2SOM9HScQAwgDKJ0aBFJGIXyPJ OSk0aclCjgc1ihmH9Sd9iQFU2ov/+gBwrdNhpdBi5SwiwA9dSqMiOrIpRsD+/q9jAOKG FUK6ytcfvcd8CQ72qwsWuLfsIB7jnbtwQ61myAheDLcCIFmYRjDEwtH36HuNC2uEf94Z sJkg== 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=YgTg1oyBa0TkQEvjJpi6RzsR0Kl9984DykftINzZZU8=; b=Tk+VRYwEJr0zM4reI9008iM29FkFDvpzXKgU/tKVllGrEPnSAmlfDNzqQljPywSqkQ MZNyyXoXWdSwDzT62vQGlT8yMZCwsyATYkbZ8HlmKTtL+R/FwqAa1fL3pfO3p734nEyr tmB+44pVZMV9qQMOfKsMbf2H+VhER1KDAdezBZWxTMn7hjUOTmlNrWAlat1WCs7Owqk+ +Mpk5Pkke064lq2Dh7nHggmlp5FqrOrRrElOHkmbXQgHYcBG5KXNCQUO2beCfx0zSsEm czmREXaKMLYW27kJOuIANR1dmuC5b6e5rAs7oggagyLicGzDrKjTueOV7fsVGncMfAUn 1BTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XmODQxm+; 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 q12si11780002pls.475.2017.11.21.14.21.16; Tue, 21 Nov 2017 14:21:27 -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=XmODQxm+; 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 S1751552AbdKUWUF (ORCPT + 76 others); Tue, 21 Nov 2017 17:20:05 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36628 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751517AbdKUWUC (ORCPT ); Tue, 21 Nov 2017 17:20:02 -0500 Received: by mail-lf0-f67.google.com with SMTP id k66so15967337lfg.3; Tue, 21 Nov 2017 14:20:01 -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=YgTg1oyBa0TkQEvjJpi6RzsR0Kl9984DykftINzZZU8=; b=XmODQxm+gePBpL920x3wvfTX5tYoENxnXCEJp6FhLqIefkCR2siCQ2u4beOKxkV+P+ 0l7LAvnHzZQj/JdG+ROuGr7QjFPYl8tswNsyALN1jE17nhFVsAA+E8pgPWhN3V20pelf HL6VbvEQ7w5Sj5ePUK2Z6lnDADo0JbUOliWqehRA27qmD8AaDALUUYJ0IjDNj8b0RCpa epW5hLxsv1Skg77euBToiMAosAOh0CVIpqxSyawTLT6dTVwuLN2tF/TCIxGF1vgUV3OQ Obp/b7epQoPbneirabaISnf4hSJVcSgXCfTmUuzBPSqpbcfpDL793xORABfItDGf9PZs u+Hw== 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=YgTg1oyBa0TkQEvjJpi6RzsR0Kl9984DykftINzZZU8=; b=ZP9I2m98f0ENxC4gvg/Qm/EHzIQsuGAnhAdhNrRl+FG4F5++eFS0xcXhY4x1/mC1Vm JZod3fWAgZIKYdPx1T/+IkxUMyxnjeid4+QwitTVf+UHuqWWDO2b7HeXmxFAWMKV9Xuu mM+CmvPYQgufnJ5jLhGL2dlfb8qigdWN6Bwf6KsnPhkO3xGbBVx2ZnC1oQ5XaG2Z8srf NlSVAbI9jS31a4ENTGMwMS0fknwkg0ZyZAktszVHGuacR409WTgI4EP9eezZQo1a+sVx XdKxbqFjE5WMmN6Z+1+G3CmqkXFQG1NF+4Hno2x9lM9tKllLG20dm+syTZOOQHkuqm5Z 1SKw== X-Gm-Message-State: AJaThX6VBEcD4gYcphky6FJ8JFnv7fzhcEzK7+k6djiimfEFmiW9RdUh czkNjgTstBEz3649WDdU8mUkwi/+ X-Received: by 10.25.99.14 with SMTP id x14mr4958207lfb.168.1511302801025; Tue, 21 Nov 2017 14:20:01 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id s66sm3330504lje.40.2017.11.21.14.19.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Nov 2017 14:20:00 -0800 (PST) From: Vasyl Gomonovych To: davem@davemloft.net, grygorii.strashko@ti.com, richardcochran@gmail.com, w-kwok2@ti.com, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] net: ethernet: ti: cpts: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Date: Tue, 21 Nov 2017 23:18:52 +0100 Message-Id: <1511302732-20771-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/net/ethernet/ti/cpts.c:567:9-16: WARNING: ERR_CAST can be used with cpts -> refclk Generated by: scripts/coccinelle/api/err_cast.cocci Signed-off-by: Vasyl Gomonovych --- drivers/net/ethernet/ti/cpts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c index e7b76f6b4f67..7842f094f2ef 100644 --- a/drivers/net/ethernet/ti/cpts.c +++ b/drivers/net/ethernet/ti/cpts.c @@ -564,7 +564,7 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs, cpts->refclk = devm_clk_get(dev, "cpts"); if (IS_ERR(cpts->refclk)) { dev_err(dev, "Failed to get cpts refclk\n"); - return ERR_PTR(PTR_ERR(cpts->refclk)); + return ERR_CAST(cpts->refclk); } clk_prepare(cpts->refclk); -- 1.9.1 From 1585766217834041224@xxx Sun Dec 03 12:35:13 +0000 2017 X-GM-THRID: 1585766217834041224 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread