|
From: | Jared Rossi |
Subject: | Re: [PATCH v3 08/19] pc-bios/s390-ccw: Remove panics from ECKD IPL path |
Date: | Wed, 9 Oct 2024 21:37:27 -0400 |
User-agent: | Mozilla Thunderbird |
On 10/9/24 6:53 AM, Thomas Huth wrote:
On 08/10/2024 03.15, jrossi@linux.ibm.com wrote:[snip...]load_eckd_segments() returns a value of type block_number_t which is an unsigned type, so returning a negative error value will likely not work as expected......@@ -317,21 +352,28 @@ static void run_eckd_boot_script(block_number_t bmt_block_nr,do { block_nr = load_eckd_segments(block_nr, ldipl, &address); - } while (block_nr != -1); + } while (block_nr >= 0);[snip...]
There already exists a special block number defined in bootmap.h, NULL_BLOCK_NR 0xffffffffffffffffULL. Therefore I would propose simply adding another as ERROR_BLOCK_NR 0xfffffffffffffffeULL.
ERROR_BLOCK_NR would replace the negative error codes and NULL_BLOCK_NR would represent expected end of chunk. Does this seem reasonable?
Jared
[Prev in Thread] | Current Thread | [Next in Thread] |