Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) ///
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) /// Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) ///
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) // Confidence: High
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) // Copyright: (C) 2009, 2010 Nicolas Palix, DIKU.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) // Copyright: (C) 2009, 2010 Julia Lawall, DIKU.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) // Copyright: (C) 2009, 2010 Gilles Muller, INRIA/LiP6.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) // URL: http://coccinelle.lip6.fr/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) // Options:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) // Keywords: ERR_PTR, PTR_ERR, ERR_CAST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) // Version min: 2.6.25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) virtual context
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) virtual patch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) virtual org
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) virtual report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) @ depends on context && !patch && !org && !report@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) expression x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) @@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) * ERR_PTR(PTR_ERR(x))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) @ depends on !context && patch && !org && !report @
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) expression x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) @@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - ERR_PTR(PTR_ERR(x))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) + ERR_CAST(x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) @r depends on !context && !patch && (org || report)@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) expression x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) position p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) @@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)  ERR_PTR@p(PTR_ERR(x))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) @script:python depends on org@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) p << r.p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) x << r.x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) @@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) msg="WARNING ERR_CAST can be used with %s" % (x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) msg_safe=msg.replace("[","@(").replace("]",")")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) coccilib.org.print_todo(p[0], msg_safe)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) @script:python depends on report@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) p << r.p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) x << r.x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) @@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) msg="WARNING: ERR_CAST can be used with %s" % (x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) coccilib.report.print_report(p[0], msg)