From patchwork Mon Mar 22 10:25:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406090 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3440109jai; Mon, 22 Mar 2021 03:26:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2Vwsd6hGgvbRT9gqYG4coW2teQ7lXz6Z4WdkWmjMNJihpSYP+G6TRBfhOiA3gAQ3MAmDw X-Received: by 2002:a17:906:3b99:: with SMTP id u25mr18355129ejf.277.1616408803805; Mon, 22 Mar 2021 03:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616408803; cv=none; d=google.com; s=arc-20160816; b=mhCuMf/Jvrbxn1/fHRyWDFS1bOeLPzHF+mQsVY8rcudddWv87qxHLd6awF5NKUHdxq N8YDX6WX1rzL/BSuSfea7Dlzkv+xRwZbT0BRV2TgfguuxM0Sn4DwCJ+PInr2KRMI/VsS 4k2tuTqJVazhjGqo/bY/0MrZz7lsr9dfX+c1H2xsUaFcHZITEISTbs4XuMnkVtYMjNSJ 24azr9ar1kn2/xWQDeaZxTAwVHHNo1CbqL65d+aSd22qai7oqe2ILi/D8TJi4+Tm3Yk/ L5iDzYo1zi4qUTaIwaGr3Ap1t2u+s+LhG4uyOPLuheBPH1NFPqlT13rmVCcVn5Iszjzk bC9w== 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=KjvpcILQ8s1tVb0pR+K8YfufcZzwf0Wtladg5Gvo9LI=; b=W38RykTmWMVvBOs8tIPqIcdIUYO/crOzvZ3wrDQZ2mfGAyvw6yFjQ5UZkf7uGmRZ8o ET0IxLLiqs+MEk0hRvEaP4CaVPl1VgKiqsMHS085A9PyocB86myuinpY+mvw77mR/+qc f1N3yB26vVaXY5X2MgMksKAQIQjc2/4NAao4hb0Si8ql2DowDEutyyzZl/1lwk08h65Q rb2T47lCr3q2+ZPVzAsQhGjhWIJ8VLawqTPxJiKvpDmb3O8JNBeQ5lSfzqncuqiCWk3+ x9A9TbfF2TY2isqDEeZfb+3SHS+RbAOlg/hv2VwC3XPO7bOudKqMTetUOKfjc0ulntCU FM1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PDkoQjr9; 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 n6si10726180edq.597.2021.03.22.03.26.43 for ; Mon, 22 Mar 2021 03:26:43 -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=PDkoQjr9; 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 S230087AbhCVK0L (ORCPT ); Mon, 22 Mar 2021 06:26:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:51068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbhCVKZx (ORCPT ); Mon, 22 Mar 2021 06:25:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5348B6198E; Mon, 22 Mar 2021 10:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616408753; bh=Y2Gm2lzUjPtqdTmpCFTNGu0eofrp3F1qO7+4yRpZXeI=; h=From:To:Cc:Subject:Date:From; b=PDkoQjr9uWfM7vXiOzcPbJhDtAC3bxlW2FN3rapr2A8Q5I88fO1JfUvfY0B3Vb0th 092SvZRmqTAFbTFvpNrCcT0OV/1vbMQn4DHlteY5RetAWN1dvX6LdSvz1/KWXOrG7n e5YJWcF8U11Igi1E5Boo0EIHronSBCm76+uhmHtDJhnodRdsE7xZNz7DeIPR6dRZ6W 54KrcM8zRjoVKNy1dvka4f4bOqr+TJwR4Kh3cklaU43x+6thXjsEvyHneLudKqjQPw F5g0CFmM6Z768LK1XK8jl7/nvlk1vsWOfPjojesMP8PiYzMYGilXrlE+E6MwvuVK33 h3YxdbKwgbKUw== From: Arnd Bergmann To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , YueHaibing , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] aic94xx: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:25:43 +0100 Message-Id: <20210322102549.278661-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 harmless -Wempty-body warning: drivers/scsi/aic94xx/aic94xx_init.c: In function 'asd_free_queues': drivers/scsi/aic94xx/aic94xx_init.c:858:62: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 858 | ASD_DPRINTK("Uh-oh! Pending is not empty!\n"); Change the empty ASD_DPRINTK() macro to no_printk(), which avoids this warning and adds format string checking. Signed-off-by: Arnd Bergmann --- drivers/scsi/aic94xx/aic94xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 diff --git a/drivers/scsi/aic94xx/aic94xx.h b/drivers/scsi/aic94xx/aic94xx.h index 98978bc199ff..8f24180646c2 100644 --- a/drivers/scsi/aic94xx/aic94xx.h +++ b/drivers/scsi/aic94xx/aic94xx.h @@ -33,7 +33,7 @@ #ifdef ASD_DEBUG #define ASD_DPRINTK asd_printk #else -#define ASD_DPRINTK(fmt, ...) +#define ASD_DPRINTK(fmt, ...) no_printk(fmt, ##__VA_ARGS__) #endif /* 2*ITNL timeout + 1 second */ From patchwork Mon Mar 22 10:25:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406091 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3440138jai; Mon, 22 Mar 2021 03:26:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNtOJzFZkKXhixHUBFbIc3U2b+34lkDeusnZINNrv/Row/hhCFt/5UueWNXmhm40OTgted X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr18631220ejz.318.1616408805661; Mon, 22 Mar 2021 03:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616408805; cv=none; d=google.com; s=arc-20160816; b=CEpGrIexj3fUJnLiY1yIbUSBDJcWBgRXvsNVVa+FlASNUhOBVW/FTwuOe2b5y9dZxJ g0rdihiYCPmziEjyInUKf67plOdDUMKlj6Knd+cq9TyiKaqno0V1ZMqpdAcFgxxGiP5t w5o9hK7XNeIP/yZd8evf82HpuJ9uDUhEYLmZfd3L+VSgmMKprMdPQaG9N/HhIC65L4hh DZifgnedt2B1+bzFmwXuO38CgKfdIYiIMgHP29C4C+0Cuo5pzLFs9yLmRtj//IeAfJxU AVvSSX8ewKVam3wRbVsdd8Kkf1ilSRJVN3lvnkRW3ttoRta5CpTeg8GeD+xR7mQrCxIF vXsg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D5xmeSZJO1m9mWphxqam4kPiLS4WOxB75I3O+fVtlSU=; b=tXD1iMrUHdkP1AWaT/SROq5uPrN41YZRxfHdDpiQGSFu2l8egKrCzrskmnsiEkeR1H rOjfhVzECYoAdF2HPoZHzVJt/FHgGHiguUcIOoOAASLeMHWlkkGULN+RGO7Xbf9eGCBt DoKgdC9XWJh6uWqKMtbpmUEFApb6JpbYVpc1Cqbx1tcWkkxfb4rhKrMDuQOHKQ8c+IYg pynWEN0Uwzd30B4BdFpUQPiySUGRUl/Rozw4TyWnBUMG55YmFCS6xR9Dl+fpmbQb0ZBd LNVRCtFkFkWymTU8UzwBe33Hi0rhqPGw+D2B8Y0XHXMXaamVDqyjLORPm6yIgYDY/zc1 ipcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="W/vUGanA"; 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 n6si10726180edq.597.2021.03.22.03.26.45 for ; Mon, 22 Mar 2021 03:26:45 -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="W/vUGanA"; 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 S230125AbhCVK0P (ORCPT ); Mon, 22 Mar 2021 06:26:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:51086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbhCVK0A (ORCPT ); Mon, 22 Mar 2021 06:26:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F12356198F; Mon, 22 Mar 2021 10:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616408760; bh=dGYeYvd2IMaLpz/92eRucjW7Pn+8zXubyKFXkBRPJx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W/vUGanAwOcKNRssfNrcu4aAsR6Uh3CmHH5vt6+NvCJ41TcVXv6d03BziSNlKkS2k vGFBq9Vwa6rgnVH5ldgdMuTAn+MR5uBUJVpvt1NUT6aHcnvnQNeyq3h2Vq/4XHu5US VNJOekwzS400wV68ckC75qM09oG5vWYfc1t7T9b0ZA7j2UoGSH5Hc1f4SQXAILSswC S6c29vkpctkYdyptFIHDCsCjsRMYeQSFT8LgjY5Yinv3fliPPfGlfLLY84ltw2Q9g6 IfVYp4gNm8QwzLLGqqY68iWEUq2zjQnA9d8rcRaKadPp6MwLI/EDIvVNGKz6QiDQOT cnw96gQpU8eVw== From: Arnd Bergmann To: Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani Cc: Arnd Bergmann , MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] scsi: message: fusion: avoid -Wempty-body warnings Date: Mon, 22 Mar 2021 11:25:44 +0100 Message-Id: <20210322102549.278661-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322102549.278661-1-arnd@kernel.org> References: <20210322102549.278661-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arnd Bergmann There are a couple of warnings in this driver when building with W=1: drivers/message/fusion/mptbase.c: In function 'PrimeIocFifos': drivers/message/fusion/mptbase.c:4608:65: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 4608 | "restoring 64 bit addressing\n", ioc->name)); | ^ drivers/message/fusion/mptbase.c:4633:65: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 4633 | "restoring 64 bit addressing\n", ioc->name)); The macros are slightly suboptimal since are not proper statements. Change both versions to the usual "do { ... } while (0)" style to make them more robust and avoid the warning. Signed-off-by: Arnd Bergmann --- drivers/message/fusion/mptdebug.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.29.2 diff --git a/drivers/message/fusion/mptdebug.h b/drivers/message/fusion/mptdebug.h index 2205dcab0adb..c281b1359419 100644 --- a/drivers/message/fusion/mptdebug.h +++ b/drivers/message/fusion/mptdebug.h @@ -67,12 +67,13 @@ #ifdef CONFIG_FUSION_LOGGING #define MPT_CHECK_LOGGING(IOC, CMD, BITS) \ -{ \ +do { \ if (IOC->debug_level & BITS) \ CMD; \ -} +} while (0) #else -#define MPT_CHECK_LOGGING(IOC, CMD, BITS) +#define MPT_CHECK_LOGGING(IOC, CMD, BITS) \ +do { } while (0) #endif