From patchwork Thu May 20 06:22:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269135 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 E432EC433B4 for ; Thu, 20 May 2021 06:23:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C558B60249 for ; Thu, 20 May 2021 06:23:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbhETGYb (ORCPT ); Thu, 20 May 2021 02:24:31 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:49715 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbhETGYa (ORCPT ); Thu, 20 May 2021 02:24:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491789; x=1653027789; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VGRek1gFfC/wRW7zk79gY062QbIZScEOrynJQdteIqg=; b=ledrMQzLZ0P1r6uKH6NPhZW2QzGXw2fVztPpWhMoNYwfi2RSaUfyZVwR 1bT2xWKsCOrFBxu7PZHY+LOT4+KYv7P8mNct5nVriHP28iUPg4gdhqzT+ w6N17n0uO43Qpgyfct438vzkVflydSrTPf4vZnjYAOLazpu+C+PNe1pO0 0NSM22t1ZDe1xiIayIKPnCAvod3Izsjc/EAcYaf6P6wdIrVtjkJd2h/NO 7CjEG/+V4ockdNhHE7+71pd4fFdhPMuYLz+pKDveWxox/IUhtWkbdVsHw MSbNs39u7SVlg3ONaMDfkh7aGzxYattKoYjEIP43NNREA+psyp/9UCW0+ w==; IronPort-SDR: Mj/FmcwrV+946VKIdJ/3MqzDoduWuaL8eC01r/PXWTcZ0nR7pNJ5ofYO/onKInTsxYuyibFc70 BK8/PkT6HXloShKCLqHHL62XbaRTAJ3Q3HOcJBenVNIPjbWZmMvR4SXOWi35oVxMA5OmZREdi2 +QOVEkR+hKFwY6IE+oLRrr904b3qqv+pEJ0ckBUJouR5zVj7vZSuuxPDXnyw02TWKJ29miuWPR q5IgRBMa0lkgmCwUIuA6zcAzNsT8nNgeGQuzBQ21xauf6cmER+020b9OTlK9r1SMmF0cHakq57 IiE= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="173439983" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:09 +0800 IronPort-SDR: Kpg0V9LONdhGEwbCg3f7KaFkxf43XbfLBNsH8FapDpTfJxCGmooADTPUZETNzXwAqePbYaNIOf aJ46lLJ00iUuqVQYHvLKAfO9MebHojGi2taV/ACCbVx5ZsUp9ABKs2dH2eILqyQw/69RmRVkhr qAxxlfcBgll/KzYgRVMK6q0sYdS+d7CdcWMHkIbFi4rJfJ/ogGiL9zzu8goEis7wlTAFfUCQro KzZSRMZ7AkfRvlROX965hnfktGXmxlLCObjQboGW/OYCbmR9T6XM7+L4eg987C9oAmxfZJ4Ws/ vHim/qUJVYfaWEH41aRCW1af Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:02:46 -0700 IronPort-SDR: dRngKsbH+q1CrRL2WQTxUMrY9YgNLOY68BEHkyuWRPYuzw2DRJAQIYajpLBnlUCxztHYgaNT7i 2Ukcly0phu37Y1V2SmPnDJA0swchi5sOM6NhT8eSaG6+R2J2NJRvJwtotrphJgxusPzbpOedZ1 sTkiE8rTX0s/UnjWSjoaE7uDawooRhJ2cSpFDsjJXBqTUGtXcWWYH0RBpKYkwOCtY8cbDHvUYt RWbWYR4T6ZFF5sDEHL2OUD5/4GtWQSaORduUWIR1tWQm98EToPFe1utEJ9c0TTYEDIIEjkRHDo KHM= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:09 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 1/8] block: fix return type of bio_add_hw_page() Date: Wed, 19 May 2021 23:22:48 -0700 Message-Id: <20210520062255.4908-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Fix bio_add_hw_page() return type to unsigned int as it returns the length which is of type unsigned int and not int. Signed-off-by: Chaitanya Kulkarni --- block/bio.c | 7 ++++--- block/blk.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/block/bio.c b/block/bio.c index 44205dfb6b60..531dbf15c0d9 100644 --- a/block/bio.c +++ b/block/bio.c @@ -743,9 +743,10 @@ static bool bio_try_merge_hw_seg(struct request_queue *q, struct bio *bio, * Add a page to a bio while respecting the hardware max_sectors, max_segment * and gap limitations. */ -int bio_add_hw_page(struct request_queue *q, struct bio *bio, - struct page *page, unsigned int len, unsigned int offset, - unsigned int max_sectors, bool *same_page) +unsigned int bio_add_hw_page(struct request_queue *q, struct bio *bio, + struct page *page, unsigned int len, + unsigned int offset, unsigned int max_sectors, + bool *same_page) { struct bio_vec *bvec; diff --git a/block/blk.h b/block/blk.h index 8b3591aee0a5..a8930ecd4a5e 100644 --- a/block/blk.h +++ b/block/blk.h @@ -355,8 +355,9 @@ int bdev_del_partition(struct block_device *bdev, int partno); int bdev_resize_partition(struct block_device *bdev, int partno, sector_t start, sector_t length); -int bio_add_hw_page(struct request_queue *q, struct bio *bio, - struct page *page, unsigned int len, unsigned int offset, - unsigned int max_sectors, bool *same_page); +unsigned int bio_add_hw_page(struct request_queue *q, struct bio *bio, + struct page *page, unsigned int len, + unsigned int offset, unsigned int max_sectors, + bool *same_page); #endif /* BLK_INTERNAL_H */ From patchwork Thu May 20 06:22:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269137 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 36E7DC433ED for ; Thu, 20 May 2021 06:23:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1927060FDC for ; Thu, 20 May 2021 06:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230315AbhETGYh (ORCPT ); Thu, 20 May 2021 02:24:37 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:32509 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbhETGYh (ORCPT ); Thu, 20 May 2021 02:24:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491796; x=1653027796; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sR7awTp6tvG6knNm/CLdZaoHbIxGL6Q0IVY+Ihe8dnQ=; b=itKJWnXky9TMylvyorybEyc0OCCelUR9fO/WQMz1Ix6N+8MnjEB+GULz hFFiOVZC2jaz2W+s5B+lFniOFA6nediQDlFJrgA0iAvfULbONJ5M5a5GS g+PMzfnIvZjKajHSzs8j7GDneRSLonvmfNW0/5Dupyw/DKUIfuEUYCRc+ WbzKyxhD9QP5TQQVBqteBJgKWjQDH5At7Ua8DK+T5Pf4vI9ff4MAKcI11 2+OfDMaYGP2HWAqn7dYEe7kvXJCkuXFYrry30RFyPfU4Odpuv4R+1Holv Um6hnMrToabLul1Xe/CawQ5J3+tohMZKf2vV2mI+rMeWy5dFzf6HEaMyg g==; IronPort-SDR: 9bASrgzLmxOlU/CX1kl+QdrIb0yJ5FQE7CG/8AesBLxu2/y9AJ5M+C1ardeuX0q8ukdpELpmq5 D2mUOkTX5vIrPnXhg2Zj/k1zeyHoy/6gY7amwrSzKeBM/IfIu2bsKKWMJrTKMXkcEHNlq+Q1HW o+TqAN+mXDFk8lv0stFBUuGz8q3W7K3/wgx/iCc+jyUCQAWwTrv3PmFtSqsWJvHpVwfZD4QEhX VY9mwY58ZfpELMvKv9lVZUA1Mk1HgDleJERa466T6Mb/YhHO49REtVMMS+dV+CZFMdU+g+LFVA rDw= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="280053549" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:16 +0800 IronPort-SDR: wNMHIgvJSHN4K0fFz+zwzc+DoMvJEzf07ocolkHAzbJZUbMW4w0rZv2f5pAYsBELXViYuPodk9 KwfBbgCFCjx+ySCKioKJPcsI66z8+M404fKNuAhk1SLaQtmGeYkfiossmflAtxB8LDLMbBoeVB mTorJUQxIbU+/sXA3ISTMC/Lg0epZQ7NJj/vbunVrGW4jt/wKN5oMPOoJ3CzB+2qYqEaw9F1DC mpjXO5hMLivdme0MrVd2d8caqCDubFnxEPEDugWOTauBlRKtS1PMhPGQrp5LbHLt+qc5XBQ2ZI LQDM69fqVOyXz0+wow73sGBZ Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:01:39 -0700 IronPort-SDR: +cA50KmUZEek1zNyKbgHSwJq3ivCCzPmFEpIZhoxWBWiW6RTI78wxdnlRdBL6dNfZ1rXoDbLa4 5Y6eVkCh2SE0iMIfEbQB5FJPJKtfAYixeEWkQUAmSrROSZmOTcTOxLIA/E4iw5KMYAn3ulNeqa PZfBy/Vd+gf8uZADUW2YvFUnwnp42tuFWmuifVNx3BfddIrJF+O0+NUPqC2Tr7TSsfh3exEmtE dasoPnFOKq7/i36mTcSznyUuMjEI2Sp3YwbpaP+Z1gDJRLBzDsZ3Bm3queylYlgWO+UtnlJ/9m iWI= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:16 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 2/8] block: fix return type of bio_add_pc_page() Date: Wed, 19 May 2021 23:22:49 -0700 Message-Id: <20210520062255.4908-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Fix bio_add_pc_page() return type to unsigned int as it returns the length which is of type unsigned int and not int. Signed-off-by: Chaitanya Kulkarni --- block/bio.c | 5 +++-- include/linux/bio.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/block/bio.c b/block/bio.c index 531dbf15c0d9..803a0b5894bc 100644 --- a/block/bio.c +++ b/block/bio.c @@ -799,8 +799,9 @@ unsigned int bio_add_hw_page(struct request_queue *q, struct bio *bio, * * This should only be used by passthrough bios. */ -int bio_add_pc_page(struct request_queue *q, struct bio *bio, - struct page *page, unsigned int len, unsigned int offset) +unsigned int bio_add_pc_page(struct request_queue *q, struct bio *bio, + struct page *page, unsigned int len, + unsigned int offset) { bool same_page = false; return bio_add_hw_page(q, bio, page, len, offset, diff --git a/include/linux/bio.h b/include/linux/bio.h index a0b4cfdf62a4..72b28d06064c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -467,8 +467,8 @@ extern void bio_reset(struct bio *); void bio_chain(struct bio *, struct bio *); extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); -extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, - unsigned int, unsigned int); +unsigned int bio_add_pc_page(struct request_queue *, struct bio *, + struct page *, unsigned int, unsigned int); int bio_add_zone_append_page(struct bio *bio, struct page *page, unsigned int len, unsigned int offset); bool __bio_try_merge_page(struct bio *bio, struct page *page, From patchwork Thu May 20 06:22:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269139 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 B88E1C433ED for ; Thu, 20 May 2021 06:23:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D97460249 for ; Thu, 20 May 2021 06:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbhETGYo (ORCPT ); Thu, 20 May 2021 02:24:44 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:34428 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbhETGYo (ORCPT ); Thu, 20 May 2021 02:24:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491803; x=1653027803; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Cq98Q4TNoXcvhzaG/L8JwnMdCWcDvxDn82lEph32H5A=; b=V7qdyzrfCDMD57ObSjd6qVGergkSJsreJuJ/TW/Pl6pLWZiZBGKLOx1n R4Domw70+p6IW2pMaN1Eig8+GDZ1ZiWJr3yCpMnnVKZvvwKVhOYb5rdpf X7t2oSwSygkr3D9VFylSPHnyw9hGukNvSQ0QY/u6NSajQ4gT40eCwpHzz BaU5P4WCTkWxu8MGSDUbn3Ekxz31yzYdcmQl+pfU+R2nUOw9L8utgv3yc 8qn45QeBUKLI3b3wizwF3DWVz+absxlgdZkSW1ZVeXwLFtS7XDxTgRqC0 cWe5N9Ke/u9WjJ8rQo/xtiiZSAzSnMSlDIlc/tZnS8Rz8sbt//fDZ/E8Y Q==; IronPort-SDR: ctv2DqldVcLK+dX39iRBmdyEL+qT4LNFSzbx1+gyJ0oJZNVZ/1BitOy5ywZaT2X3BiZopTRIZm R+/eALl7YDVZ0lpJMpQfV9Q70DBCI9lKLcJ83bGqAaM2qoF19T/9s8K57R8uaVVK3OjMswp2Jy eyZpH48dNLWip59e5C6dcOZQapivZEm4Awrs+Y5ZIxsX1QTtflwfp+G8kpLfcADCzR7zdWu3s2 fQSj0cW9WiczEUynHvcg4QavTEuIuVlEQrAftPiyuK92NTt6lHjWjryM9XeSF+jZjdHSJd0FvG GKA= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168116735" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:22 +0800 IronPort-SDR: AQLxtqfNx43M21xbimAdiMyv37wys4k5XTf6fpC5vRFFTUVZafwiGQ5RPZuN4SRsUJzwDcB2iT cmpY51VK//4fYI9J69VYteJkFXPaBCp5gU+Ye8Qh9ibObOH4dq15XzHAIb9jBvpIQ/hvkwTmSd 53uiLt1avIFZI9zY5Qhb4vU8Dc1WPvIVxCqzm8w4hbXkb2eSnt89URYcmbxSRZYaD0T3hKic2s lmkFqEG1hOCva3uapErZDWNJGw25eI26vkIR+1NI6yAIJ4xyFvB18NajucVK3x3OJaXzmJIeVn 1khwNyMWEJ81k4COpElM0Gcc Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:01:46 -0700 IronPort-SDR: uI6KSgMQkV/rnmEu1CszatES/Ih3EpyY3Jfp+jBF8dKzY4PE+zQ1eCsa5IUK3OvK1oy0zMnm2z +uvpgvksAUkiKqn/dbr1q2CaYwmO3Aa28G0R8aVrUF5Kz41FlG3m1uJb7W53lUPthNMgC0FYfC 19l1zthdKuiAIOP1dmnokIZT0ajZRGsu5dbj5Bo4L/zPXWH3flMO+18DW4RMjEh/dnZ/DefHDb ypZ1rgDOig8p5F2Us+RZ1LpYBSlRnMycRe1dtOTJbZoHcVc2SmPyEwy4Dpd/3X/dBzsZgff5AU VC4= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:23 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 3/8] block: fix return type of bio_add_zone_append_page Date: Wed, 19 May 2021 23:22:50 -0700 Message-Id: <20210520062255.4908-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Fix bio_add_zone_append_page() return type to unsigned int as it returns the length which is of type unsigned int and not int. Signed-off-by: Chaitanya Kulkarni --- block/bio.c | 4 ++-- include/linux/bio.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/bio.c b/block/bio.c index 803a0b5894bc..bc0e6e93ed58 100644 --- a/block/bio.c +++ b/block/bio.c @@ -825,8 +825,8 @@ EXPORT_SYMBOL(bio_add_pc_page); * * Returns: number of bytes added to the bio, or 0 in case of a failure. */ -int bio_add_zone_append_page(struct bio *bio, struct page *page, - unsigned int len, unsigned int offset) +unsigned int bio_add_zone_append_page(struct bio *bio, struct page *page, + unsigned int len, unsigned int offset) { struct request_queue *q = bio->bi_bdev->bd_disk->queue; bool same_page = false; diff --git a/include/linux/bio.h b/include/linux/bio.h index 72b28d06064c..548d6a3342c3 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -469,8 +469,8 @@ void bio_chain(struct bio *, struct bio *); extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); unsigned int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, unsigned int, unsigned int); -int bio_add_zone_append_page(struct bio *bio, struct page *page, - unsigned int len, unsigned int offset); +unsigned int bio_add_zone_append_page(struct bio *bio, struct page *page, + unsigned int len, unsigned int offset); bool __bio_try_merge_page(struct bio *bio, struct page *page, unsigned int len, unsigned int off, bool *same_page); void __bio_add_page(struct bio *bio, struct page *page, From patchwork Thu May 20 06:22:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269141 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,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 AF220C43461 for ; Thu, 20 May 2021 06:23:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9778E60FDC for ; Thu, 20 May 2021 06:23:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230463AbhETGY5 (ORCPT ); Thu, 20 May 2021 02:24:57 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:61859 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbhETGYu (ORCPT ); Thu, 20 May 2021 02:24:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491810; x=1653027810; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ugKcJvlfNiqoUdI+/DlV4MQi8pgvztPAB+J3qsQV8IE=; b=bYoYFRMVzStz3JxMmjz3JCGlJ0a4be5DXcEfnUu4BPRVKxUU852lpWIA YX36jg2Hv6k2MCrwbytA5h01/od+KCsFzKGgGjyflkjdGCVObOZxn24ex P76wo7iatlqW+U7u5Q6e69Tzdvg2H3bLQSiRqTmbpjpjvvhJKYeWEwBfZ Iv2lcfTJKuiQ55ETUKNmgfzIte2L97DeGgkekasRdOzA7ZcAJzac9NAg4 GJEfoJ2IFTFDLLmS9LkZ5KIuawyJqz6PWOz3PQSKnw+6Po9MZ6VM60cFt +2cyFDBUYU/ppgJK25lfnVPMQkOsNR+2HDOxfta/NJvJ3Pgc7XLLkcSTb Q==; IronPort-SDR: GsQ79uH2FwISeAGlmjikuJ5iAFJqU/nDm/g8DqL5sG8qRQUgVt3udhcx0ojjLtOU2A7sUMilV9 1iBTIipxxuQfvISWTB8lsk2M7n9fSCTzhTtZkqDM9ENXSpL6VPZu7O5PDjheZAkdtNepluf6hP ssUvfcsc2sSsDBTqoVeDj1d7MBzuWaygaIf7ItYnRsu8CenTYIwoAjjHvFf9T4LdjrHJx0H/X2 sIAqBpxKnYCUoAUz9bPbX2s8nk4FGzQE4Eyo/BYSsoKfdoB/B4Nge1slvfZ1Z23HO5mj9U5Bhb QF4= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="169351397" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:30 +0800 IronPort-SDR: 5rCQrQzRWjLV2aMvc8MkVkPTdTBer0KuxbCuiUQUoVLlIZ8voOuxyF9OJ6XJcCknuPwQzRuzNx YWEtciAXioFPfmuOgWiy7JL8kLRih1MgMPCtYAA2YvCDzxRNmA43Os8jmPaMri6YsER7sVNEwu /6mtrImf2lCXGZkKrIQXDyu4LQWSPMTiSJZKeSe5rYytZnDhMw1hCMldeiyTC5Urn0zO6gcFsL 6yPHGj1TYja6Pv84SiBSIGKp+mIL8L5JJhrrIAEAynoF2ddx8rL482fNeZNmbHGh+ip3Bcs3Jz TMqIATCTcXLaBEzjrgX49Rx6 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:01:53 -0700 IronPort-SDR: 2gpASq6aHVKtr34lYD39+FFamrfboRcYTtQ3+kOl3I++pUeKUc5dqm8Gr1iFHF/Eus+ba62pKn QetlT1G6mzLK+9/yZZmg0TETJPsLNDaF/NvDTwlp2jTDu54ApDUxvdbhbdebgsQj5Zl8M4cP8u leQAMrqZx+JcjUWceXNnhX48s7Busnyv2pUlEZbZklvv6e4P4VYdKYegaINJC74rhI0O3HM1Y3 XbjEOn55WG2WQ6wPeLGcl+yN6OGQZTUSf9s8RL0fiu82gIiII3AeYGTe+dSUPrMJE8aJ4sg6NT ZKw= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:30 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 4/8] block: fix return type of bio_add_page() Date: Wed, 19 May 2021 23:22:51 -0700 Message-Id: <20210520062255.4908-5-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Fix bio_add_page() return type to unsigned int as it returns the length which is of type unsigned int and not int. Signed-off-by: Chaitanya Kulkarni --- block/bio.c | 4 ++-- include/linux/bio.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/block/bio.c b/block/bio.c index bc0e6e93ed58..346909d35bd1 100644 --- a/block/bio.c +++ b/block/bio.c @@ -921,8 +921,8 @@ EXPORT_SYMBOL_GPL(__bio_add_page); * Attempt to add page(s) to the bio_vec maplist. This will only fail * if either bio->bi_vcnt == bio->bi_max_vecs or it's a cloned bio. */ -int bio_add_page(struct bio *bio, struct page *page, - unsigned int len, unsigned int offset) +unsigned int bio_add_page(struct bio *bio, struct page *page, + unsigned int len, unsigned int offset) { bool same_page = false; diff --git a/include/linux/bio.h b/include/linux/bio.h index 548d6a3342c3..f4f0b19b2ef3 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -466,7 +466,8 @@ extern void bio_uninit(struct bio *); extern void bio_reset(struct bio *); void bio_chain(struct bio *, struct bio *); -extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); +unsigned int bio_add_page(struct bio *, struct page *, unsigned int, + unsigned int); unsigned int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, unsigned int, unsigned int); unsigned int bio_add_zone_append_page(struct bio *bio, struct page *page, From patchwork Thu May 20 06:22:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269143 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,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 EAED4C43603 for ; Thu, 20 May 2021 06:23:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D04D5611BD for ; Thu, 20 May 2021 06:23:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbhETGY7 (ORCPT ); Thu, 20 May 2021 02:24:59 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:63125 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbhETGY6 (ORCPT ); Thu, 20 May 2021 02:24:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491816; x=1653027816; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z5s+Hmzhk3z6KlToDBDWKR0Qgoub7jNFJttF+UEbzfE=; b=Po/x96R+i0Y5SFBfpyGzUzTtYPA0r2GBcOQFShsa5ZLjWPVyh8hnNYpw mN+bYBywpElNCL7B/7MY2KIuey7ogxLuLzRnZAJSKWQ2ADJ0A7w8lG4Ya 3qP9AW5uUrx4kUS2eIPNNoXUMLMvQHmQpULZddnWayuQr+jZP+JzZUvrY 3n2pbnCMPdjUVreMIo4UTSZ3G/mzLSjrLiF2zV0HgLvZ1Pv3F5okVtWc4 necOm+b6tzf0Vo3CT3X3bzXjNoUFY3eiH+MtAgLZAhmXxiCOxkJmF+zvC ACmnYezc7cO01bQQO7cC59oczfoFrDMV4NUsH4ZT406OGzzo2nSdpoC+c g==; IronPort-SDR: Zyvo+li0Fd/p4wHhIT6WkIiF01TiNFqpiFTvLrDYlHU4ruBDLAHStF6lEHofkncgUxJbEMDmOE Gili6MG59toWMGiehiX0WWLztfpuGAgNKmACoQF1cbFfD1XJHPfp0LlQAN51+waUCL8gBMZGyr j+UDj5PSstj4JZmpMt0PVVvjWyRRupY9yX8miO/QLz3bn7zvAfsFvq6t5yOQw2nqRRsoFd83yY /luYtXpKzxUu+wMpKSZK3lBfHqiHzSta6d3IU7zWJmIlBIStxRQWJiFlN5UgnVyOVzGDP3hK2h giI= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="168807085" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:35 +0800 IronPort-SDR: 0ycruDCXbFDWlsaamfEJaEUR6mmdh7MIKR4FaenQf5DzKXdIwF9aNYMnTgIY8K9xhV9rPJY7fj ipX/VTi11J95j3wR+j8dYLw7pZjokT0KS4GvFITVcR9MHrW1Y4Oo+MBlU6b/qBq/H4riaYb91M mdxmTF6pNK/lbM0Rn2MoZgvfC9/UQDwlpH0Yw/b6NSAOrLqb+QNaj80FFzXSmRHGGYKYTLF5tk Y/AkYr1ZPqoTpe3F0xKUHvw/+0GH6uPRPFX5A8Xs6LXg4p6Mb/WtxfgSiKXMQpmKSN78Y5a3sH z5bjh1RUw9S4tdiOYe32z+ud Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:02:01 -0700 IronPort-SDR: Vr5iW+u4XcvU/kH+bU4Cy8srqZizJ4D0AqA4oRm+Chn2jkmp11J7KZSpzJYd07W0Be74GNOKPI beeH8VOTwyZghuV65zQPrzC+jGK8HRapZXJnjsFR2kGpT4xR7bw5UKWjsHMii2FYQNt/l7t7cj DGJ4zxO2H4Z0JSxdg9Vv2rLUC/0A+q2QrloAsy6hl5+GHZm/7q0Fkf6xGNzDQYn8ox8NF/zyOj plZu/NrKYrC45MOh9jqtCuufWnIrUn/L5jUEL/7l4lpo2RZvpi4P/uk7/c7r9fNa6mapCQp0EW kXk= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:37 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 5/8] lightnvm: fix variable type pblk-core Date: Wed, 19 May 2021 23:22:52 -0700 Message-Id: <20210520062255.4908-6-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Make variable ret unsigned int since bio_add_pc_page() now returns unsigned int. Signed-off-by: Chaitanya Kulkarni --- drivers/lightnvm/pblk-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 33d39d3dd343..cf148cee99a1 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -341,7 +341,8 @@ int pblk_bio_add_pages(struct pblk *pblk, struct bio *bio, gfp_t flags, { struct request_queue *q = pblk->dev->q; struct page *page; - int i, ret; + unsigned int ret; + int i; for (i = 0; i < nr_pages; i++) { page = mempool_alloc(&pblk->page_bio_pool, flags); From patchwork Thu May 20 06:22:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269145 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,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 24CB7C43611 for ; Thu, 20 May 2021 06:23:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08F8261001 for ; Thu, 20 May 2021 06:23:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230394AbhETGZG (ORCPT ); Thu, 20 May 2021 02:25:06 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:49767 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbhETGZF (ORCPT ); Thu, 20 May 2021 02:25:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491823; x=1653027823; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nunN5GuIXk2/nPGEVYLemF8EPjrWl2/O0LwMGNtljJw=; b=rEc9Li+VgELl96EI5reW0hHGroT/VS7veo1ijXxqO6ggrkFFMmvleXI8 s4nM5A46I/L9BV3fGMTrd4dvNHDBoNAs0BXJMTCZe5Q6wQX/QpSear6/V 4v+qq4DlLBjYOszMJotesUX6Qh0hE6Umc++Qh6PD6rUUydi6MyLALXOkj R1vZc0bPAcUTANt6CHGXtnWK4UCYUTl69E7/gaBgN1ls2g76m3uS+cZne 5/ShZxWg+6d6qZjyyznaMrX9LCXlFyOcdSzi01YdOLhSEOdBaFeLvkstA Dyw8Rt4grdUDfaI0h5/BtnVhM+Ff+bmYaAKrnxQ/97AjKd6+QTA0T79e6 g==; IronPort-SDR: ct989G6QH2C5mnGGK5U5eMYjbXwpBuLvnuFy/OgBvz/0un9BaaOOuOsEavssSKR2jwk0uasxHQ KdSwlYIhy66SvB833KpY7RGT4sXHRHzs7wRTAjTbP0CxFPuGefgjQ/Vobl783VhomdggEZ9l8b xxQUgnOu2ABqND7gE/SuuFuBbOfP3MkKKZr7qE8W3ULztxNws2UxedOuukK6woeANDwuCbrCpp bmkC6HqifRZzYwCpTTgJ9RXdwF1Hlzu36WZj2q7/q8mO/y/q+XnXnCeO3kBD3xmPgxsMVbm8UB 6w0= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="173440022" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:43 +0800 IronPort-SDR: LZPRcBGMSn7/kqP4TXPZv3IIDtRx74xKRNzCY10hdQp04TAudw207Cj/AgrfQC6iC9aei6Tq3E jgrrQ1gDq/GM/lhWjQkI5Y376LBuzpGzwCNOWzbR+3kMDE9mrvEemks5V9o5HgwWsJ3vYlTYfu FgSAQHfx7EucIXmFm3lbsNAY/MtsYE7RncPu4crvX8TGAaBfrHRIGKKpqKPuYr8gqHZzfj5dLo AS88r6B4LVl1AwpHFEDvHhzHl5xmiXmimRVKWs80umYwh9Fiucwyg1w1PFkRrbWVzLP8mnqkE0 Gzy/jA8LXlC+zykicH8inway Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:02:07 -0700 IronPort-SDR: 39eVPLeTzO7M1jRrv2fjtvBFbFInN87TrFZNaIgYYBQoB9QFQDDBNMUve37lroxhpPmmn1P8nS Nzs6OuQHq28fFMYnm7jkFT138naHWeBXJDLQtKC4DL6DqW3Gyl7A6ec6/2ykRlIejJn5mD96R0 h+MkqQxY817SwkanlHxWCT458/UYXXBHr8uVBiCZ9N+m95hAFC+j49dEg0PgLU6J4b3pjGbCcq ViAOBc0H5D0mdL3O9VUpmgGuvUKEJ6XQ4wRao+9SzTPe8pfKEzw0F9f95W8/1fa4onJbQmtXZ5 Frc= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:44 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 6/8] pscsi: fix variable type pscsi_map_sg Date: Wed, 19 May 2021 23:22:53 -0700 Message-Id: <20210520062255.4908-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Use ret variable of type unsigned int since bio_add_pc_page() now returns unsigned int. Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_pscsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index f2a11414366d..6087661a482a 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -875,6 +875,8 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, goto fail; if (len > 0 && data_len > 0) { + unsigned int ret; + bytes = min_t(unsigned int, len, PAGE_SIZE - off); bytes = min(bytes, data_len); @@ -900,11 +902,11 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, " bio: %p page: %p len: %d off: %d\n", i, bio, page, len, off); - rc = bio_add_pc_page(pdv->pdv_sd->request_queue, + ret = bio_add_pc_page(pdv->pdv_sd->request_queue, bio, page, bytes, off); pr_debug("PSCSI: bio->bi_vcnt: %d nr_vecs: %d\n", bio_segments(bio), nr_vecs); - if (rc != bytes) { + if (ret != bytes) { pr_debug("PSCSI: Reached bio->bi_vcnt max:" " %d i: %d bio: %p, allocating another" " bio\n", bio->bi_vcnt, i, bio); From patchwork Thu May 20 06:22:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269147 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,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 A9DCCC43460 for ; Thu, 20 May 2021 06:23:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E68060249 for ; Thu, 20 May 2021 06:23:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbhETGZM (ORCPT ); Thu, 20 May 2021 02:25:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:49787 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230398AbhETGZL (ORCPT ); Thu, 20 May 2021 02:25:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491830; x=1653027830; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EXQYrOxZjgg6fIYeiBP7M89X55bT/59nLvijsn7XSNc=; b=O/tDvXSJBWQSz/vmlOjU7LhQOtE9KEmY4JZa+OsHvYcfhfFFwF7qAE5Y nMQMEUIXAZtBJMN8J676yJUb4lSAmxfUgPoVeVudRviG56k8XQaOFe8iE O/Gd3bhXQ+hiNVEUuaHfQNVLWs64+Kyr6K/BdmneKdKsQ2M5KEuA8IhNC toj73aQ8Exn20LsNO5fqm+Kp2aOgikyjXYXVwaxqzmhHhgRtCvOlQRd11 Mhnbs09k0sGJax7WadJacJrg+scgMEOVjo68zvpdpMWyeRnhCUfefgSoP otCBuZny4dIrni+MjgKqCtUtJA/5DVjBaiDMlTBS/CcJvs4wV40HdmRGm Q==; IronPort-SDR: 8xga3eza7VuP8pMoyKP+X81MDAAENaV2CVXXC0+3url7jD9NKSzqlp47Wed0TLUHj09xm24kzw RXNu1ARR1vo0uMs6Mu2IQ/be4R+qySj3Z8uo0X/lz4asLkJxLIC/hixv8JWR7UxQdy3mPRR78X rgmxGyoscQ731qYf5MZi3m+fuIzBy+RSKFXvYnUqIlawDPKURsDhoXC9SFeZrmsGstBQjkBNV0 Sdm8flpknsz1gsYKbW21tzjFkct2iA3O8+PvsUGbEoeUfwK+fX67KjSfSADr13S4ixZKdCtoVv 1mA= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="173440027" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:49 +0800 IronPort-SDR: lSWkZTS37S6BbkBJsoBTnosLR5XEhbP9b3bhXRtjTX9CvJ0eRpMBjOBTr1FbFUdespEWoiWFDS rVBO10vqHfUi0MfOGizu/NJZjJbyL5o6hmk10ysoqRBB6x14CPM5/1bsUl+TFekvck5YeugYtN q4p1RkVim7LA9dbWWhOihyGW1cY6Q5HQPm9bNzwCdDEANtfT8xv2PaQHSvVHWbCFYFFfmV7EA5 2bLikmLqleg9HBFOQHlGzvjG81xOi1RsJpaxZVJly+ehQFIgARs0MF9ZboABuIc6ngqOv8r1CO jTPWEGzyNhfJEi1FBtSo+w+z Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:02:14 -0700 IronPort-SDR: RVC2mC4pcgRuyBRlbPvl8QsnjikqrHlKsYWS88jK/HRicADlJ3zUQHFJKCDRpIFNRL/jphUV0L hKQnKr9TovrrPUfTjT/zxlH0CPyG/qVm8cqWuGjfW8B3uaWXzmvRqIAjYzu86sZ+gXMroEK68F hcmuw05fOUPwzkj/TQxr8Dj1KEaExMj+MYtXr7qEa5wg+TiMeohciwyaw7HDEJNz1FGpQc/jw0 ggIpqaiB7mcWfrBjzPDuK5n7gweIqK1v0sG5ktt00i+ohk/eNDLOi5VkIO2oMAPclRit73HOS+ UY0= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:51 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 7/8] btrfs: fix variable type in btrfs_bio_add_page Date: Wed, 19 May 2021 23:22:54 -0700 Message-Id: <20210520062255.4908-8-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Make variable ret unsigned int since bio_add_zone_append_page() now returns unsigned int. Signed-off-by: Chaitanya Kulkarni --- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 074a78a202b8..6ef276a95237 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3158,8 +3158,8 @@ static bool btrfs_bio_add_page(struct bio *bio, struct page *page, unsigned long bio_flags) { const sector_t sector = disk_bytenr >> SECTOR_SHIFT; + unsigned int ret; bool contig; - int ret; if (prev_bio_flags != bio_flags) return false; From patchwork Thu May 20 06:22:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12269149 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,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 DCF03C433ED for ; Thu, 20 May 2021 06:23:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC74660FDC for ; Thu, 20 May 2021 06:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230398AbhETGZS (ORCPT ); Thu, 20 May 2021 02:25:18 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:61904 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230424AbhETGZS (ORCPT ); Thu, 20 May 2021 02:25:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1621491838; x=1653027838; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Wp6HwlIcg67ctqyVvHN7QMtvugFozUtOOg6ywvP2lgA=; b=LKQGu6PlM4phPeMcSNc03sSZ3t20u7/r5ymix/PfMnwyoeg9zY/rU7zA e19UQM4qTcyQS3JQ1p/w6mNYASWmKN7Qe+U3S/5bZx8ZsPEEGVKfqYPW9 A6zckwPMaL05LLIQej9N13Ru88aTo3GdAojWhNJ1VQn2UTb9A7yn6n//u Pb/R6HF49SUR3a0JAUisoskX9O+CqD8zzasnvaZBcYNXYsPn5LV9JumDU QzBTTWfaABdQsi3bQ1DJVHix5Se5DRoZk9O5LUzTGpygWF5pjO+ZtEaQH GY/NvLxgklY9t+4tJm1LAZJDCvF5CxFemA0HfudUxLgjVpoDE/bmM8zcR A==; IronPort-SDR: 6U1IpFbD++LZRsvm0qUmRWpdg0soqgFdDvo8A75wsUYFQRTlDHJ77Sa/qJrVrxj4dR1RhcQVYK cjNIg+k2PoAvXxnodtptoP8xGflgEpE6P7+G0aBXG4vBssi28e7aAwHH4zkJQKnJrdMArcsHIo V8xqDL2FXRU3JZmrNbgWyuNvjpBL/iNVOhRUZpW5+lVzqde0mfb5zQMcK39NSN6tqKqki/8X9S 6BzeNp0/XNBjjgIdjOUj+1uVMVz+YSpIA5Fu2v7oHWnYMbXej2EduT/dczpNNJBf/2rn9SmWyB i4k= X-IronPort-AV: E=Sophos;i="5.82,313,1613404800"; d="scan'208";a="169351439" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 20 May 2021 14:23:58 +0800 IronPort-SDR: J82/g+aE3N3k32qb/6ktjHN3i8uo47juXMP12tVcKnAsAeLXm8qAmfUgRr7J/S2YOB7QZkxcDu iIsLeiyD0gR5YWWCBGc/qAORPG4jnCN3AVoNffkLUyC7IAAIkAv0q6Y8wEfAONr9e2SyrfMbjW dXThIcpmJOjIF8WgBVBOPTrqY821QHoDrZg/HJuwzDfKWp6HXoXnMaDOqXkJaTtNJE+/96gj0l gVxCNJ6FH6yPVeNmn//SvWslQPSLlvXN4Xz6I5uuxjsKpDICPw9YHsRHU22Bx53oz/038NaoBB C0n/U4NfLYoGzHDhN9hXgLIq Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 23:02:20 -0700 IronPort-SDR: WpzxWyMAbGCiCjCDX1m2OE/AlVYYI1Yp3LjmHmYPU9Z0UBKpknSQyelu3Yd7YCKQXx9MvmqtVW 0KPUMbVojiCh8NAfembYOfqATi1ga3LdqAIyniinkmzV7MVbZ9muVS3LBDkmeSlBZQiATT0zAD U4rIhpY4tolb8m7ttIlqBfvbJaI40lLnQwV1voqBm5YmrmMAoPgs+iFe9zsmqkjIz7QRU6uWec fqVUNSqtcsKLiPtM8zCe+CJ4zOCD2Nxb9VbxvM1reXK5M6UiQRCk1q3H/PR7Pl9mcUmmQxID5c uOY= WDCIronportException: Internal Received: from wdsc_char_051.sc.wdc.com (HELO xfs.sc.wdc.com) ([10.4.170.150]) by uls-op-cesaip01.wdc.com with ESMTP; 19 May 2021 23:23:57 -0700 From: Chaitanya Kulkarni To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: axboe@kernel.dk, mb@lightnvm.io, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, johannes.thumshirn@wdc.com, ming.lei@redhat.com, osandov@fb.com, willy@infradead.org, jefflexu@linux.alibaba.com, hch@lst.de, Chaitanya Kulkarni Subject: [RFC PATCH 8/8] block: fix variable type for zero pages Date: Wed, 19 May 2021 23:22:55 -0700 Message-Id: <20210520062255.4908-9-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> References: <20210520062255.4908-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Make variable bi_size unsigned int since bio_add_page() now returns unsigned int. Signed-off-by: Chaitanya Kulkarni --- block/blk-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 7b256131b20b..67062066c293 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -305,7 +305,7 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev, { struct request_queue *q = bdev_get_queue(bdev); struct bio *bio = *biop; - int bi_size = 0; + unsigned int bi_size = 0; unsigned int sz; if (!q)