403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/modules/6.8.0-60-generic/build/scripts/coccinelle/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/modules/6.8.0-60-generic/build/scripts/coccinelle/api/platform_get_irq.cocci
// SPDX-License-Identifier: GPL-2.0
/// Remove dev_err() messages after platform_get_irq*() failures
//
// Confidence: Medium
// Options: --include-headers

virtual patch
virtual context
virtual org
virtual report

@depends on context@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq
|
platform_get_irq_byname
)(E, ...);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
if (ret != -EPROBE_DEFER)
{ ...
*dev_err(...);
... }
|
...
*dev_err(...);
)
...
}

@depends on patch@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq
|
platform_get_irq_byname
)(E, ...);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}

@r depends on org || report@
position p1;
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq
|
platform_get_irq_byname
)(E, ...);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
if (ret != -EPROBE_DEFER)
{ ...
dev_err@p1(...);
... }
|
...
dev_err@p1(...);
)
...
}

@script:python depends on org@
p1 << r.p1;
@@

cocci.print_main(p1)

@script:python depends on report@
p1 << r.p1;
@@

msg = "line %s is redundant because platform_get_irq() already prints an error" % (p1[0].line)
coccilib.report.print_report(p1[0],msg)

Youez - 2016 - github.com/yon3zu
LinuXploit