Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753803AbbKQM5S (ORCPT ); Tue, 17 Nov 2015 07:57:18 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37690 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753596AbbKQM4f (ORCPT ); Tue, 17 Nov 2015 07:56:35 -0500 Date: Tue, 17 Nov 2015 13:56:31 +0100 From: Christian Colic To: gregkh@linuxfoundation.org, carlos@cgarcia.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: fwserial: (coding-style) rewrite comparisons to NULL as "!fifo->data" Message-ID: <20151117125631.GA18570@lenovo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2015-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1876 Lines: 65 Rewrite multiple comparisons to NULL as "!fifo->data" to fix the last coding style problems of this file. Signed-off-by: Christian Colic --- drivers/staging/fwserial/dma_fifo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/fwserial/dma_fifo.c b/drivers/staging/fwserial/dma_fifo.c index 7a3347c..4cd3ed3 100644 --- a/drivers/staging/fwserial/dma_fifo.c +++ b/drivers/staging/fwserial/dma_fifo.c @@ -106,7 +106,7 @@ void dma_fifo_free(struct dma_fifo *fifo) { struct dma_pending *pending, *next; - if (fifo->data == NULL) + if (!fifo->data) return; list_for_each_entry_safe(pending, next, &fifo->pending, link) @@ -123,7 +123,7 @@ void dma_fifo_reset(struct dma_fifo *fifo) { struct dma_pending *pending, *next; - if (fifo->data == NULL) + if (!fifo->data) return; list_for_each_entry_safe(pending, next, &fifo->pending, link) @@ -149,7 +149,7 @@ int dma_fifo_in(struct dma_fifo *fifo, const void *src, int n) { int ofs, l; - if (fifo->data == NULL) + if (!fifo->data) return -ENOENT; if (fifo->corrupt) return -ENXIO; @@ -192,7 +192,7 @@ int dma_fifo_out_pend(struct dma_fifo *fifo, struct dma_pending *pended) { unsigned len, n, ofs, l, limit; - if (fifo->data == NULL) + if (!fifo->data) return -ENOENT; if (fifo->corrupt) return -ENXIO; @@ -252,7 +252,7 @@ int dma_fifo_out_complete(struct dma_fifo *fifo, struct dma_pending *complete) { struct dma_pending *pending, *next, *tmp; - if (fifo->data == NULL) + if (!fifo->data) return -ENOENT; if (fifo->corrupt) return -ENXIO; -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/