Skip to contentSkip to conversation

netdev: Cocci spatch "ptr_ret.spatch"

PATCH In review Thomas Meyer 3 participants 3 messages Jun 1, 2013 – Jun 2, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netdev: Cocci spatch "ptr_ret.spatch"

---

drivers/net/ethernet/smsc/smc9194.c +1 -3
diff -u -p a/drivers/net/ethernet/smsc/smc9194.c b/drivers/net/ethernet/smsc/smc9194.c
@@ -1571,9 +1571,7 @@ int __init init_module(void)
 
 	/* copy the parameters from insmod into the device structure */
 	devSMC9194 = smc_init(-1);
-	if (IS_ERR(devSMC9194))
-		return PTR_ERR(devSMC9194);
-	return 0;
+	return PTR_RET(devSMC9194);
 }
 
 void __exit cleanup_module(void)
maintainer
#1 lore raw

From: Thomas Meyer <[email protected]>
Date: Sat, 01 Jun 2013 11:59:11 +0200

Quoted 2 lines

This obscure reference to the cocci path you used to find/fix this problem is insufficient in detail for a commit log message.

You must explain exactly what the problem is, and how you fixed
it, in full sentences. You must make your commit header lin
subject more appropriate as well.

#2 lore raw

Hello Thomas,

additionally to provide a proper log message it is a usual to provide the coccinelle expression that found the source to be changed.

http://lwn.net/Articles/315686/

E.g. like these

http://marc.info/?l=linux-netdev&m=135081679626023&w=2
http://marc.info/?l=linux-netdev&m=135194048501621&w=2

http://marc.info/?l=linux-netdev&m=135306967411758&w=2
http://marc.info/?l=linux-netdev&m=135304902302198&w=2

Regards,
Oliver

Quoted 17 lines · David Miller

From: Thomas Meyer <[email protected]>
Date: Sat, 01 Jun 2013 11:59:11 +0200

Quoted 2 lines

This obscure reference to the cocci path you used to find/fix this problem is insufficient in detail for a commit log message.

You must explain exactly what the problem is, and how you fixed
it, in full sentences. You must make your commit header lin
subject more appropriate as well.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html