From patchwork Mon Mar 22 10:33:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406092 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3444825jai; Mon, 22 Mar 2021 03:34:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqQgnworRxt6JapEffge2WcGp2XxJQsPQm/i+XSJ+VpUVmH3HAXC4IIF/Eh7t+lx14RtvR X-Received: by 2002:aa7:c456:: with SMTP id n22mr24501743edr.277.1616409253739; Mon, 22 Mar 2021 03:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616409253; cv=none; d=google.com; s=arc-20160816; b=GI/eFcW3S0K1CneJgvyhGJznzac5kn2sf2DkMrBNlq+cZR14vtIyde9S9upNGIG0TV uNOzOhUtmFVxVk5wB3Pj9nV1ORC3Wxll6adKBQb4E7AQmjT8Mh0nbE8LyjJvOFsB9OaC a4Fw5J9VX4QYKi/XVwZJN92M4nwCDF9Zb1Z6YlfaFlHYwhyhH3XjuZ32A9UF8Va/uVGX bKFsKIHrTJ4QGWnjIDUdy9bnnwCoh031TmVS/1tXcgOOdfZqFAFbM1+PyIe5fN7cs0Ss SC4D8K02SV25ZmbQbSRI4ioqZ1KSPv+5Ou6ECQT7zHxCIt0vJWxFQ4c9/bJwXLHD9jEM jCXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=P+TZK6NH1P8V9K6qrPohQBBLYK9XMwPkiAGiL1ct850=; b=PJkmiGRc9n53tC8leWrqwqJIIbMZGF3rEJXLew+ttatSjIBkwi7/yJsPYTGl3ax+Q/ rTxepvHhAYBgrOhzxMiToeFxUuUWFurHowzgX08GQnaGxOB+0AQE4YC5o8sV2PA7rLtZ Cf3N35QN/5qmwViIku34g2VvNPZf7LsMxfalQCNhDRKBoJPVFC3UCBktxxY/SS4gLC97 PprvUdGakIOpXyIIKaNoWE4EQMkRnIzsN+4o0QLyTr7qvHCvVhCON6MXfOgXqCM2+fic Cn9HaHq0N6ObnaAvrFsRXISIfQAxbszB6/mzOZH7pGbZol+ass5cA9Jdbqw8wVGHRfyW SssQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kBmOtUx/"; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si11267702ejc.452.2021.03.22.03.34.13 for ; Mon, 22 Mar 2021 03:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kBmOtUx/"; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230053AbhCVKdn (ORCPT ); Mon, 22 Mar 2021 06:33:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:53308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbhCVKdV (ORCPT ); Mon, 22 Mar 2021 06:33:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A09BD6198F; Mon, 22 Mar 2021 10:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616409200; bh=vZjZtledyBAVNYPa/uqVGJzLjOm1nITjZZwPfO5QG8Q=; h=From:To:Cc:Subject:Date:From; b=kBmOtUx/qz6G4Z3dw8K5DJzeIoKlbR3KOr2I3wslkgxmczjIl1UecUakBjd8ji1ES QG/W8iXptL4U0ItCHqpeozcpe7EQaO/jr+FTu5uePZFRD78b/I3RmOM7+sDcOB/FXe pa/YYRcX16y7ttaeVm573bcNUJ5rvuRqIBQ48bwT9xiuMoY2SykumIBTgbZvcwLP5x djH1ROo9SckeSZRcJxdE/hcBbEWQceCkBwaLMUJ6AtvBZq+uu7TdEPX/21Zv5xEeaY rMaATyOqebJR7gy6RNThzCGmze2q9gONaRBY8B8x8CmoE2mgRCOBqCJxpyDVNLFQVu V3bdduYV/LUgA== From: Arnd Bergmann To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mvsas: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:33:09 +0100 Message-Id: <20210322103316.620694-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arnd Bergmann Building with 'make W=1' shows a few harmless -Wempty-body warning for the mvsas driver: drivers/scsi/mvsas/mv_94xx.c: In function 'mvs_94xx_phy_reset': drivers/scsi/mvsas/mv_94xx.c:278:63: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 278 | mv_dprintk("phy hard reset failed.\n"); | ^ drivers/scsi/mvsas/mv_sas.c: In function 'mvs_task_prep': drivers/scsi/mvsas/mv_sas.c:723:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 723 | SAS_ADDR(dev->sas_addr)); | ^ Change the empty dprintk() macros to no_printk(), which avoids this warning and adds format string checking. Signed-off-by: Arnd Bergmann --- drivers/scsi/mvsas/mv_sas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h index 327fdd5ee962..8ff976c9967e 100644 --- a/drivers/scsi/mvsas/mv_sas.h +++ b/drivers/scsi/mvsas/mv_sas.h @@ -40,7 +40,7 @@ #define mv_dprintk(format, arg...) \ printk(KERN_DEBUG"%s %d:" format, __FILE__, __LINE__, ## arg) #else -#define mv_dprintk(format, arg...) +#define mv_dprintk(format, arg...) no_printk(format, ## arg) #endif #define MV_MAX_U32 0xffffffff