From patchwork Thu Apr 14 12:02:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8834841 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D24299F71A for ; Thu, 14 Apr 2016 12:03:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0954120131 for ; Thu, 14 Apr 2016 12:03:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FD38201D3 for ; Thu, 14 Apr 2016 12:03:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754749AbcDNMD0 (ORCPT ); Thu, 14 Apr 2016 08:03:26 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:33240 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754839AbcDNMDY (ORCPT ); Thu, 14 Apr 2016 08:03:24 -0400 Received: by mail-oi0-f68.google.com with SMTP id v67so9554732oie.0; Thu, 14 Apr 2016 05:03:24 -0700 (PDT) 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=63o/ytZsh2nG6AstO36vEetZ1h0fY8pBh4gSZ0UMxs4=; b=UVoHVa9FUEy6MDsa9YmJNVVaj+14odDNddWYMYTZGnTvb6bbU5+MF3Osvflmk2aZb1 vDDQaIORJLqLM6Tzr8bncls4Q9SndQ3e32Xt8FMX6NeO9frM9AKO9Tf+lGCdj7q5EG/L 7IB9bGwqPclFuiUOd2ffRx6D2lsJXFDqaRmOeiauShL7r76LN5YOZfOaa0TpnVKifNCy 6jsjj5Dhu+1Lpk2CSMiQMKiuqbuIzoUSzX1rlIlZ0/Lt8fTm1DNy4EwuQdmsCac6YP39 G8jwgEj4WcQVY0HmMECJYaK9VDftEdtzc5RS9DuL0H5DxY2iMzbdDmpBzlr1q2m3X3bp AKYg== 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=63o/ytZsh2nG6AstO36vEetZ1h0fY8pBh4gSZ0UMxs4=; b=lVtsPOgLBRTfvsx1j89GrLID1j9lohE/y3amfSMuH4me0Mp9sqrbWeInnBS/u6VdL6 CzoVsM6mCwQdLR6cZ/CHz0nJK3Btlv2z2sz2RVw90pf9wFVhUGi8gJvEwsQ5QMISJFUl tjA2Qf6HXow7/VE1GmavQIon4DySrSh9zHPVsavOZeJv7/njlE4q0W64JS6AkInhfjbG copwPqWvci0jbKpyzkmoVV3ZpSqKwC2RylRvTGg4hdXlKHM6rsdVQrMMcbbKEdEEmsDq jyGavPI0dQ31E5tDXGKfjpm3dKrlowYwTpk87+xyXYfUpqBVsi5T3Y0mrQOW68h83AmX w+YA== X-Gm-Message-State: AOPr4FUTvCMZ1GhLBXai1ZrEhZIZ8nKFMKfbgTfZybybYrYjFNtcevlSP+ziuYx+9/Ht5g== X-Received: by 10.202.64.132 with SMTP id n126mr7343928oia.80.1460635404062; Thu, 14 Apr 2016 05:03:24 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id o9sm11486935oek.6.2016.04.14.05.03.23 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:23 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Jiri Kosina , Hannes Reinecke , NeilBrown , Rasmus Villemoes Subject: [PATCH v1 07/27] block: floppy: use bio_add_page() Date: Thu, 14 Apr 2016 20:02:25 +0800 Message-Id: <1460635375-28282-8-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-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-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- 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 b5b0e68..a093de0 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -3812,17 +3812,14 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) bio_init(&bio); bio_set_vec_table(&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.bi_iter.bi_sector = 0; bio.bi_flags |= (1 << BIO_QUIET); bio.bi_private = &cbdata; bio.bi_end_io = floppy_rb0_cb; + bio_add_page(&bio, page, size, 0); + submit_bio(READ, &bio); process_fd_request();