x86, msr/cpuid: Cocci spatch "ptr_ret.spatch"
Subsystems (2)
PATCH 1/1 x86, msr/cpuid: Cocci spatch "ptr_ret.spatch"
Signed-off-by Thomas Meyer <[email protected]>
---
arch/x86/kernel/cpuid.c +1 -1
@@ -143,7 +143,7 @@ static __cpuinit int cpuid_device_create dev =device_create (cpuid_class,NULL ,MKDEV (CPUID_MAJOR , cpu),NULL ,"cpu%d" , cpu); -return IS_ERR (dev) ?PTR_ERR (dev) :0 ; +return PTR_RET (dev); }static void cpuid_device_destroy (int cpu)
arch/x86/kernel/msr.c +1 -1
@@ -206,7 +206,7 @@ static int __cpuinit msr_device_create(i dev =device_create (msr_class,NULL ,MKDEV (MSR_MAJOR , cpu),NULL ,"msr%d" , cpu); -return IS_ERR (dev) ?PTR_ERR (dev) :0 ; +return PTR_RET (dev); }static void msr_device_destroy (int cpu)
H. Peter Anvin
maintainerThis is not an acceptable patch... no description of any kind and a subject line which would only make sense if the cocci scripts are checked into the kernel tree.
Quoted 28 lines · Thomas Meyer
Signed-off-by Thomas Meyer <[email protected]>---
diff -u -p
a/arch/x86/kernel/cpuid.cb/arch/x86/kernel/cpuid.carch/x86/kernel/cpuid.c +1
-1@@ -143,7 +143,7 @@ static __cpuinit int cpuid_device_create dev =device_create (cpuid_class,NULL ,MKDEV (CPUID_MAJOR , cpu),NULL ,"cpu%d" , cpu); -return IS_ERR (dev) ?PTR_ERR (dev) :0 ; +return PTR_RET (dev); }static void cpuid_device_destroy (int cpu)diff -u -p
a/arch/x86/kernel/msr.cb/arch/x86/kernel/msr.carch/x86/kernel/msr.c +1
-1@@ -206,7 +206,7 @@ static int __cpuinit msr_device_create(i dev =device_create (msr_class,NULL ,MKDEV (MSR_MAJOR , cpu),NULL ,"msr%d" , cpu); -return IS_ERR (dev) ?PTR_ERR (dev) :0 ; +return PTR_RET (dev); }static void msr_device_destroy (int cpu)
Signature · 1 line
Sent from my mobile phone. Please excuse brevity and lack of formatting.