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: 443736 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=ham 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 25673C43460 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 078A661001 for ; Thu, 20 May 2021 06:23:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbhETGYi (ORCPT ); Thu, 20 May 2021 02:24:38 -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-scsi@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: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: 443735 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=ham 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 7A4F3C433B4 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 5F6EF60249 for ; Thu, 20 May 2021 06:23:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbhETGY5 (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-scsi@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: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: 443734 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 10848C433B4 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 E8AE060FDC for ; Thu, 20 May 2021 06:23:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230440AbhETGZG (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-scsi@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: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: 443733 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 0A183C43461 for ; Thu, 20 May 2021 06:23:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E360660FDC for ; Thu, 20 May 2021 06:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230492AbhETGZS (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-scsi@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)