From patchwork Thu Jun 7 20:05:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 10453481 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C81560146 for ; Thu, 7 Jun 2018 20:05:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C9E32877F for ; Thu, 7 Jun 2018 20:05:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70A4C28797; Thu, 7 Jun 2018 20:05:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FC262877F for ; Thu, 7 Jun 2018 20:05:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753014AbeFGUFT (ORCPT ); Thu, 7 Jun 2018 16:05:19 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55041 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbeFGUFS (ORCPT ); Thu, 7 Jun 2018 16:05:18 -0400 Received: by mail-wm0-f66.google.com with SMTP id o13-v6so20085979wmf.4 for ; Thu, 07 Jun 2018 13:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gX4JavC5r+wDie0MzJp42r8v3Y1P9ZA0tiR4xFkF+e8=; b=mAj6/ja2AtSEh5yklYKMkNCZ3YmeeeR2Z+wa5kehRwtlzkLc+tKUi4Fx6fWJmEWnHQ Zm6X5fheGYOhQQZSqbLr2TCx/JwxsuTxrJkEJIhJ09LKHXquFgL6ncstRY6bcp5XgDdc tVfU0Od3BYcAOUjw6F89MDh9FF3bcrNgnEfrZGEWvLRNBDotJ3x2KKbt4Ur8xPAaRGY0 GHuogzBnmQqwntRVzmRgLjgJCutTgudB1mM4rmHXPvtfjJkNXW/6hWx3Gk8B+s3Ceczn F1y5q2Ffiui9ZROno6+/8omjv9OnBD31I/zz5/0UsdXR9vSHDxhOyWTrS9w7R45nRFci LzoQ== 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:mime-version :content-transfer-encoding; bh=gX4JavC5r+wDie0MzJp42r8v3Y1P9ZA0tiR4xFkF+e8=; b=XEVYgtSXh+/U88nKokgeUVmlPvENOA4zruiw15HZs9Clv5KcIEHkf+oDxt6MKp/IH0 KHEsJ33JgYEs+UUujZD4NcbbXNTkAhNUOrd1FONjyJY6NpNsSd8AkKBQ0yLnfl6tc+9p r2LYwqut7vpGb3x4Yq89IzYcApEGF70ujooRmqY2U1pIZCFJkC8fBh/5KIHBeyR9P8SD /c4z03ajFVJaDJrOFzVKRUDC4wjNA8Mpcw3wI/zCxchFMGd9E32pa20dIe5R7R/sH6Ua A3scKN7I30bism9sF8dNtxoGGcFkPO0z/L3uE6QFVnqBavZcgxWeERhnBmGi/PA+DcMs j9ZA== X-Gm-Message-State: APt69E1QFTVuWOpHo3ioES4AEApHdwxcr8gj/CsS2EtI4u0fZyuIOLSQ Z/jmcNHihwurWMlL8Kog7A50cw== X-Google-Smtp-Source: ADUXVKJ9TVTFBSbt0gCaDq7wd39wFHhr/vRxtsm72P2u/mfFhhdd9bjaJvEhc+uHzRvLikVrGctdyQ== X-Received: by 2002:a1c:9947:: with SMTP id b68-v6mr2480187wme.159.1528401917257; Thu, 07 Jun 2018 13:05:17 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id i46-v6sm58394573wra.36.2018.06.07.13.05.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jun 2018 13:05:16 -0700 (PDT) From: Corentin Labbe To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Corentin Labbe Subject: [PATCH] usb: Replace empty define with do while Date: Thu, 7 Jun 2018 20:05:11 +0000 Message-Id: <1528401911-5263-1-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's dangerous to use empty code define. Furthermore it lead to the following warning: "suggest braces around empty body in an « else » statement" So let's replace emptyness by "do {} while(0)" Signed-off-by: Corentin Labbe --- drivers/usb/host/ehci.h | 2 +- drivers/usb/host/fotg210.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index c8e9a48e1d51..a60d91eac771 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -237,7 +237,7 @@ struct ehci_hcd { /* one per controller */ struct ehci_stats stats; # define COUNT(x) ((x)++) #else -# define COUNT(x) +# define COUNT(x) do {} while (0) #endif /* debug files */ diff --git a/drivers/usb/host/fotg210.h b/drivers/usb/host/fotg210.h index 7fcd785c7bc8..dca46d04e288 100644 --- a/drivers/usb/host/fotg210.h +++ b/drivers/usb/host/fotg210.h @@ -179,7 +179,7 @@ struct fotg210_hcd { /* one per controller */ struct fotg210_stats stats; # define COUNT(x) ((x)++) #else -# define COUNT(x) +# define COUNT(x) do {} while (0) #endif /* debug files */