Received: by 10.223.164.202 with SMTP id h10csp2303089wrb; Mon, 27 Nov 2017 15:10:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMaUMPnBjuhJHtHeBLcOoOKBJW7JZthxsuix6Xh4itjW3KkpVj1r1U+zmDbXnLJ7r+z4KxLN X-Received: by 10.98.79.86 with SMTP id d83mr38869774pfb.26.1511824245830; Mon, 27 Nov 2017 15:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511824245; cv=none; d=google.com; s=arc-20160816; b=GG5alKjoCsrcC5xFiDqajk+xrAYLQb4MSfzE0hL003tfK9fDrr1VpgMQh0uuvQP2a5 UJ/CAjVE+aXPOxqOU+osLv/jDvp3F9v8BlkzaKZwCHyC0P2v1eWJ2U+/uNrDC+O07mtT lzHx4YgQFWZdWInuhIU9kVifyopZb7c6zApPZMCpLkcfZItsfGy8TF7Q9aTZer7q/vmf TFqcrSTlIgkwC+Td6xPQENIs1IorJvx64/wM6ZdZ67I45hEjLVDsMEN8MfcYzX4SK4nw /ml9siUNLcKfeymda+Aw2zvngyO0aBJB4siunlBw+a6JJpSuzLGOCIvyWuIAiprpLiEi l/jg== 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=3dG5ml4sRF7XVZdHlA6p94L3YWk580fYWfI9dd6BGJY=; b=YylCXWyDoWv6r4C5vz3lvXImECXfzX3Zq0k74EVp/pWuYjls3OhrpabXIjsVWdC5Ov 1fgMsBJHqzEl0e4GhEkG5HsUP2JhPFnvIR6T5lr1yrFaVUeL+Hb00CC1gF8+PHJRBvEw mgsAMPIjBk+QBcgqM3hXh64FOitGmm0UdVe2rpAGELldz2UQRXnr2a3B+3vzRWCYJ6BH FJTpgdmIthgrzVEfZAqGVcK9d3BcXUSi60izGsyctfreWVI3JmtE5ssLOyskyECB6HI/ kSRv4S8GBljNOqf0FmSx3k3qGGhY3X25YbAiLlr0PTD/UXMLDfwG5NvvWgGqyFp9ki/s MVhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tBcvJyPL; 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 k12si24949883plt.571.2017.11.27.15.10.34; Mon, 27 Nov 2017 15:10:45 -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=tBcvJyPL; 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 S1753166AbdK0XIc (ORCPT + 78 others); Mon, 27 Nov 2017 18:08:32 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33170 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbdK0XIa (ORCPT ); Mon, 27 Nov 2017 18:08:30 -0500 Received: by mail-lf0-f65.google.com with SMTP id x68so34781132lff.0 for ; Mon, 27 Nov 2017 15:08:30 -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=3dG5ml4sRF7XVZdHlA6p94L3YWk580fYWfI9dd6BGJY=; b=tBcvJyPLUI3vxVAcHHEjQp88cjZBIlddoLhOLb6xlWBD8HD+Je1eggGl/VkN7No5ek 3pSGjfJESYnI3zs5hKGtJAeR4ahD2RIfzz0xN05AOKzKSmrBvCLa/tJ/l1jiNgH23iKg GedrKUara4DNtSO3oGMcs08wPp6t6ZOwYqddnUnmynrVOobxzM8zbnVPDbZCN2pt+zKy iKaEYym1xcfuQdpaOj/YvDygrp+ySrZ9tK0RcBCmdczsc9aKKPY4di6tRhQG2SL/VWyC eMtd/OgjHTv7Px5WItq/6GJytyOwrI21zBFNSTFmuWGGdSW0IZBNm5MNsVuao+n4zEvt vRcA== 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=3dG5ml4sRF7XVZdHlA6p94L3YWk580fYWfI9dd6BGJY=; b=bGHbUkJrYNq0/y2Xw8iVP3JMHhlUoOzUyJRIXnotdBSclTApY17dzMmOP5rAGsDWVx XgLtmpQgS/048AIJ+P3aAadbuFfgKKA/l2Ifc4+1mf4XKPnjhyJBwSxnhqEPxarabp6v ff/iZiVr+q6UyTmhgYlyGbsoetdISgFG7VPGKCnGrfvAlrpb3WNV7Tn48TrFsKr3AnVY gfe3wMjBTIQgSLo450Z1CsMYpFPNeM07Zabsc+RkUiBr1gbk7n2H64iadMZGv18ocoq7 8hRM1dsEZOLcVB14yHoPd6Ya6wUUJwxHR/MHjBnNTmuwa+D+BY4kF7eNwfbQuh2oqo2N AP7w== X-Gm-Message-State: AJaThX4jB/3wAdNItnAaza9uyKZjfOvXyGfo0MJoAYo0WaQgMUC0zEBs ZDZH51Atc1+B6SlPEukb680= X-Received: by 10.25.100.18 with SMTP id y18mr12145082lfb.187.1511824109564; Mon, 27 Nov 2017 15:08:29 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id q24sm6274113lja.9.2017.11.27.15.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 15:08:28 -0800 (PST) From: Vasyl Gomonovych To: vbabka@suse.cz, akpm@linux-foundation.org, mhocko@suse.com, gregkh@linuxfoundation.org, tglx@linutronix.de, vinmenon@codeaurora.org, guptap@codeaurora.org, linux-mm@kvack.org Cc: gomonovych@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH] mm/page_owner: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 00:08:21 +0100 Message-Id: <1511824101-9597-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: mm/page_owner.c:639: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 --- mm/page_owner.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 4f44b95b9d1e..79ae586d1bce 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -636,9 +636,7 @@ static int __init pageowner_init(void) dentry = debugfs_create_file("page_owner", S_IRUSR, NULL, NULL, &proc_page_owner_operations); - if (IS_ERR(dentry)) - return PTR_ERR(dentry); - return 0; + return PTR_ERR_OR_ZERO(dentry); } late_initcall(pageowner_init) -- 1.9.1 From 1585295349015824444@xxx Tue Nov 28 07:50:58 +0000 2017 X-GM-THRID: 1585295349015824444 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread