This patch converts ERR_PTR(PTR_ERR()) to ERR_CAST()
This fixes warning thrown by coccinelle
It also updates contrib/scripts/spelling.txt to catch
any future misuse of ERR_PTR(PTR_ERR())
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I2214f46c08e5295dd139e7b4b245881cd9f6495a
Reviewed-on: https://review.whamcloud.com/39204
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
container_of0||container_of_safe
DN_MAX_BONUSLEN||DN_BONUS_SIZE(dnodesize)
DN_OLD_MAX_BONUSLEN||DN_BONUS_SIZE(DNODE_MIN_SIZE)
container_of0||container_of_safe
DN_MAX_BONUSLEN||DN_BONUS_SIZE(dnodesize)
DN_OLD_MAX_BONUSLEN||DN_BONUS_SIZE(DNODE_MIN_SIZE)
+ERR_PTR.PTR_ERR||ERR_CAST
from_timer||cfs_from_timer
f_dentry||f_path.dentry
[^_]get_seconds||ktime_get_real_seconds
from_timer||cfs_from_timer
f_dentry||f_path.dentry
[^_]get_seconds||ktime_get_real_seconds
inode = search_inode_for_lustre(sb, fid);
if (IS_ERR(inode))
inode = search_inode_for_lustre(sb, fid);
if (IS_ERR(inode))
- RETURN(ERR_PTR(PTR_ERR(inode)));
+ RETURN(ERR_CAST(inode));
if (is_bad_inode(inode)) {
/* we didn't find the right inode.. */
if (is_bad_inode(inode)) {
/* we didn't find the right inode.. */
*/
o = lu_object_anon(env, nd, NULL);
if (IS_ERR(o))
*/
o = lu_object_anon(env, nd, NULL);
if (IS_ERR(o))
- GOTO(out, dt = ERR_PTR(PTR_ERR(o)));
+ GOTO(out, dt = ERR_CAST(o));
n = lu_object_locate(o->lo_header, nd->ld_type);
if (unlikely(n == NULL)) {
n = lu_object_locate(o->lo_header, nd->ld_type);
if (unlikely(n == NULL)) {
LASSERT(obj != NULL);
mdo = lu2md(obj);
} else {
LASSERT(obj != NULL);
mdo = lu2md(obj);
} else {
- mdo = ERR_PTR(PTR_ERR(obj));
lo = lu_object_find_at(env, top_dev, fid, conf);
if (IS_ERR(lo))
lo = lu_object_find_at(env, top_dev, fid, conf);
if (IS_ERR(lo))
- return ERR_PTR(PTR_ERR(lo));
ls = ls_device_get(dt);
if (IS_ERR(ls)) {
ls = ls_device_get(dt);
if (IS_ERR(ls)) {
- dto = ERR_PTR(PTR_ERR(ls));
} else {
/* create the object */
dti->dti_attr.la_valid = LA_MODE;
} else {
/* create the object */
dti->dti_attr.la_valid = LA_MODE;
ls = ls_device_get(dt);
if (IS_ERR(ls)) {
ls = ls_device_get(dt);
if (IS_ERR(ls)) {
- dto = ERR_PTR(PTR_ERR(ls));
} else {
/* create the object */
dti->dti_attr.la_valid = LA_MODE;
} else {
/* create the object */
dti->dti_attr.la_valid = LA_MODE;