Re: [PATCH] block: fix returnvar.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/27/2015 07:36 PM, Rik van Riel wrote:
On 05/26/2015 03:59 PM, Julia Lawall wrote:
Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
---

One could check whether the ret variable was intended to be used for
anything.

Which tree is this against?

Linus's latest tree still has this in _submit_bh
(unless git didn't pull the latest updates right):

         if (buffer_meta(bh))
                 rw |= REQ_META;
         if (buffer_prio(bh))
                 rw |= REQ_PRIO;

         bio_get(bio);
         submit_bio(rw, bio);

         if (bio_flagged(bio, BIO_EOPNOTSUPP))
                 ret = -EOPNOTSUPP;

         bio_put(bio);
         return ret;

for-4.2/core has dropped the EOPNOTSUPP parts, that's where Julia found the issue of the now unused 'ret'.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux