From patchwork Fri Feb 28 02:12:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11411397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AA67138D for ; Fri, 28 Feb 2020 02:12:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A171246A0 for ; Fri, 28 Feb 2020 02:12:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="qfDTCOc9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730442AbgB1CMZ (ORCPT ); Thu, 27 Feb 2020 21:12:25 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:43598 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730343AbgB1CMZ (ORCPT ); Thu, 27 Feb 2020 21:12:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=rUbHo/iSA4OojiqqN3boyQPCM+9w5ozJWmrKCLdqwUA=; b=qfDTCOc9M7tFOsEWaCkVpeIFQT S6Z7WjOM//7VMGPstpuv6B4OBj2C3dvs5elNLcPyCr8Fzv7joMnAN29RnuOUGrlIxlw6p1cD4I4Dj 88mPIIacDn7+eoIWzXJ8imeQ2nXy84Je0c4nNnwupnnqT89R93eZyLVREd/GJOWE2R1J+3gSyaKuU UoqUzJtKJK4qxuAMD8uslp7DJ8j4LwpDJ56dAx6/0RLO0HHeJI/hsIH5Qddv553G3E7IFlPkDyXL2 rGcIs3N+oiBfefR96aUMS58YUinqCWPFb9MCfbzWnZ/F1gN8sHRH9Q62NDv3ne99900liJoueTUxa W7Xq/Rdw==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7V8Z-00075q-MN; Fri, 28 Feb 2020 02:12:23 +0000 To: linux-scsi Cc: Sathya Prakash , Chaitra P B , Suganath Prabu Subramani , MPT-FusionLinux.pdl@broadcom.com, "Martin K. Petersen" , "James E.J. Bottomley" From: Randy Dunlap Subject: [PATCH] fusion: fix if-statement empty body warning Message-ID: Date: Thu, 27 Feb 2020 18:12:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Randy Dunlap When driver debugging is not enabled, make the debug print macros be empty do-while loops. This fixes a gcc warning when -Wextra is set: ../drivers/message/fusion/mptlan.c:266:39: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] I have verified that there is no object code change (with gcc 7.5.0). Signed-off-by: Randy Dunlap Cc: Sathya Prakash Cc: Chaitra P B Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Reviewed-by: Bart van Assche --- drivers/message/fusion/mptlan.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20200225.orig/drivers/message/fusion/mptlan.h +++ linux-next-20200225/drivers/message/fusion/mptlan.h @@ -111,13 +111,13 @@ MODULE_DESCRIPTION(LANAME); #ifdef MPT_LAN_IO_DEBUG #define dioprintk(x) printk x #else -#define dioprintk(x) +#define dioprintk(x) do {} while (0) #endif #ifdef MPT_LAN_DEBUG #define dlprintk(x) printk x #else -#define dlprintk(x) +#define dlprintk(x) do {} while (0) #endif #define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)netdev_priv(d))