Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbaGMB10 (ORCPT ); Sat, 12 Jul 2014 21:27:26 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:45558 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbaGMB1X (ORCPT ); Sat, 12 Jul 2014 21:27:23 -0400 From: Jeremiah Mahler To: Lidza Louina Cc: Mark Hounschell , Greg Kroah-Hartman , driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jeremiah Mahler Subject: [PATCH] dgnc: DGNC_VERIFY_BOARD macro in do while block Date: Sat, 12 Jul 2014 18:26:39 -0700 Message-Id: <1405214799-2189-1-git-send-email-jmmahler@gmail.com> X-Mailer: git-send-email 2.0.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enclose the body of the multi-statement DGNC_VERIFY_BOARD macro inside a do - while block as per Documentation/CodingStyle. Fixes 1 error found by checkpatch.pl. Signed-off-by: Jeremiah Mahler --- drivers/staging/dgnc/dgnc_sysfs.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c index 0f0e8fc..3f321bb 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.c +++ b/drivers/staging/dgnc/dgnc_sysfs.c @@ -150,15 +150,17 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver) } -#define DGNC_VERIFY_BOARD(p, bd) \ - if (!p) \ - return 0; \ - \ - bd = dev_get_drvdata(p); \ - if (!bd || bd->magic != DGNC_BOARD_MAGIC) \ - return 0; \ - if (bd->state != BOARD_READY) \ - return 0; \ +#define DGNC_VERIFY_BOARD(p, bd) \ + do { \ + if (!p) \ + return 0; \ + \ + bd = dev_get_drvdata(p); \ + if (!bd || bd->magic != DGNC_BOARD_MAGIC) \ + return 0; \ + if (bd->state != BOARD_READY) \ + return 0; \ + } while (0) -- 2.0.1 -- 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/