p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/build/scripts/coccinelle/api/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.119.1.el7.x86_64/build/scripts/coccinelle/api/err_cast.cocci
///
/// Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
///
// Confidence: High
// Copyright: (C) 2009, 2010 Nicolas Palix, DIKU.  GPLv2.
// Copyright: (C) 2009, 2010 Julia Lawall, DIKU.  GPLv2.
// Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6.  GPLv2.
// URL: http://coccinelle.lip6.fr/
// Options:
//
// Keywords: ERR_PTR, PTR_ERR, ERR_CAST
// Version min: 2.6.25
//

virtual context
virtual patch
virtual org
virtual report


@ depends on context && !patch && !org && !report@
expression x;
@@

* ERR_PTR(PTR_ERR(x))

@ depends on !context && patch && !org && !report @
expression x;
@@

- ERR_PTR(PTR_ERR(x))
+ ERR_CAST(x)

@r depends on !context && !patch && (org || report)@
expression x;
position p;
@@

 ERR_PTR@p(PTR_ERR(x))

@script:python depends on org@
p << r.p;
x << r.x;
@@

msg="WARNING ERR_CAST can be used with %s" % (x)
msg_safe=msg.replace("[","@(").replace("]",")")
coccilib.org.print_todo(p[0], msg_safe)

@script:python depends on report@
p << r.p;
x << r.x;
@@

msg="WARNING: ERR_CAST can be used with %s" % (x)
coccilib.report.print_report(p[0], msg)
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
September 29 2025 07:00:57
0 / 0
0755
alloc
--
September 29 2025 07:01:30
0 / 0
0755
d_find_alias.cocci
1.242 KB
November 06 2023 09:15:52
0 / 0
0644
devm_ioremap_resource.cocci
1.121 KB
November 06 2023 09:15:52
0 / 0
0644
devm_request_and_ioremap.cocci
2.301 KB
November 06 2023 09:15:52
0 / 0
0644
err_cast.cocci
1.071 KB
November 06 2023 09:15:52
0 / 0
0644
kstrdup.cocci
2.401 KB
November 06 2023 09:15:52
0 / 0
0644
memdup.cocci
1.349 KB
November 06 2023 09:15:52
0 / 0
0644
memdup_user.cocci
1.271 KB
November 06 2023 09:15:52
0 / 0
0644
ptr_ret.cocci
1.684 KB
November 06 2023 09:15:52
0 / 0
0644
resource_size.cocci
2.065 KB
November 06 2023 09:15:52
0 / 0
0644
simple_open.cocci
1.185 KB
November 06 2023 09:15:52
0 / 0
0644