2013-06-01 09:59:22

by Thomas Meyer

[permalink] [raw]
Subject: [PATCH] netdev: Cocci spatch "ptr_ret.spatch"


Signed-off-by: Thomas Meyer <[email protected]>
---

diff -u -p a/drivers/net/ethernet/smsc/smc9194.c b/drivers/net/ethernet/smsc/smc9194.c
--- 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)


2013-06-02 02:37:20

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] netdev: Cocci spatch "ptr_ret.spatch"

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

>
> Signed-off-by: Thomas Meyer <[email protected]>

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.

2013-06-02 09:02:37

by Oliver Hartkopp

[permalink] [raw]
Subject: Re: [PATCH] netdev: Cocci spatch "ptr_ret.spatch"

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

On 02.06.2013 04:37, David Miller wrote:
> From: Thomas Meyer <[email protected]>
> Date: Sat, 01 Jun 2013 11:59:11 +0200
>
>>
>> Signed-off-by: Thomas Meyer <[email protected]>
>
> 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
>