From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753145AbbE1Bid (ORCPT ); Wed, 27 May 2015 21:38:33 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:33196 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752628AbbE1BiO (ORCPT ); Wed, 27 May 2015 21:38:14 -0400 Message-ID: <55667183.80203@kernel.dk> Date: Wed, 27 May 2015 19:38:11 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Rik van Riel , Julia Lawall , Christoph Hellwig CC: Jeff Moyer , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: fix returnvar.cocci warnings References: <55667106.9000000@redhat.com> In-Reply-To: <55667106.9000000@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> Signed-off-by: Julia Lawall >> --- >> >> 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