[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175798566830.3116853.5922880559006107436.b4-ty@oracle.com>
Date: Tue, 16 Sep 2025 22:27:11 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Al Viro <viro@...iv.linux.org.uk>, linux-scsi@...r.kernel.org,
target-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
Qianfeng Rong <rongqianfeng@...o.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH] scsi: target: iscsi: Use int type to store negative value
On Tue, 02 Sep 2025 20:50:14 +0800, Qianfeng Rong wrote:
> Change the 'ret' variable in iscsit_tmr_task_reassign() from u64 to int,
> as it needs to store either negative value or zero returned by
> iscsit_find_cmd_for_recovery().
>
> Storing the negative error codes in unsigned type, or performing equality
> comparisons (e.g., ret == -2), doesn't cause an issue at runtime [1] but
> can be confusing. Additionally, assigning negative error codes to unsigned
> type may trigger a GCC warning when the -Wsign-conversion flag is enabled.
>
> [...]
Applied to 6.18/scsi-queue, thanks!
[1/1] scsi: target: iscsi: Use int type to store negative value
https://git.kernel.org/mkp/scsi/c/b0aca7ae8285
--
Martin K. Petersen
Powered by blists - more mailing lists