Received: by 10.223.164.202 with SMTP id h10csp3179913wrb; Tue, 28 Nov 2017 07:22:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMbDS9wZagRlG168T64nWdPDVoBnfecd+uzM5VdhthLs0cTvq/eRkWiywq41AUp6aC/64qHc X-Received: by 10.99.164.81 with SMTP id c17mr40251432pgp.206.1511882526666; Tue, 28 Nov 2017 07:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511882526; cv=none; d=google.com; s=arc-20160816; b=ZBlDS2xv9nFghHWQ+OS6t+959pVKEpww4BtsDxv5oIYdZcjQ7U+9G6iIng9oMjpXb8 nLbvhrJaVMmgbVxM5HhGsTyCwPqu6Sfa7MBrD4gpfN0DWfz2+LkIeDJiZ0qxuipMzTuB wVblLf5FeMfUH3KCsU95EnAMyb+YoO8f9MhmIp3QfoXRWcqBzhBI9FirX/XTzaUVfgK7 Nutm7pbnSGyUVv5/1epA39zbiiXFK1TvtTiJybtW2UOmfBRqYl5RzMen43KcvonqkJD5 fhrW5MUlePLL96EHrv9fqYViKpOaNaq5fKkT0cBwWyvQyuRDFsSted938v1cclEVdiGt TPzA== 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=4rr0LtJ09M7oRFPl3Z3WzSKYjMLQ4QaUV5k67rLWSKk=; b=fx2IoSAhnuhHPyujGwvrRhuCPBe14f2PsyAI8I+EhjP0126fFNooF/OcslrSBQr7Bh qbmlmtJVtTc+CZjK5cHANFB5/Q3eI/BmIqrKtQTshELEI/4LoVdC3ejvO12MenYq8pom IdgofcoQZcpjJuDuol9Dq8Wjt3fmdiIo35JwIszt6+37LGVA6wTTrMtOsDBzf38wYVwW bGlbTdh6kztY/UHU+4EsvZHQogo/RpMeWWGbtRynI2w9hF7yAW8GB86/xxwRhFxfGIQp AIhttbC3qexADwIo7DY3InrKWEymtutu0itUZkeg+8jL3hpMWGv7z5YRtRu/PdgArc0U uYnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XmikRqq1; 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 v3si7365903plb.385.2017.11.28.07.21.54; Tue, 28 Nov 2017 07:22:06 -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=XmikRqq1; 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 S1753274AbdK1PTd (ORCPT + 78 others); Tue, 28 Nov 2017 10:19:33 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36391 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752187AbdK1PTb (ORCPT ); Tue, 28 Nov 2017 10:19:31 -0500 Received: by mail-lf0-f67.google.com with SMTP id f20so210567lfe.3 for ; Tue, 28 Nov 2017 07:19:31 -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=4rr0LtJ09M7oRFPl3Z3WzSKYjMLQ4QaUV5k67rLWSKk=; b=XmikRqq1nRlBjgo/KGU7xxHdX6cAt6jBmnMCnNt57dXA0pxOUnnuPqsdxKCv8nw7Gi evYoiYiKSsOY94oLi8Lr86IwLQHZ/xnuerROFvNlTAfWuSmAoqLrY1kd5/AwbW+8cOHO b9R4X8jIx04039hAoZ80IXJmdip6fWducDKD7ADdmp03ijQ2fAWKrlj8rj4ECZyDz2O9 gsNhM51ZBP1Q3+0Pw/rARK7qzduGKGWTYgapF83gZCXMUo6eX5rp20hiMpg/jr2JQvBc i+YUtV2B51wv3Ign5zE+la8PZnNndjaSd8TA/h1qd3T5JrbWGPvEItYMfHiPUyoywhHm 5JWg== 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=4rr0LtJ09M7oRFPl3Z3WzSKYjMLQ4QaUV5k67rLWSKk=; b=i5rGn331mRn8+VwNHZHWaG2tSogULRfjjryrj6Kx2sWxdOdur4vN1ZlGuSt0bNYffu zrtVW//27h/4BjrVisOWEWIkraVg4n3Ar7Q3rkLkdDFx5VRmsPFJG7xDDTI0AMcfNOba pZhzR2b0OaMBWyfpW1RN3y3i01vYUvEidy+eJH83hjGdgdqh9qJBteb/yp6Q8gSAmIte KI5eQdnxgoyJiBgl8Vr5zxw9TDOdfTtA4WjLVIkGi/pdTBFs4IRENsdLQg4AeFih/ZwJ f314uizyTMFjVMxKrlKA3hnsCiLT2hPxA6bKYEGooAo7/E/RxmJ+qbRqX/a1FVBvgogB Rm5g== X-Gm-Message-State: AJaThX7oSi6FVRcsCO+MM7jfU/XIiO98w9payQUtr0QndNS7+lhDFlj1 dLxYoabdrXDq/vrnlbJQO2UHEbIY X-Received: by 10.46.66.140 with SMTP id h12mr15495331ljf.140.1511882370449; Tue, 28 Nov 2017 07:19:30 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id a15sm5824357ljb.11.2017.11.28.07.19.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Nov 2017 07:19:29 -0800 (PST) From: Vasyl Gomonovych To: sudeep.dutt@intel.com, ashutosh.dixit@intel.com, linux-kernel@vger.kernel.org Cc: gomonovych@gmail.com Subject: [PATCH] misc: mic: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 16:19:21 +0100 Message-Id: <1511882361-2413-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/misc/mic/scif/scif_epd.h:168: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/misc/mic/scif/scif_epd.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/misc/mic/scif/scif_epd.h b/drivers/misc/mic/scif/scif_epd.h index 1771d7a9b8d0..8dad98edeb56 100644 --- a/drivers/misc/mic/scif/scif_epd.h +++ b/drivers/misc/mic/scif/scif_epd.h @@ -165,9 +165,7 @@ static inline int scif_verify_epd(struct scif_endpt *ep) static inline int scif_anon_inode_getfile(scif_epd_t epd) { epd->anon = anon_inode_getfile("scif", &scif_anon_fops, NULL, 0); - if (IS_ERR(epd->anon)) - return PTR_ERR(epd->anon); - return 0; + return PTR_ERR_OR_ZERO(epd->anon); } static inline void scif_anon_inode_fput(scif_epd_t epd) -- 1.9.1 From 1585313867436523461@xxx Tue Nov 28 12:45:18 +0000 2017 X-GM-THRID: 1585306279161286911 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread