Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1774530ybi; Wed, 3 Jul 2019 23:10:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvhOEFBGNek7UXbKcVYS9q2KGHGv5I9rhQ9VVv/VpMrd1YOvv9GKYsvW5S/tzDaCc6vnzu X-Received: by 2002:a17:90a:a09:: with SMTP id o9mr17644568pjo.95.1562220623417; Wed, 03 Jul 2019 23:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562220623; cv=none; d=google.com; s=arc-20160816; b=HpJ3upzosfRwLk3zIn0/Fc0ZL4JYOx483uqt1VlUD6u0hzmskmzEYrkTjM7U5czCgd 2glR0w0ZZrrnPqtNibH7iy4FYmeqEJy2MkDrck/1+2JLPfmk7le6YW2kGvxIr8TbsbBC ite7o1YuaFDISUNvviEFuvHG5LRPZO0EilydlSOzmRv8WTtvh0AKssU+o6tESYl+iagF z3KFDuHaCWPnskSMGTwKlofe+HQyoFhg6ct4yZFWGmFDMeo+rVwR4Ir63wctnHCGRNSP tRuEQY0ENI677PkqqFhJvjngYzu9Mu6IE4d7wkqveeAv+TTd4ci86nOj/9OW+mugmXY2 kLLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zBhlBYpTN4I+Zp3YmG9RRV1m1SjWxog8Cy7vjAlL+k4=; b=gWQkq767JVIi5NTg9mf06KxrFH9VREhGOfrhHXv2/PZ7PyU6gGOX0N0CPrw84dQ3Z3 VWxrbhszW9l+KNWDqHWtphAk6Hdim34T4tcdIvzvLU61ZBlkVSOyZCU/3Fz9Z6TOraXP j2DIR/vvgt0C+JWeaMLRoQXDUPLtJeFUaHvuTPbLE224xVaX1ScCW0hLXOxWAK1iSIcW ROc+6WJAF1qfvSaR3TEA2EQYyQEtLrlsEOmGk8Dww5saIeiiU+KV9YSjkMW5FVC55KiA eMbVOECWMOq2IbwTtCAigSXOnLg4YRIdyNhvuu6IJWyQtz0RJE7rQe9Ipi80bQMaxLtW 4oKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nikanor-nu.20150623.gappssmtp.com header.s=20150623 header.b=xqZPpE+P; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j23si4423447pfh.215.2019.07.03.23.10.08; Wed, 03 Jul 2019 23:10:23 -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=@nikanor-nu.20150623.gappssmtp.com header.s=20150623 header.b=xqZPpE+P; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727322AbfGDGIX (ORCPT + 99 others); Thu, 4 Jul 2019 02:08:23 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34572 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727241AbfGDGIW (ORCPT ); Thu, 4 Jul 2019 02:08:22 -0400 Received: by mail-lj1-f194.google.com with SMTP id p17so4938139ljg.1 for ; Wed, 03 Jul 2019 23:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikanor-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zBhlBYpTN4I+Zp3YmG9RRV1m1SjWxog8Cy7vjAlL+k4=; b=xqZPpE+PwgVA2s54GRPeMXBj0Un5a7zwD9U9yhlxaRiHZ4cW2L+ecAEfyhbaqKd9cE E2DZrQSuCJ11SbBLxYR656cPgbZbDh4U+2i02YKZHPwfx8TBfkZlR1BYqAKIoVcF5dlB oRsFcN0v3VJH2aOOhW3K56vk81mOTmYiz/plNpbSLnlkg4IFFL6HvzbJ3qg8j5wndkVC H0DiJtG+vRHzouYWJY+Qc7p1utZgrlhKNhsXw1+36ztEOUi3h/dFdHZCUsalAjbTIfPh o2GOItYjSQ7+f73xDnRuVpJyVi+guPIx9OC1EfJsNZjnd3Af/Qs0fP2GxBap75A3Vydb kBJA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=zBhlBYpTN4I+Zp3YmG9RRV1m1SjWxog8Cy7vjAlL+k4=; b=jc1gWj4wZr8pB6fiEXnifdhjNEl4g2t4P7NWBmINmM5oaAZSNWXLfHMZPyOrrPSe9G P84u88/ABACS9sGx/BrSpAsbidEr6oeB5eBvF7WRqL9aF/y6JXPSw/oKO6HVwO2hC/oY /ESWLeFdNgVoo5LxMXPOaTZ/7FMBIVFvAJ2pEp8nHzBX+2GvLpVOvQHc/V7WLTbRUHZn /l+2ExP+IAiePk+XGCmx8fh79D9W37IqnMcNK20KB4Oa5E9qTJecnHpKpINAZZXLEf85 eHdevZba+UdvJ7klw2yr3d08in3e4hBPqdrgtuC9g0k62pQXolNFQJEi2mq88yh8+LiB UTpw== X-Gm-Message-State: APjAAAVq32RBSsxTekJ79qnuEeuR8EuhAX3nqLNpnZzAowLztFn/Cew7 /AX88WYAaAv8DLEMqbwIg7hRLw== X-Received: by 2002:a2e:8007:: with SMTP id j7mr8791384ljg.191.1562220500948; Wed, 03 Jul 2019 23:08:20 -0700 (PDT) Received: from dev.nikanor.nu (78-72-133-4-no161.tbcn.telia.com. [78.72.133.4]) by smtp.gmail.com with ESMTPSA id b4sm710440lfp.33.2019.07.03.23.08.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 23:08:20 -0700 (PDT) From: =?UTF-8?q?Simon=20Sandstr=C3=B6m?= To: gregkh@linuxfoundation.org Cc: gneukum1@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Simon=20Sandstr=C3=B6m?= Subject: [PATCH 2/3] staging: kpc2000: simplify comparison to NULL in dma.c Date: Thu, 4 Jul 2019 08:08:10 +0200 Message-Id: <20190704060811.10330-3-simon@nikanor.nu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190704060811.10330-1-simon@nikanor.nu> References: <20190704060811.10330-1-simon@nikanor.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström --- drivers/staging/kpc2000/kpc_dma/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/dma.c b/drivers/staging/kpc2000/kpc_dma/dma.c index 8092d0cf4a4a..51a4dd534a0d 100644 --- a/drivers/staging/kpc2000/kpc_dma/dma.c +++ b/drivers/staging/kpc2000/kpc_dma/dma.c @@ -119,7 +119,7 @@ int setup_dma_engine(struct kpc_dma_device *eng, u32 desc_cnt) cur = eng->desc_pool_first; for (i = 1 ; i < eng->desc_pool_cnt ; i++) { next = dma_pool_alloc(eng->desc_pool, GFP_KERNEL | GFP_DMA, &next_handle); - if (next == NULL) + if (!next) goto done_alloc; clear_desc(next); @@ -245,7 +245,7 @@ int count_descriptors_available(struct kpc_dma_device *eng) void clear_desc(struct kpc_dma_descriptor *desc) { - if (desc == NULL) + if (!desc) return; desc->DescByteCount = 0; desc->DescStatusErrorFlags = 0; -- 2.20.1