From nobody Mon Feb 9 14:35:45 2026 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2114538B9AE for ; Thu, 22 Jan 2026 08:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769071895; cv=none; b=MT1nlo0i6TEuKfBYt/9rvxSNsVnlhD8GybKSnnheyH87LVIa8ju/7elBR0I+M7ZRH/EYtcHHilH9T2C2z4p5FZJKiqcguegLb71Jkvuq7k8ITnHnCZ0J1SElPnVEqdiQiPeRRiW/hn0rojJ89tdxK0w5ZGm3iPktk4qWjLZOZH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769071895; c=relaxed/simple; bh=S4XF9TydyIK7UkZu2QEBwRjkYwv96ls6GRSYVM01S+c=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PrGYkmgpP56mXX/OphiovUSRSXwKCH+I0bhvM0uG7+T13QKwmjbCl1sLqm+LZMUYq4NBCdIM1FqS8KMZt6mCJfq+ah5pd7DtznGTq3YUGTwX+LSuMFldrCxQ1oe62NfSCIrBb4siMD9loAlLKB4yUUbSjBe/kd7mA335xeUA0yM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 853843dcf76f11f0b0f03b4cfa9209d1-20260122 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.6,REQID:b31b8eb8-54d3-4d26-be7b-e64a0730788f,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:a9d874c,CLOUDID:67618d1f2bedeaf76babe88c7a1e3c46,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|850|898,TC:nil,Content:0|15|50,EDM:- 3,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,A V:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 853843dcf76f11f0b0f03b4cfa9209d1-20260122 X-User: zenghongling@kylinos.cn Received: from localhost.localdomain [(10.44.16.150)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 263110825; Thu, 22 Jan 2026 16:51:19 +0800 From: zenghongling To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, zhongling0719@126.com, zenghongling Subject: [PATCH] driver/nvme-tcp: Use string choice helpers for digest logging Date: Thu, 22 Jan 2026 16:51:15 +0800 Message-Id: <20260122085115.1308834-1-zenghongling@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use str_enabled_disabled string helpers for better readability and to fix cocci warning. Signed-off-by: zenghongling --- drivers/nvme/host/tcp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 9a96df1a511c..d5c7e3c51220 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -19,6 +19,7 @@ #include #include #include +#include =20 #include "nvme.h" #include "fabrics.h" @@ -1549,8 +1550,8 @@ static int nvme_tcp_init_connection(struct nvme_tcp_q= ueue *queue) (!queue->data_digest && ctrl_ddgst)) { pr_err("queue %d: data digest mismatch host: %s ctrl: %s\n", nvme_tcp_queue_id(queue), - queue->data_digest ? "enabled" : "disabled", - ctrl_ddgst ? "enabled" : "disabled"); + str_enabled_disabled(ctrl_ddgst), + str_enabled_disabled(queue->data_digest)); goto free_icresp; } =20 @@ -1559,8 +1560,8 @@ static int nvme_tcp_init_connection(struct nvme_tcp_q= ueue *queue) (!queue->hdr_digest && ctrl_hdgst)) { pr_err("queue %d: header digest mismatch host: %s ctrl: %s\n", nvme_tcp_queue_id(queue), - queue->hdr_digest ? "enabled" : "disabled", - ctrl_hdgst ? "enabled" : "disabled"); + str_enabled_disabled(ctrl_hdgst), + str_enabled_disabled(queue->hdr_digest)); goto free_icresp; } =20 --=20 2.25.1