From patchwork Fri Nov 11 12:05:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9422921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1949460233 for ; Fri, 11 Nov 2016 12:09:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A1AA299EE for ; Fri, 11 Nov 2016 12:09:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F310829A14; Fri, 11 Nov 2016 12:09:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C62629A87 for ; Fri, 11 Nov 2016 12:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756383AbcKKMJN (ORCPT ); Fri, 11 Nov 2016 07:09:13 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36337 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756332AbcKKMGn (ORCPT ); Fri, 11 Nov 2016 07:06:43 -0500 Received: by mail-pf0-f196.google.com with SMTP id n85so2396173pfi.3; Fri, 11 Nov 2016 04:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7W6M3c2TbuYLJ3voVvl7JDgNUbkayz6/Fr4cV6mBFGk=; b=OvwaNykfJgLbBE5r00iFXXlr7LXE9ZviItEBIGHz0Mg0lfLYNxBkOfhXDAY4QpzKUt ENG0x0o1/wGKZGECsD4mMprYpjWrOppP1XmvFejlZtwP2CpYqOhmDqqXMRBZlldZgPPv 9ShMI9WBaT/kYRqnY1z7xwLSZJGnrtytathIF/NTNM1AwKIMjWo8Aken6ckaloTD7wW6 LlbZbbV6Uxi4g08ulogmQlKiYRX0Ra7V4WT+8QrjrIhNblN0LfsZe+qics7MkKHZAm8P OBEv8xdUmD5Lr+XhV/4MTQO1Lv8BKYtEoDzNYqNE60p4N7kqYZnNGE0aCoUQXvM1Nri+ 6M5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7W6M3c2TbuYLJ3voVvl7JDgNUbkayz6/Fr4cV6mBFGk=; b=RTjI2EfKEoWnM39isHqQow+kI80mJoPnCImvkN/wFBGOLMFacIEmB3K3GEpICyFyUG Xe0lEt/Lu3hjllU9VQE3Zdh1fET6oTLFwD+gwwHgnzxN19ueIDnR0Nz10boqlt+xXbeH 3D4sY94Lc5de6kao4shJXnuBgKu21U9cQ0bkfAHB0z8QialFLmj/oNdmZgV1K7qeeDUR miM7DLZOzR7Qb+g4d/JzpkI8Zc7DeCGZV2N9EA+TF03AR5oXaYgRg083nsj1+cCGhbLW TXK+GUd2tyblnZ/+81iZ1tC+CWyYEaKcEPiTk0btHYS/J5oqWdYWdG7fmJ3ZdHq87wvu Yu7A== X-Gm-Message-State: ABUngvd+D6DtfObzo/8eWevIR9ylSHubuROgFKFHBcGcGt69cZ2i4ohm1fl37s8PWN9Svw== X-Received: by 10.98.214.20 with SMTP id r20mr6353149pfg.59.1478865997893; Fri, 11 Nov 2016 04:06:37 -0800 (PST) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id r1sm14748443pfg.56.2016.11.11.04.06.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 04:06:37 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , Ming Lei , Jiri Kosina , Mike Christie , Hannes Reinecke , Rasmus Villemoes Subject: [PATCH 03/12] block: floppy: use bio_add_page() Date: Fri, 11 Nov 2016 20:05:31 +0800 Message-Id: <1478865957-25252-4-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478865957-25252-1-git-send-email-tom.leiming@gmail.com> References: <1478865957-25252-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig --- drivers/block/floppy.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 6a3ff2b2e3ae..a391a3cfb3fe 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3807,12 +3807,9 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) cbdata.drive = drive; bio_init(&bio, &bio_vec, 1); - bio_vec.bv_page = page; - bio_vec.bv_len = size; - bio_vec.bv_offset = 0; - bio.bi_vcnt = 1; - bio.bi_iter.bi_size = size; bio.bi_bdev = bdev; + bio_add_page(&bio, page, size, 0); + bio.bi_iter.bi_sector = 0; bio.bi_flags |= (1 << BIO_QUIET); bio.bi_private = &cbdata;