From patchwork Mon Mar 22 11:44:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406105 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3492446jai; Mon, 22 Mar 2021 04:45:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpQxfuhmtmr1W9coI0mAyRRj1EiHHhz0rX3zuo+IPT0oFhQhw4qNVzdFcR6uz0ULEve0Xo X-Received: by 2002:a50:fd8b:: with SMTP id o11mr25003919edt.346.1616413539684; Mon, 22 Mar 2021 04:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616413539; cv=none; d=google.com; s=arc-20160816; b=YPiabxTrFvQFphHPoe6fYn1oHVUtfPyfPb4fCnPPZvy2MOrQRyuHGiNnZ1byNKmm47 JNRZtoj37zQeT3dW3Sp1ClqmQaVHx7Dnl7PAT5qvMkL/t6XcVtgeXqkaf/4l2U0bqKoJ eRauA7GXDaPrXXrDCDzt97yGqhwtwuhW4vzhRileD2IfpkDc4Jo8kHgr8ILiqKg4HkIZ wramKKFLzLae86+oBP/jQxBsQZIl39U+FlF2rnUynq3U3nA7/+WPbKmkzs1+6Jm+qfVT jSysMS/JWmTNg6Rqd8a8TlRXV1fhEAkzfzeN33K5VnvKuiSKXjnoIWu51lmSSkJPXBrQ O/kA== 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=N/+nSlsskrw/IC+Vasd1saT8wIjeSfdoFTMtuV1NfJs=; b=jlWI8tlzbAZABWF8Vc2piYkseLmuHOl2yMSAH3wCjo0Xgnvx4McmNE0Ma81B/kzUAD TSmCnYDCcY0n59cyFt9nAN22IGAiL/38sBk6nJ6ZXDztagOKmru9LxvaOB604pQil7aC yiN4CWD9UFBL9QR3U9CfTzXvPgsMSIoi7hIhdQk3DOBZDjC3cpFZmjCzOz/QsvVzqorD GOoXMA+oebe9QfH0DxrsgE517SviGUmzRQ0bjH1MaVfOOBfZNr8sXY/3UjkIyzXEeHL3 dtTDFrahSbM3EBLkCKgkvUr+zAUNwubCmoQp+//ZGAFWYXwVCHh6WSM5Jc4fxW3hHJHU ejJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o8kKuvhT; 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 a9si10727532edr.332.2021.03.22.04.45.39 for ; Mon, 22 Mar 2021 04:45:39 -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=o8kKuvhT; 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 S229893AbhCVLpI (ORCPT ); Mon, 22 Mar 2021 07:45:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:43992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbhCVLoq (ORCPT ); Mon, 22 Mar 2021 07:44:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD98061974; Mon, 22 Mar 2021 11:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616413485; bh=bKmCS8aIsW9W0W9EIWXnZu063w0cBmbUMJ4RHWeTFrc=; h=From:To:Cc:Subject:Date:From; b=o8kKuvhT9if9e6sthkLLZRkS5pHpEHIhZHMlr4uBE4qHDpiEYsoyFXg8J5HFMPWwP OQul2/rHFZc5y9WmcznrqZ/sWO5JC0lFHL0zGKzRTwYiSCJUu/4qoQW4SrKSwhcoC/ 8tHn9OUDN9Iz7CN5OCXrLP0QrH9Fiy4VkUsWBbnJxZmewmL5+F8NOkjcJ2r70j847/ HuJr6ytYrWA1/yYq9iSnZ/hKE/w5i96xeameQzxvmsFn0/EjCUrZ2NxitE4AGwmCm4 fjigmD/OK/VACv/0b2D2GCLQz+S45NvCwekCofU48wzAlB5GLQeKmC+mNOG3OiUDj2 hKp/C29pRSfGQ== From: Arnd Bergmann To: "Martin K. Petersen" Cc: Arnd Bergmann , Jens Axboe , Chaitanya Kulkarni , Hannes Reinecke , Bodo Stroesser , "Matthew Wilcox (Oracle)" , Guoqing Jiang , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] target: pscsi: avoid Wempty-body warning Date: Mon, 22 Mar 2021 12:44:34 +0100 Message-Id: <20210322114441.3479365-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 warning for pscsi: drivers/target/target_core_pscsi.c: In function 'pscsi_complete_cmd': drivers/target/target_core_pscsi.c:624:33: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 624 | ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ | ^ Rework the coding style as suggested by gcc to avoid the warning. Signed-off-by: Arnd Bergmann --- drivers/target/target_core_pscsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.29.2 diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 3cbc074992bc..913b092955f6 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -620,8 +620,9 @@ static void pscsi_complete_cmd(struct se_cmd *cmd, u8 scsi_status, unsigned char *buf; buf = transport_kmap_data_sg(cmd); - if (!buf) - ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ + if (!buf) { + /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ + } if (cdb[0] == MODE_SENSE_10) { if (!(buf[3] & 0x80))