From patchwork Tue Jun 23 19:57:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6116C433DF for ; Tue, 23 Jun 2020 21:13:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C5642072E for ; Tue, 23 Jun 2020 21:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592946796; bh=A+3StTUuWH6QZoWjHGdK2r31ebEaScUZXNWtmyO1QGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=H+otvpyK/aeViIyReGNYnDd5Oqz5nFUuXRF3YA+6/tIy325r8m/OBta1gLm3Dcmod Xrpk5dKYMNx/9X1LyaUni21bzCC+v9a7NIIpWhyiM1UJ6qfAKcoGnReckbcsU6oeqm WyLqQIiOaB0K1YwKHlNAONfndTeJUJH4NO3heZH0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390519AbgFWUai (ORCPT ); Tue, 23 Jun 2020 16:30:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:50966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391149AbgFWUah (ORCPT ); Tue, 23 Jun 2020 16:30:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3BEEB2070E; Tue, 23 Jun 2020 20:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944237; bh=A+3StTUuWH6QZoWjHGdK2r31ebEaScUZXNWtmyO1QGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XKqu0k9UP35IteEAzCbgNcIy+3cZRFcZe3/PH2FvsrJUONYbPisGfJxPdsS2ufM/R zRQD/9/h5PxuMlUuf+fePrruwwPc9Qejq/8Som7pG15khaa6gusaXHOnzNJym4/2lV z5IIfJr9/czBS2MN+tsMBdsuenqZuKsVYr57eAro= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chaitanya Kulkarni , Jens Axboe , Sasha Levin Subject: [PATCH 5.4 225/314] blktrace: use errno instead of bi_status Date: Tue, 23 Jun 2020 21:57:00 +0200 Message-Id: <20200623195349.682574571@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chaitanya Kulkarni [ Upstream commit 48bc3cd3e07a1486f45d9971c75d6090976c3b1b ] In blk_add_trace_spliti() blk_add_trace_bio_remap() use blk_status_to_errno() to pass the error instead of pasing the bi_status. This fixes the sparse warning. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- kernel/trace/blktrace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index e7e483cdbea61..9e02e1ce0ac01 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -999,8 +999,10 @@ static void blk_add_trace_split(void *ignore, __blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size, bio_op(bio), bio->bi_opf, - BLK_TA_SPLIT, bio->bi_status, sizeof(rpdu), - &rpdu, blk_trace_bio_get_cgid(q, bio)); + BLK_TA_SPLIT, + blk_status_to_errno(bio->bi_status), + sizeof(rpdu), &rpdu, + blk_trace_bio_get_cgid(q, bio)); } rcu_read_unlock(); } @@ -1037,7 +1039,8 @@ static void blk_add_trace_bio_remap(void *ignore, r.sector_from = cpu_to_be64(from); __blk_add_trace(bt, bio->bi_iter.bi_sector, bio->bi_iter.bi_size, - bio_op(bio), bio->bi_opf, BLK_TA_REMAP, bio->bi_status, + bio_op(bio), bio->bi_opf, BLK_TA_REMAP, + blk_status_to_errno(bio->bi_status), sizeof(r), &r, blk_trace_bio_get_cgid(q, bio)); rcu_read_unlock(); }