Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6200632imm; Mon, 27 Aug 2018 11:26:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYTmHUHMSVjHwht6XXQ4tD6qGlePv3UJq6RVfmqpQoID4FSULeJwJNtcKsI1MTK21iBN4VL X-Received: by 2002:a62:be03:: with SMTP id l3-v6mr15495373pff.138.1535394399432; Mon, 27 Aug 2018 11:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535394399; cv=none; d=google.com; s=arc-20160816; b=gfSIF7egHDq9/pBXhFOTnjQuBS1oXAwMWxo0fftIeY6F1C+p7IybrwWUH8AJDGTseM t0kWYBB3KCZtzdtm51Lr73InCJq7C3YljLkmWVD5WgS97Sg9S7j9Eupg/G3nx3BqgBDH XXlmNDaUdCVUpLuFawroBr116V6COJM4c6tdFQrZzXV6xuXXNyNzndCBIxOV91rt9YeA DuB4vCy3yQw+/N8sBUh0tFvgqKs/P9NtxUMpCKlV78v1f56Y6qfrQPWTUoNkH2MvlOhN WgAdH+7+gg+VHEyOz4iyVP10Z42PfV4sKgXOPPI7j8wRYXQIlrnx1xasbV+UFX7uWEiM AqlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature :arc-authentication-results; bh=qiR+aV04VDZgHPqBcLzThwMgV6gYV1rIQHb2C6nrdP0=; b=JHuA0fzYvZarLEywxJQRFFwLecc8uW4UOR1MSfzgsawFQSGFq01KIZT+PS/WrBhYVK XynQ0v9rFnMv3fpTKnbBCAUwMHxFMXFSLRrHExTufHO6Q+hXEgeQg0sQiDwp3Q78u+xe HgDKCUcR0bNTm42xmO6aaJy07j53L1daroxtamCp78lCQSVdJdCaMWpywRmyJv6pq8rq Kj6ww3Jb057p3YST3tvelHCAJgiK4geQbahYi5YY3EiE803ZPhKsbJGAjvXJZXERMhQL 9+lSXsaDU1FGZqKtH/We3mKf6oWbzRHG1+ZXGFPu3FsCRTjgy9nWIgVj2EkAL6X2LLY9 6hnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=GbWyQvg8; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 90-v6si15153627pla.466.2018.08.27.11.26.23; Mon, 27 Aug 2018 11:26:39 -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=@google.com header.s=20161025 header.b=GbWyQvg8; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727943AbeH0WMQ (ORCPT + 99 others); Mon, 27 Aug 2018 18:12:16 -0400 Received: from mail-pf1-f201.google.com ([209.85.210.201]:47237 "EHLO mail-pf1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbeH0WMO (ORCPT ); Mon, 27 Aug 2018 18:12:14 -0400 Received: by mail-pf1-f201.google.com with SMTP id w19-v6so10248330pfa.14 for ; Mon, 27 Aug 2018 11:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=qiR+aV04VDZgHPqBcLzThwMgV6gYV1rIQHb2C6nrdP0=; b=GbWyQvg84J+rS5O5dSvRYhyqELgPD6inEtyZynmXdFIsKi19TKi2mlh84fK6HLzRxn AADvOYredA60qsvVETVf2wjI9ny46JIju5kzspSxiR6RLg9VdnoFf0ufSW6nJOIrcfAv HM36+xasFFkMKPVcOzxtJD2o+8ohPQVrkPHPxJ8lXTo9/gtW/YWWMG4ClzFS2BB1UfEM hIluiow+iKhi6FOU7Tsqkd8H3tzWMG497b+geeVU4eymTFQWiQ/BAKLDkurLkRqgqamA xFp1L5SgE+hLPr4uRMrExyBcx3h5x2uN8zzoE8u2UdU7fcSgMXLL0kgWKdsP/Vu9PNfK 6rjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=qiR+aV04VDZgHPqBcLzThwMgV6gYV1rIQHb2C6nrdP0=; b=A3Y+8AZ9bvqHBAI4lYc7THyNz9Gkb1ZXJukwKNCjrV6h/cmvnULI2zH454VHWvddnm +quF6DDsctGt31F+bIDyEYxkiLNq/WMf+VrkYv7x3E37bVhBTg1fmCkGT0LewhEBIOt4 7ZG5B0pPoskRyl/8coN5AZ2AFjpI54FPuiYlK//NJECd5TOsK3sYsUN1s3nO7Detlkzy jCJPJGPmxRd20Nhusvi0Dmruc9oahau/ulOUUoJ0efVt1Xfa8bTbaNIvh17YuUw5c+if Js8x2b9x7a4XP5wnTZUeGUeu1c+VEUYaXYiaRQxtnBhQ8qnWE10a+M7SzAMrcHB6XW65 kJ4g== X-Gm-Message-State: APzg51BjnboS9Fp9u8xolvqRF8PpVQm98CQlx0ZCEGpS8y4aH/jRUvDw Y0T1sE+3/0JmFUq7UM0gVZgv4I3a X-Received: by 2002:a63:b448:: with SMTP id n8-v6mr1358187pgu.87.1535394272875; Mon, 27 Aug 2018 11:24:32 -0700 (PDT) Date: Mon, 27 Aug 2018 11:23:15 -0700 In-Reply-To: <20180827182315.126345-1-rkir@google.com> Message-Id: <20180827182315.126345-20-rkir@google.com> Mime-Version: 1.0 References: <20180827182315.126345-1-rkir@google.com> X-Mailer: git-send-email 2.19.0.rc0.228.g281dcd1b4d0-goog Subject: [PATCH 20/20] platform: goldfish: pipe: Replace "x==NULL" to "!x" From: rkir@google.com To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, tkjos@google.com, Roman Kiryanov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roman Kiryanov checkpatch: Comparison to NULL could be written "!x" Signed-off-by: Roman Kiryanov --- drivers/platform/goldfish/goldfish_pipe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index c892a0447a81..b4a484bbcdaa 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -699,7 +699,7 @@ static int goldfish_pipe_open(struct inode *inode, struct file *file) /* Allocate new pipe kernel object */ struct goldfish_pipe *pipe = kzalloc(sizeof(*pipe), GFP_KERNEL); - if (pipe == NULL) + if (!pipe) return -ENOMEM; pipe->dev = dev; @@ -865,23 +865,23 @@ static int goldfish_pipe_probe(struct platform_device *pdev) struct goldfish_pipe_dev *dev = &goldfish_pipe_dev; /* not thread safe, but this should not happen */ - WARN_ON(dev->base != NULL); + WARN_ON(dev->base); spin_lock_init(&dev->lock); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (r == NULL || resource_size(r) < PAGE_SIZE) { + if (!r || resource_size(r) < PAGE_SIZE) { dev_err(&pdev->dev, "can't allocate i/o page\n"); return -EINVAL; } dev->base = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE); - if (dev->base == NULL) { + if (!dev->base) { dev_err(&pdev->dev, "ioremap failed\n"); return -EINVAL; } r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (r == NULL) { + if (!r) { err = -EINVAL; goto error; } -- 2.19.0.rc0.228.g281dcd1b4d0-goog