Received: by 10.223.164.202 with SMTP id h10csp2300568wrb; Mon, 27 Nov 2017 15:08:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMb+gcDrTnw2cUkcrP4UxxgDUWLRJNW7lFYXIpNqJ4J+drEMQctecwPzdJdR5w+UUz7q3o0A X-Received: by 10.84.235.129 with SMTP id p1mr35629047plk.288.1511824104109; Mon, 27 Nov 2017 15:08:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511824104; cv=none; d=google.com; s=arc-20160816; b=b3nRRCaQjhesQyR7eCOaku47oTPZX37D/b5Q8umurTfyoCgk/PX/ZRql8KTwAQlqe3 24ykM1WN3YwXDr03CnKagEMrpvFEMHMA1JzM74R6hGLel7Q2yEkNEA9mBRtIJjw0+WbF h1QK/T2GNx/bqE9PWsPe9BG4KO6y41sNgJcVVNI8cF9z1l9DLztIGejGttt+IE6ZLvRu 2CeT0QJq1bj3NgYYHgMDqu8FqTg0q6VMhmXcvcDvOaN43vQV9qy58UFIcBEeVgu2UMVc 9rEh6GLH4831+GCSw5fZg/QidZreC0TIjTqtui2awU7TP5Idg92FFxJ/cAgtgkOM9ODs u5AQ== 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=PLTxKEcdEHyswHhjKLnJFoM6ojwvm4x2ggMp9BmEfq4=; b=aLWSzTCtTV3khfmKO06Ub7Rx3AX012tH5NYWgHBV+R4QbD0sQ+FrL132C10kOxEmVT ucl7SNH7PLm0WCoPzb3YApDSi0JwpVW15IngobehnbTrh9eD9gwdCAm36DErk+KxHlGd rbX1HIES70w9nwaSIEg3JeCRpzzwyD5xMSvdTG2y6L/hNAD6rTF1qrO1tyex1OyiLt9C AhGqR2cASnflYNybPxYyz2fcwRA6Jo8H4c9wTx4YEeIZWjaH4Thu4W4O7Bn5We6+alfE /8hSx72MFNmeo8lGhFzjR1weQPwOuzxk557sCZg2wG/C4mmjsPuDxS2m3dbmJZA1ABfe 1ZYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y0rWzUmE; 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 i10si24172779pgc.159.2017.11.27.15.08.12; Mon, 27 Nov 2017 15:08:24 -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=Y0rWzUmE; 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 S1753008AbdK0XHT (ORCPT + 78 others); Mon, 27 Nov 2017 18:07:19 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:45171 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbdK0XHR (ORCPT ); Mon, 27 Nov 2017 18:07:17 -0500 Received: by mail-lf0-f66.google.com with SMTP id f131so26734726lff.12; Mon, 27 Nov 2017 15:07:17 -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=PLTxKEcdEHyswHhjKLnJFoM6ojwvm4x2ggMp9BmEfq4=; b=Y0rWzUmEYAyKwvujKuIGiMajc0bu7cJKmUvthTyKCRAo+xtaD9RqEXC89pcSk/ZWlg 23lX3fnBCHrRvi0jIIrIUi3hXF0Xej9ltX1sJ1p6EmCm8lG2N35zlELUe2BqegKTgBeA CxLyJUvAjK3KzL9vh+2D4xmKXulC1aLvgKjN2kLGPT2OUhoh/XI9GWZHomIlOnP7C6kb HwWBC6inpaQu63Zo/G5SZ9YYEwUdD6kBiyYa8U3b7UGsl1RD8p+ZJa4H/eDBTI0t5Qp/ Pk23pNpugZRIhpiyHq4nsqp45oY0RXA5R/FzNBDOZ7qT8pxGy/WTI5D6MWXNIb8sl9OH WiqQ== 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=PLTxKEcdEHyswHhjKLnJFoM6ojwvm4x2ggMp9BmEfq4=; b=C1BlJCShzIelsXS5QtTVfKmoJVwusMVXwTfLEbL0frCerFQVTlHDn5Z7r9NFsHSM2W BnqRT+AbGTAraTRYGUfwEljRnxSIn5/K1O3Bfs/NWL289GW2mrTY1hPOgxcnIE4QTkzE Mqz7eyTFBBQ+vPIT5e7wUWxyQyA35qfvrR0CiJZq5RKxapxmjEoRiWDwhEX8rPESYDbA WHzjX4EmhyR8mYGYBt8dhd3zQFwH/2Jx5oyDcg0kVhKlBMgw2muVMieHSK1wcWfRghE5 AGs2EaPjn1KNyXWYZQ15pfgcRXM4RMz/TqsaDEkMVJ/ps1wnesa46aQJ7oVHhmkibwNd fUPw== X-Gm-Message-State: AJaThX65JXQYHVzdFr+AcLwmJNANPEeKvh5sLRJI0nPribWL5YwkT4WB PJmLvn7kL5ThCelYiK05cvw= X-Received: by 10.25.109.6 with SMTP id i6mr13379066lfc.73.1511824036450; Mon, 27 Nov 2017 15:07:16 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id b84sm4358976ljf.60.2017.11.27.15.07.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 15:07:15 -0800 (PST) From: Vasyl Gomonovych To: sudeep.dutt@intel.com, ashutosh.dixit@intel.com, dan.j.williams@intel.com, vinod.koul@intel.com, dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] dma: MIC X100: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 00:07:08 +0100 Message-Id: <1511824028-6749-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 Fix ptr_ret.cocci warnings: drivers/dma/mic_x100_dma.c:483:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych --- drivers/dma/mic_x100_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c index 5ba5714d0b7c..94d7bd7d2880 100644 --- a/drivers/dma/mic_x100_dma.c +++ b/drivers/dma/mic_x100_dma.c @@ -480,9 +480,7 @@ static int mic_dma_setup_irq(struct mic_dma_chan *ch) to_mbus_hw_ops(ch)->request_threaded_irq(to_mbus_device(ch), mic_dma_intr_handler, mic_dma_thread_fn, "mic dma_channel", ch, ch->ch_num); - if (IS_ERR(ch->cookie)) - return PTR_ERR(ch->cookie); - return 0; + return PTR_ERR_OR_ZERO(ch->cookie); } static inline void mic_dma_free_irq(struct mic_dma_chan *ch) -- 1.9.1 From 1585861416279248569@xxx Mon Dec 04 13:48:22 +0000 2017 X-GM-THRID: 1585499011185718290 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread