Received: by 10.223.164.202 with SMTP id h10csp2302665wrb; Mon, 27 Nov 2017 15:10:23 -0800 (PST) X-Google-Smtp-Source: AGs4zMYZkWjbLyzrHtrQWifLC9/2C07y0W59mLcEqNrEP/QHotC4jYJ1nOYOpg/uYCjD20TImBwf X-Received: by 10.84.169.1 with SMTP id g1mr5745586plb.134.1511824223141; Mon, 27 Nov 2017 15:10:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511824223; cv=none; d=google.com; s=arc-20160816; b=gcl1GkVlUTkL6VBhJzQQr0fN7+Eb5U64jgeg23gQHdw+XWjgtEy8PPWdtv6c1ZaAlo uY6UoxodHZYjBIdQl+cwlB0a6LxsfDsW3Rtb60IhB+FCJH9uZ7ExtkQl/rjLBkFsphn0 ZY8lflPlYcbAqBumuk4OaLXtACQ0XZ5DxYUSyein5o6NRU+9g5BkziI+UrWCwuE33tST c9G84Ic5y8QB3OCM2JTUj3i8ZEceJc+cUeKhvS/BVJqvH+O5y7pP5JOk9O4+qYPQ+7S4 g1A8N1SJolemU4Nqg7aEon2Ls7moEZUMvopfJ6zngeMjGdTuCTwRfYHuazm0iPQkJbUL 9InQ== 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=RSGy5dQKiwzUakl8og5mo/8fuMkcAJglC+eK87Ot6uY=; b=yLVbhS04nT5BYL01j1Ehc8EEfpmjyDqFkHDd8/ehYj16PeFLIjJsAdQk482zTgN7fO ij/2dhyrVAZaukZSZNh3aF5dQrFeCc3XrscAF9x5teqsW9Vs6iP66g+web0MGQAQlWv3 7z9Y5R98UNvxggA5kojyuFO97pHDM6uFfhriX68mRtuZtK3tMrdTydEL5SnJKr2nyH8o blEKBiWW5V94f91t9TOI5UM6vnlenw49RH98GHt4v7mwTDpIoS/pEdmuJ0Pqnmk30GFB VwjRRXTXoGg+8dpWCO8RhmDJxRtj7A3wBm9mZLVGr72ac0H4sz2Qk5sz08LibHn6Uio7 Td8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QmUYjFQV; 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 l3si23517405pgs.302.2017.11.27.15.10.10; Mon, 27 Nov 2017 15:10:23 -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=QmUYjFQV; 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 S1752962AbdK0XJg (ORCPT + 78 others); Mon, 27 Nov 2017 18:09:36 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36834 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbdK0XJe (ORCPT ); Mon, 27 Nov 2017 18:09:34 -0500 Received: by mail-lf0-f66.google.com with SMTP id k66so34758360lfg.3; Mon, 27 Nov 2017 15:09:33 -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=RSGy5dQKiwzUakl8og5mo/8fuMkcAJglC+eK87Ot6uY=; b=QmUYjFQVtnvazh2sRnoSczdNB46Zt6b6Ydeglap4BNN5XDHZ6beM1S0RxE8d+4qpY2 ZvPw8jVSJzqJwL1orBjWbegBjwvkgJOO1mEphdLnYzn7hlZ0e94mc41dCzrORGUk3P0a n/OjxIt/F0vkpLLj/ctDv7kNobkZcsLNn66AdoqNyWq6rZ3ustQdSyAdGFH0oF2n6UOk 4XxDjcad/5VMPayOBPI3uN3I3xPUHemIqp6RP1nbPr0qXDaqiaGhUWeiwBcLf1dvsJVw bAUyfLYmLZhq3KjBxpDtn/JVs5TXwzp64BdURIp967YTvPhi/cEApGXnhIpEzP8w10dv teZQ== 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=RSGy5dQKiwzUakl8og5mo/8fuMkcAJglC+eK87Ot6uY=; b=F+KtcsWv3557mlzjAGnLf2iP+sGSpJYj3eDdZdtlUrsHDhOzvkHXDnyMrL5PKMC2jX yNMC3++7su4bAg3sWBd86d34ZkjLMsc1zVsPIYyUhRdFFKkEdHce3y3umk0glkPQ29Gy kNrKq/uRHiGmL+ToltjEhunDUzheOUGU/98BINE2Xt521AUkrL4H1BN5TpkcFFg1H98l 9WXgbwcDWsOMVbVQC0PmmwsCOkIVh9mDEni7gOxA4J08rQeOGSjRUv6H7D9cQ6PpYHRJ 92+GudLXqnXTbj2wnPNkT5NAIbUxyBW7b+QBXJ9ycfcA/0fduwFmoj9iNDlun9MGv1Lv +Cow== X-Gm-Message-State: AJaThX4tdEJT71QfUuZ/ET0pEj+zBEzdMbSs94OLT4/SJz6xxsaYHoxd FuAzYSf9IGIiLc0llvAem4E= X-Received: by 10.25.201.83 with SMTP id z80mr10007638lff.181.1511824173234; Mon, 27 Nov 2017 15:09:33 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id j8sm2349267lje.83.2017.11.27.15.09.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 15:09:32 -0800 (PST) From: Vasyl Gomonovych To: miklos@szeredi.hu, linux-unionfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] ovl: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 00:09:23 +0100 Message-Id: <1511824163-10931-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: fs/overlayfs/overlayfs.h:179:11-17: 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 --- fs/overlayfs/overlayfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index d9a0edd4e57e..b82e463d89d5 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -176,7 +176,7 @@ static inline int ovl_do_whiteout(struct inode *dir, struct dentry *dentry) static inline struct dentry *ovl_do_tmpfile(struct dentry *dentry, umode_t mode) { struct dentry *ret = vfs_tmpfile(dentry, mode, 0); - int err = IS_ERR(ret) ? PTR_ERR(ret) : 0; + int err = PTR_ERR_OR_ZERO(ret); pr_debug("tmpfile(%pd2, 0%o) = %i\n", dentry, mode, err); return ret; -- 1.9.1 From 1585184959781373863@xxx Mon Nov 27 02:36:22 +0000 2017 X-GM-THRID: 1585184959781373863 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread