lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202508191642476319esv1sG1oQiHF4o_zNJC0@zte.com.cn>
Date: Tue, 19 Aug 2025 16:42:47 +0800 (CST)
From: <zhang.enpei@....com.cn>
To: <sth@...ux.ibm.com>
Cc: <hoeppner@...ux.ibm.com>, <hca@...ux.ibm.com>, <gor@...ux.ibm.com>,
        <agordeev@...ux.ibm.com>, <borntraeger@...ux.ibm.com>,
        <svens@...ux.ibm.com>, <linux-s390@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] s390/dasd: convert to use ERR_CAST()

From: Zhang Enpei <zhang.enpei@....com.cn>

Use ERR_CAST() since the macro clearly indicates that this is a pointer
to an error value and a type conversion was performed.

Signed-off-by: Zhang Enpei <zhang.enpei@....com.cn>
---
 drivers/s390/block/dasd_devmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index ddbdf1f85d44..0f4900d246e8 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -555,7 +555,7 @@ dasd_create_device(struct ccw_device *cdev)
 
        devmap = dasd_devmap_from_cdev(cdev);
        if (IS_ERR(devmap))
-               return (void *) devmap;
+               return ERR_CAST(devmap);
 
        device = dasd_alloc_device();
        if (IS_ERR(device))
-- 
2.25.1
<div class="zcontentRow"><p>From: Zhang Enpei &lt;zhang.enpei@....com.cn&gt;<br></p><p><br></p><p>Use ERR_CAST() since the macro clearly indicates that this is a pointer<br></p><p>to an error value and a type conversion was performed.</p><p><br></p><p>Signed-off-by: Zhang Enpei &lt;zhang.enpei@....com.cn&gt;</p><p>---</p><p>&nbsp;drivers/s390/block/dasd_devmap.c | 2 +-</p><p>&nbsp;1 file changed, 1 insertion(+), 1 deletion(-)</p><p><br></p><p>diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c</p><p>index ddbdf1f85d44..0f4900d246e8 100644</p><p>--- a/drivers/s390/block/dasd_devmap.c</p><p>+++ b/drivers/s390/block/dasd_devmap.c</p><p>@@ -555,7 +555,7 @@ dasd_create_device(struct ccw_device *cdev)</p><p>&nbsp;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; devmap = dasd_devmap_from_cdev(cdev);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (IS_ERR(devmap))</p><p>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return (void *) devmap;</p><p>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return ERR_CAST(devmap);</p><p>&nbsp;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; device = dasd_alloc_device();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (IS_ERR(device))</p><p>--&nbsp;</p><p>2.25.1</p><p style="font-size:14px;font-family:微软雅黑,Microsoft YaHei;"><br></p><p style="font-size:14px;font-family:微软雅黑,Microsoft YaHei;"><br></p><p style="font-size:14px;font-family:微软雅黑,Microsoft YaHei;"><br></p><p style="font-size:14px;font-family:微软雅黑,Microsoft YaHei;"><br></p></div>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ