[PATCH 01/15] staging: exfat: Clean up return codes - FFS_FULL
Valdis Kl=?utf-8?Q?=c4=93?=tnieks
valdis.kletnieks at vt.edu
Thu Oct 24 18:39:13 UTC 2019
On Thu, 24 Oct 2019 10:59:04 -0700, Matthew Wilcox said:
> Wouldn't it be better to do this as:
> Patch 1: Change all these defines to -Exxx and remove the stupid errno-changing
> blocks like this:
Well, except for the fact that the one for FFS_MEDIAERR required splitting the
uses into -ENODEV, -EIO, and -ENOENT.
Also, "and remover the stupid blocks" would be a second change, and I *thought*
the rule was "one thing, one patch".
> That way nobody actually needs to review patches 2-n; all of the changes
> are done in patch 1.
Reviewing a patch where you know that exactly one thing is supposed to happen
means scrolling through 14 occurrences of the pattern
if (num_alloced == 0)
- ret = FFS_FULL;
+ ret = -ENOSPC;
goes *really* fast, and those comprise most of the bulk of the patchset.
And as I already mentioned, the "stupid looking blocks" will be removed in
a future patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20191024/9ef3dc56/attachment-0001.asc>
More information about the devel
mailing list