From patchwork Thu Sep 20 19:17:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 147129 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2376084ljw; Thu, 20 Sep 2018 12:18:38 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb9xR2tF3ahk+6FnqfXN58fFz0uC3UDstr8pCYw3QLP5XD60mT6lpjWdfYOWQ7o5Z5bZ0Hi X-Received: by 2002:a17:902:aa49:: with SMTP id c9-v6mr40079200plr.195.1537471118771; Thu, 20 Sep 2018 12:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537471118; cv=none; d=google.com; s=arc-20160816; b=xR7VkxoL16HhqnC65/mpJluwsXNp8ri7jb//S9Dj0DWuLRSmmjkPxrLfGTM4PyG9S5 0i0zv5AF4wwlhl7eDF+6RrXRs78QDo5wPnZ6WOZMFWRevbjsGxZxlzlLCUkRwXgcnjb1 vPp4q9U48ADjKdlF7nVB/eSXHa1s/7NaB77VtVM/FkIsr9p8g3i9kRR7EMVsQlVNDmXB VG1tX1gVNVjeN1FJff8c/MG5pZbGWz0oC/Ldabee11oelyiD6SQxO8QnVDKYnii2fPSt HrbjR439au7iLdwfzdanUVY1k6W1KM2LRDPRKRzmN1NTc+I+Qu60RdV0rxkzBUZvP1FP 9Qsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=zGBDLzKG1oqzc5ywY84XT73T119/4mrlMyUfeCO+MxU=; b=GG6mYkNxbs1KWMl0PnzNKXwjkL0MtKGqW7pZqEHdZZSW0NLZvoCHflcQ6gxEV8gQJv /l/TcZJiNh1tYt6m0b6rAJNdgNbv7gcXPH1OUVqcuIeRT10rMfx8wCE0rHfNt3S1/uCZ E14+X37gaZQErkZZDu4+/ixrXWNQ7XlmgyyqfhlLz6Oxra6P8dsaf2nG37GyrjakmB11 JTdEi3mNCkyX8yyG5N9A2SPM+hWmlq4jrzD+AyHGE3Q4R/CNVmCYX8iwIV/24w+Aea3k FxScRkqYCXg8NbxA3P4fyLrfJRcgHTVw0Uat8TV6jIxyDaZfHfoEsUmRJTSKYsGKOEPm A+sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kwR5roM+; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y27-v6si24472533pgl.479.2018.09.20.12.18.38; Thu, 20 Sep 2018 12:18:38 -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=@linaro.org header.s=google header.b=kwR5roM+; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388749AbeIUBDf (ORCPT + 32 others); Thu, 20 Sep 2018 21:03:35 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38256 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388702AbeIUBDe (ORCPT ); Thu, 20 Sep 2018 21:03:34 -0400 Received: by mail-pl1-f196.google.com with SMTP id u11-v6so4799653plq.5 for ; Thu, 20 Sep 2018 12:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zGBDLzKG1oqzc5ywY84XT73T119/4mrlMyUfeCO+MxU=; b=kwR5roM+/WuD1YOY3r6vZQ+XHyFBEtu20K5Nm+jKjlTKNAuh/0EaVXIDZc240ZIOi1 usUC64kBxcQBqtFNFciLHR+NYAOG5HAzgR47PLpV0nZHY2M/KvEu1C3YJMYy7mILI2qa q5/cdI/XoY+9ff+c88f0G80BO1xdMrTebr1YY= 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:in-reply-to :references; bh=zGBDLzKG1oqzc5ywY84XT73T119/4mrlMyUfeCO+MxU=; b=dZY3sWpTzDTQ/YS3o+5+X3RVutpLX3SLtNGu6S8YSjZtnkk4k0Ao5L5Yvt6BX1pZrG 1I4UJdVYztWA9pC4Ojk50B/JwDGOK/5Sv1SzrdTg/3csum4nFJWUISLIR/SmcMUwWn9t fqpZ6NJ/RQqukbM29gBeTFPy+mc7Gx4JeQBW4siYK8xGvcSQW0l/wa6oB+QDP7h9ETnk hC7gaPH9nvhsDOjsG6DD7iZEMtSYiHNvO+YebyXbozBp3CwT5I24zKe62SyrLot39xV/ N+O3aZSxwBbu8MbTHLzhcgNfqrDlj4J8HShDm/PYCR6deEzr5ah3NOzaWnLXYy/VQ1Sb +MNg== X-Gm-Message-State: APzg51C5iVLJI4POi+9uRmLE1MMr4M0iMls7r7cvoCmRHSwxOy+rxGl7 y6WuumCT/pRBupVP8nwvccAyP4d3WTI= X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr39947209plp.14.1537471115263; Thu, 20 Sep 2018 12:18:35 -0700 (PDT) Received: from localhost.localdomain ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id k13-v6sm4424443pgf.37.2018.09.20.12.18.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Sep 2018 12:18:34 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 09/44] coresight: Use ERR_CAST instead of ERR_PTR Date: Thu, 20 Sep 2018 13:17:44 -0600 Message-Id: <1537471099-19781-10-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537471099-19781-1-git-send-email-mathieu.poirier@linaro.org> References: <1537471099-19781-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: zhong jiang Use ERR_CAT inlined function to replace the ERR_PTR(PTR_ERR). It make the code more concise. Signed-off-by: zhong jiang Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 2eda5de304c2..11963647e19a 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -536,7 +536,7 @@ tmc_init_etr_sg_table(struct device *dev, int node, sg_table = tmc_alloc_sg_table(dev, node, nr_tpages, nr_dpages, pages); if (IS_ERR(sg_table)) { kfree(etr_table); - return ERR_PTR(PTR_ERR(sg_table)); + return ERR_CAST(sg_table); } etr_table->sg_table = sg_table;