[dm-devel] [PATCH] dm: remove unneeded variable

Alasdair G Kergon agk at redhat.com
Wed Jun 14 02:42:28 UTC 2023


On Wed, Jun 14, 2023 at 10:10:33AM +0800, baomingtong001 at 208suo.com wrote:
> fix the following coccicheck warning:
> drivers/md/dm-snap-persistent.c:909:14-16: Unneeded variable: "sz".
 
> - unsigned int sz = 0;
 
> - return sz;
> + return 0;
 
Did the patched code compile OK for you?

The semantics of the DMEMIT macro are perhaps a tad unexpected.

Alasdair



More information about the dm-devel mailing list