From patchwork Sat Feb 20 21:37:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097031 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,URIBL_BLOCKED,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 92088C433E9 for ; Sat, 20 Feb 2021 21:38:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F86264EB2 for ; Sat, 20 Feb 2021 21:38:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbhBTViN (ORCPT ); Sat, 20 Feb 2021 16:38:13 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:65529 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhBTViM (ORCPT ); Sat, 20 Feb 2021 16:38:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857091; x=1645393091; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lrVqzjG3GG6vMX9gO62Yhk/jVAU1NUt7V7kganSmJYM=; b=EixrUnqIZX1+rAb8W6r7tPIH5wrsaGZff/p8gRkJcgIejy3PUKOXiy7T Y6q14PyYDmoFKWutCtmtLJhWE+WyA43+VVe+gYk9zhc6NEx1wtaFhhlVw MoaEmBJB0fYqmL0fVgl3z+V4E6S5wCs2n4ygxgyImNRFwqrXUfvzfcTdi +kAO3xX4Dg6U9pshEiwd+AK+YrIh+F3KfyoHJPpLP5UfH7QFeF5pL7y+v ZVPqYtcqmsnQVhAPm5VN/RjuTlOlYcWSQHq7Ebs9Roe4a+qI6MZI+drMi wkNxFLNNzzhR8GaVASD3o1C0zi/9Nx2YJhi7o+eMrZ8O4gz28IBYJp7Jb Q==; IronPort-SDR: J+M1bHqF0NwDT5C0u8C+N+48s4iAMqjlvbXkT0jnTypIyEsk+gKee9me8/fndCTPRuKSDtGW7X 0sCWrUWCEEIF1UAXzYmOKHywUj8CFTBZEYCdei0+JBeP8MfMu42zPr99DgIow0x/wOHS+VrCB+ xDpOKpcxtaeTyk6PXrkg7Ing9B1inmIintad2A5I0eVM5F1Vx0qkEPKQ8R94XnyI62HCz3e5gc MoB61XMCjzx0oiyGVbmR1+VGtQFZOvy2yWnn9SZM96qbOVcmVr4TTwv8anziUZmtJ8pBM70Bwa A+4= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="164901568" 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; 21 Feb 2021 05:37:05 +0800 IronPort-SDR: LLNWU0s4jIX1sakbV2xxAalHMLof1zxxkjtqCeS/1G8iIfF226bB3+459TKMWOrrXOzFuJcJVC IgWAT8pz2nGPs6FzU+sWT4AsldZ1flC/lup/5a0l1npQlvoZAxyGdxy+Ow2L9si/gcKolkZSSA 4wSB7D60c2ov33wIYLrLLuMFN+/rUWClV6uRsLoRV5V5hNMpPXvwGhl+cXJ5QNek8fBOZNo84+ jmB2085L9G4ObOKtcrEqnjiBJ8BumkjtO7aSoKZT1tx/6+H51mGq3TFfE8qZ+fULcSnTy6yJjo DwLWTGOQkowLF7TCxoFa6FC3 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:27 -0800 IronPort-SDR: KOHPrM8J774qa6wApHhFE+sqkgQ0eIs5nn1nlD9NgGKIDFtutoX6G4ndnAbOonvNtMMU1942eU J3iLJOQbHL0emspAxdaH74GVU23v+mu+9zJVZ+YEv4dQPv4Nvp+PaWH6ZmudSq2zdzMsWKiipR 0Ibdg4gCDFyqvzl9cjj4mFf+lEOgg5Qe0e4pkKfT/9PQVmLfp59PNnnuJTAcbvBXYsmfwz0Fsk N7BOIvz9TVo2KRs6d+EH/7Sah2PE5oUhkkfhzY2cHc8iTg9U6Rg8BymHDanv8mcarIMAcc5mN2 8tk= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:37:05 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 01/24] target/iblock: remove an extra argument Date: Sat, 20 Feb 2021 13:37:03 -0800 Message-Id: <20210220213703.6334-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The twp arguments to the functions op and opf which are REQ_OP_XXX and REQ_XXX flags are belongs to the two different namespaces, i.e. they can be combined safely given that REQ_OP_XXX takes 8bits of the flags and rest is available to REQ_XXX flags. Replace op and op_flag arguments with opf. Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_iblock.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 8ed93fd205c7..4bb34711bdc5 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -304,9 +304,8 @@ static void iblock_bio_done(struct bio *bio) iblock_complete_cmd(cmd); } -static struct bio * -iblock_get_bio(struct se_cmd *cmd, sector_t lba, u32 sg_num, int op, - int op_flags) +static struct bio *iblock_get_bio(struct se_cmd *cmd, sector_t lba, u32 sg_num, + unsigned int opf) { struct iblock_dev *ib_dev = IBLOCK_DEV(cmd->se_dev); struct bio *bio; @@ -328,7 +327,7 @@ iblock_get_bio(struct se_cmd *cmd, sector_t lba, u32 sg_num, int op, bio->bi_private = cmd; bio->bi_end_io = &iblock_bio_done; bio->bi_iter.bi_sector = lba; - bio_set_op_attrs(bio, op, op_flags); + bio->bi_opf = opf; return bio; } @@ -479,7 +478,7 @@ iblock_execute_write_same(struct se_cmd *cmd) goto fail; cmd->priv = ibr; - bio = iblock_get_bio(cmd, block_lba, 1, REQ_OP_WRITE, 0); + bio = iblock_get_bio(cmd, block_lba, 1, REQ_OP_WRITE); if (!bio) goto fail_free_ibr; @@ -492,8 +491,7 @@ iblock_execute_write_same(struct se_cmd *cmd) while (bio_add_page(bio, sg_page(sg), sg->length, sg->offset) != sg->length) { - bio = iblock_get_bio(cmd, block_lba, 1, REQ_OP_WRITE, - 0); + bio = iblock_get_bio(cmd, block_lba, 1, REQ_OP_WRITE); if (!bio) goto fail_put_bios; @@ -688,9 +686,11 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, struct bio_list list; struct scatterlist *sg; u32 sg_num = sgl_nents; + unsigned int opf; unsigned bio_cnt; - int i, rc, op, op_flags = 0; + int i, rc; struct sg_mapping_iter prot_miter; + unsigned int miter_dir; if (data_direction == DMA_TO_DEVICE) { struct iblock_dev *ib_dev = IBLOCK_DEV(dev); @@ -699,15 +699,17 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, * Force writethrough using REQ_FUA if a volatile write cache * is not enabled, or if initiator set the Force Unit Access bit. */ - op = REQ_OP_WRITE; + opf = REQ_OP_WRITE; + miter_dir = SG_MITER_TO_SG; if (test_bit(QUEUE_FLAG_FUA, &q->queue_flags)) { if (cmd->se_cmd_flags & SCF_FUA) - op_flags = REQ_FUA; + opf |= REQ_FUA; else if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags)) - op_flags = REQ_FUA; + opf |= REQ_FUA; } } else { - op = REQ_OP_READ; + opf = REQ_OP_READ; + miter_dir = SG_MITER_FROM_SG; } ibr = kzalloc(sizeof(struct iblock_req), GFP_KERNEL); @@ -721,7 +723,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, return 0; } - bio = iblock_get_bio(cmd, block_lba, sgl_nents, op, op_flags); + bio = iblock_get_bio(cmd, block_lba, sgl_nents, opf); if (!bio) goto fail_free_ibr; @@ -733,8 +735,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, if (cmd->prot_type && dev->dev_attrib.pi_prot_type) sg_miter_start(&prot_miter, cmd->t_prot_sg, cmd->t_prot_nents, - op == REQ_OP_READ ? SG_MITER_FROM_SG : - SG_MITER_TO_SG); + miter_dir); for_each_sg(sgl, sg, sgl_nents, i) { /* @@ -755,8 +756,7 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, bio_cnt = 0; } - bio = iblock_get_bio(cmd, block_lba, sg_num, op, - op_flags); + bio = iblock_get_bio(cmd, block_lba, sg_num, opf); if (!bio) goto fail_put_bios; From patchwork Sat Feb 20 21:37:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097033 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,URIBL_BLOCKED,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 1731FC433E0 for ; Sat, 20 Feb 2021 21:38:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC4AF64ED2 for ; Sat, 20 Feb 2021 21:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229868AbhBTViW (ORCPT ); Sat, 20 Feb 2021 16:38:22 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:7743 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhBTViW (ORCPT ); Sat, 20 Feb 2021 16:38:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857101; x=1645393101; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jZFst8sgmY9Obf1LTiiORykZGewLSEvcKZaTOWLd8ZM=; b=A5vTcT/5KlXLivLdCp/GsR8+emGfDaePWvaJ4Eq5jFL+hLpKGZ8hSHBw 1YdTMuWP3XOueAPjdfRDiv+2jIoeLKv/5XWE6FPmBVqksBeKsnV9gAnuc 1R+Gk8ljq6tyHUSnJnLhvxJBEYYAUvtqvuwL8rvMezKJiqsto+9l/Bx/k rrEk5R8sTEUPkL27AjJ/zofcK+349JL3bLnUb1UfopoTFhenBa1vODWy4 NJT3oaz8mBxPoLqT7WhjNJoyRNdQ09s7o3T0/6zdspyd/hw8HaacqDyjv o/QbrbEaI1b1VaZzUiJtFhmee4wDbt+5ZqNyEZZ3Nkqdh/p6C0OVbbNh0 g==; IronPort-SDR: 4PSJJKBKyUFNe7Qo5FIzmycwC6Dj3b01MaUq8sTWXQv5/UqsR0+c8EvhlvFWXyFdnajkMFc/O3 L61bt4R6tdnM0R39/o9rAsRCjzejgJCbLmr4KYUu4t6RkPaGJZAxzZqgkRi3IkqY21bW6Hi2ny N/LJi4UgYkmXjzNtDTTb+xhPhIRQqEv2gGGOM9uywUHAqA8xXUtbsI4jnP4rbh54f6kcKW2pld JbvjMe/nS0ZKru48NG7zeLlIo32q3DpxTTf1W77vvVpGd58P9CVOCuXctfGFec6irWiqkqlNSv ngk= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="160432888" 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; 21 Feb 2021 05:37:16 +0800 IronPort-SDR: LPmlV04I212UqusbjREN7sFrKQX6e1iSRoXhF4CAmuZ7rbr9Ita6TkF3q8sBcBKRQMMNlPwItr 20UzIeJbb8NhiWBbAsIyeQVEhqAKI4Qq9eb7e8IZ1wREt8C5zgDv559uUBsa5anuYtxa+9kP+T dI+MnPxZGj+b1YMjhkGM/1jUUt8jb86li9ansDDgTC+cDP0hJJVAmzb/baiKVnZasYmuQ2UoXL n5i9CRIkbkccRtmYij2oNLC+GNmyXfhf/U69nYJFlc76yoy0zYtpPF1Ck7XhC4fXEUrieLbMTn 72M5CkMnmCV598va4V9G2ffB Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:18:49 -0800 IronPort-SDR: NHyjdOVWRCOwB/8O/oi2Y77kmQWGIdxKclv+gpsKoJofnUc/KLwTPHQkvEZzu2YTgfntWa0BN2 nDLC8kesniOgqbNeGWXX7bz2Kq/Nr2wiAi+wGHBJXUq8nLxfTV6Ck5vEvVTJopB94DG0T0iM2v j7atk/BfLkUhYsqbdjQdv0p8UlQyif0k6kPyefYPhWxfmEisgys+Ol+X8PnGNsAk3Y+cl0NWr5 9TCRfhXfahDWoefrZjEUSAmaW+UeKY9tf8p5Evgy5ssxcr4yyddC/YjJt51IuvXsnRef7AZcEa h7I= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:37:16 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 02/24] target/iblock: trim down line longer than 80 char Date: Sat, 20 Feb 2021 13:37:14 -0800 Message-Id: <20210220213714.6378-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Trim the lines that are longer than 80 char, which is inconsistent with the rest of the code. Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_iblock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 4bb34711bdc5..a2727141388e 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -816,7 +816,8 @@ static unsigned int iblock_get_lbppbe(struct se_device *dev) { struct iblock_dev *ib_dev = IBLOCK_DEV(dev); struct block_device *bd = ib_dev->ibd_bd; - int logs_per_phys = bdev_physical_block_size(bd) / bdev_logical_block_size(bd); + int logs_per_phys = + bdev_physical_block_size(bd) / bdev_logical_block_size(bd); return ilog2(logs_per_phys); } From patchwork Sat Feb 20 21:37:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097035 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,URIBL_BLOCKED,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 2FED3C433E6 for ; Sat, 20 Feb 2021 21:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D39464EB2 for ; Sat, 20 Feb 2021 21:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbhBTVij (ORCPT ); Sat, 20 Feb 2021 16:38:39 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:38402 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhBTVic (ORCPT ); Sat, 20 Feb 2021 16:38:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857112; x=1645393112; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MpSgnprcjeS7I0iYE914cF1ddXsLy/QJDigDjwIt4mU=; b=fmD4Tsti1iMEUvFiSCET7KZU2E6sAAZW2FtFZflo8aign4T530GdF2Dv y8YwPnLUz/XndVgdBAWXwIBEUUZZPT85npWCDb+VOtRtUYQHe6qWs8k2d 9K9aJvMcMos/bOcMB+x8j7J0UoiuIucETb3jYKqmGOqxKiI+BTjfthXYm RZhHj2YeQrP2DhgA8naUxuAjSUexDAC5KIxxTWJtw+r31GB9JbuSM/ukE Imb5E1/GKRXvQQLT0wZTpQKcuIUFU1OjQLXKG5+pAoEUPxKpRUq/OUet9 a7pU8ydJMUjZtsp8onXY2woGC5V8dzKNbjy9P+D3i8+fyKcOLQXIQq3hh Q==; IronPort-SDR: /VKUmK49+rq8utSRhAzXuRBZlm0sntQOIGYsqfvkw8KBIIfbHYJ7VBK7odAWzLBhV+WnlMFwLP oJrkKyE3Xd5kIP+hcY4FvVAyDC2zR4yOMANBaLF8U4rDgtY3wP3KE421Ev/MYo2KI6p7LQszZu OUYBlI89KNwWW1YHdgxptBOO+Faiv6ntjlpR3fjLdxjFj7uSNgTyKsKah9B+PbVj4pCXzU/1hx 4+0d3+I5uYhp8b+bygND6oBcvZVM+mmhUDz9QF0c019tctg1nTqken1u9NyFchyFov5ADKBfGZ dh4= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="161591262" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:37:27 +0800 IronPort-SDR: DbOzXyTaAt3PvZtnDJErvHcHS7dn8Y5i6oAWouTC2r4mthwg+PFpHRHscreuBqCj0yzkiLhgap iS6ZAyjRC/SZRZRPC2tnedQvzlNX4gwEtUobkeG7FAVErpKmXdH325kk/I0yrpv+fFeZeb1Rzc FkfZomP7mCT2gtiUV6JLCRUP32E4RsKWmKtFwWHYaVATjcU138j8jZ5ydb8lQlTI0Ry6jFsxYk Y8HsDs9KN9btQ9V3O3uONi3fFpuRCnY2Ep4BT/6Cd8WCLalx6PEstfuOx5HyoprpMVUlpKP0J8 BFg8yZzXHU22Jxy5v67KnMB5 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:49 -0800 IronPort-SDR: xnF6LwXWRf6Vend4FSTWJXEvr7/iW9tygZY6xHM+3omNNfWrZ3QmCEQmtxP0NkS39BtPYMdRpf hXyeXF6y33D1+6vOTRQ50lj/Z1v1wfAgoN8pFN4BB/1gAlkqU34kL/jFs0JFIVfgPpnAInhkaN wkDW2DbbxVJZ6dFNoUBPCIK2i327rhzvjRCDK4ADxk5ij+XhDgs9ps77zptzLrqZEWZ50nDJ5D NPwliVG69aI5ZGRzY1h9Y+dOoQntvlh1/N/47HSmx5JyIu1f98nxQf03KlsuWpwPoLLUMvmxK6 45M= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:37:27 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 03/24] target/iblock: fix the type of the logs_per_phys Date: Sat, 20 Feb 2021 13:37:25 -0800 Message-Id: <20210220213725.6444-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org According to the ilog2() it expects 32/64 bit unsigned value. " 147 * ilog2 - log base 2 of 32-bit or a 64-bit unsigned value" Replace the type of the logs_per_phys from int to unsigned int. Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_iblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index a2727141388e..e63e2eb49570 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -816,7 +816,7 @@ static unsigned int iblock_get_lbppbe(struct se_device *dev) { struct iblock_dev *ib_dev = IBLOCK_DEV(dev); struct block_device *bd = ib_dev->ibd_bd; - int logs_per_phys = + unsigned int logs_per_phys = bdev_physical_block_size(bd) / bdev_logical_block_size(bd); return ilog2(logs_per_phys); From patchwork Sat Feb 20 21:37:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097037 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,URIBL_BLOCKED,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 5E6EDC433DB for ; Sat, 20 Feb 2021 21:38:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35A9C64ED7 for ; Sat, 20 Feb 2021 21:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbhBTVim (ORCPT ); Sat, 20 Feb 2021 16:38:42 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:14596 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhBTVil (ORCPT ); Sat, 20 Feb 2021 16:38:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857121; x=1645393121; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lU6zMaKG8LbhBB/Xn68UjJ1cwLXPMILhA4Tb/E44PSo=; b=KkV3y9/xFWD2mJQu6Nui+3Ye5nCWNk4XKWcDXG0lzk1yiL8nU1Z6ZYgZ gmgXsY/b8q1dxUWk9OIZK4tMr39HmFWdj95nsMR97A1ZGbxrNrJKPoQak vtdvtfNo3kN9OO/TjVemuv22sd9zzbeJlgUGkWA2d4c0W3naX2SJEIiI+ XqLQ9pZ7uqbHUW3IbXw8XCNepms3eg/aEKn8HNCyu0NtO6UuCXJn8VsnR BbaJpzfGuc2XCoRy/JioNeH/2o3ExoTUgjI8q+j7e9kLgOxvuv/cGXaJV JT76OX/mBs351DngdrsGKIKUxXEnlaICKt2Z7ya9eEnxgWaVAfZDMIYZ4 w==; IronPort-SDR: tDGL93ctwgxP7HtJ8GHtrO8AoTmjBrLuua84sS+UDTXJJcwuKbKDjUqnD072H6Ib/BvrYluRZi cLm2Cui5OW7wmMT7VeIFdL9ugY9iU3IvD+gNX/sO8EANonxjpsBvJcjX+X505tR6s/l++fj0ni V+JSDT7kYAc+JjqGd5Efsy7P2TCt+Cz5dPDdxGB8GAUuW4Uz+kyFtW40Xs1u0EuNL/S1PlnjWU CZhAnCazLhFdhYmzq1+HV+WYE0hsTjFyxHwnqxocm0igf5yoCbzckNDo6Ko303lAPNZYRbn3x6 Vnk= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="161591266" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:37:38 +0800 IronPort-SDR: s9EG4MmG1fRGpd9AKa1O67ocJVlQO/KucoyLiG17RVtxwVcnJ+7ldVZzyJzWqTA6vD4ElbRbwv g3vpwKhiCNpTcplPxaXrHmjXI/adOT/3bS6zeWh4Zypqa9xxhZFxxbfGpntYSkqoaMRYUvs/OB ePJ6ch2p1baLmIsvpCw1KxXMz52p19RZ9Wmbw/zAL0C3oAJxZe3JesDA0kuOymMVH9niGIEBBu etQO8PXAKny0FHBEsBqvN3Bh3ogz+WvK3vbq84fxY2+fF8TCGt4oMzUsCHfMNcL37hKxXvpSqu Ex05U9qrs+vXRv1ZdMBw4mY7 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:21:00 -0800 IronPort-SDR: bi349pejCMqWSK+LAejhoIw7AcXIaBBkgndkUeXWGM7lubbLBgUUfHZWUWJzUqHe9znVDGEG9T tGohQibMaMgpRrgT3tLAcvpGtKGC62xoQREea6p0PDvfJVWIpm+6fvwpU1x6F/N0LHIFKMSsbT JF8rgIi815uJdY2hFCOP4BwvFGxvdeu19sSwfBJv0GxRu+QX7kT9xFDH4PVRuzFm2sOurJTUiP oQ4nmZGYji5OvAYiD3S89fxptCnCvUjMp4SE67MRM3bXH2Rv+TvnAP4xDQL3NR2fOpQNCFJvyL bbM= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:37:37 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 04/24] targe/pscsi: fix the warning in pscsi_complete_cmd Date: Sat, 20 Feb 2021 13:37:36 -0800 Message-Id: <20210220213736.6488-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This fixes the warning in pscsi_complete_cmd():- drivers/target/target_core_pscsi.c: In function ‘pscsi_complete_cmd’: drivers/target/target_core_pscsi.c:624:5: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ ^ Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_pscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 33770e5808ce..003f6867ceb0 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -620,8 +620,9 @@ static void pscsi_complete_cmd(struct se_cmd *cmd, u8 scsi_status, unsigned char *buf; buf = transport_kmap_data_sg(cmd); - if (!buf) + if (!buf) { ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ + } if (cdb[0] == MODE_SENSE_10) { if (!(buf[3] & 0x80)) From patchwork Sat Feb 20 21:37:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097039 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,URIBL_BLOCKED,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 711AFC433E9 for ; Sat, 20 Feb 2021 21:38:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BBDA64ED5 for ; Sat, 20 Feb 2021 21:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229903AbhBTViy (ORCPT ); Sat, 20 Feb 2021 16:38:54 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:7788 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbhBTViy (ORCPT ); Sat, 20 Feb 2021 16:38:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857133; x=1645393133; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JDU7SDCm01NsXllctHlPOh96jdpRImezuze/IxEVfk8=; b=X5ZIpIqG9mjrd3RUR8XDy6OsJypOQAkDLPuEwZ5utIIDOfGVsQ43QUrr T0B/pugjk89RitfrUKtKnRRgf2gRhcufTOeEdnP8QJXHw+IypUSzEuWaH iiR/AdiF+2ZAc28zaSGLDYIkVms0VlpnClaBXJNsFUFNLLKfiDlIpkm1c CYj4sNK+jnThHGkIKc5dMb78fzpZtPv9GifKGR03bM/Wm2dTRaZwtE07w SxIbcZOsvsfOXie5HHOvchZKTIg6dVOx/kyC9WLMwZU00zguNvXe8ah8Z IANdhWNOrdxeWLDL+jDiR7mgvGjlD0qe0eFGIootADAIYApAjJGcnuI9o g==; IronPort-SDR: +1Ejoi5aMwI8ogk1lL+cyMrA1RFdsVt8N+J2KJOxKxP3AHHDnN3aLXUmm7dDYq/8KX2pfLNXIa 0IHzR5RFC9PuggFamjNk/MYaMY3o1AN+/yZUoSlhMDui1nv2XGFwvWPpMm48IjxK2Oi06z1NMn KaBKQVMcETlDIZPBGDqc1neHBjg5fjno4hwFhebitmnkY7afWKihOqGEc5HejJWEk9QNlKTCw0 0y9cu+iHXZVgneDWeTRKZspI9QgTeqNM9zUTsxzJRxwdYqSgGNSO1fWQUHZ47CTNaJ01x3I+Ci Zd0= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="160432904" 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; 21 Feb 2021 05:37:48 +0800 IronPort-SDR: KtRsDXXQ+llD5icXc0g39G2pXy65BjHFSCeQgfVbbI0bbyNUgqZRIl7A+wDIoiZXn5ExnHZOMl uDOg6cT7PI4O2OevisxJO/hYvLinQId2QXNxGrCCxf7XaXZCMZLRCqQylXm7hrMGvnLDR9hLqV k12afV3h+EbsqiTtT6efWpHjH7itV67050xb+TFhLyjJ4rUZSc0fzw0grrYi9k86Th+TsAWjRi RHnstOSiUNMgkwiTxp43DSkWGJe6keFZaSzJE7nrNSgfB0Vel5fkyMH68n20iEmfX3A2vVdBYA 6j8U1GiYDt37M8RRyczN3pZd Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:19:22 -0800 IronPort-SDR: QqPMlDXQTqKIryP6MnUj35pcgu+i5mg24OhnQfSS/xKAQSWC8xFNYoyXbzFR6QM1x30Wyaxw40 yewt/DEptp3lb+2ron2KbM70/hxtbAYXiApHxkqzzQ9+bjIt13xyNb0+CKqsu+TferWXwCMb4F 34ElktrunTqZ4tyn1TvqUa7o4aVdOm8G8zuoJwvym9E+5Zp8pnDbdi/PCyFn7tkMQ4iahcIViQ NKX91oRVKMgW/rec924UnUCwcc1hulIaNgrCqaHY/uTl7swN8feSFsihc+KzPiyAjgJxHRXOWm 64U= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:37:48 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 05/24] target/sbc: get rid of the warning in cmp & write Date: Sat, 20 Feb 2021 13:37:47 -0800 Message-Id: <20210220213747.6533-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Rename the i->sg_cnt so we can get rid of the shadow variable warning. Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_sbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index f7c527a826fd..7b07e557dc8d 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -448,7 +448,7 @@ compare_and_write_do_cmp(struct scatterlist *read_sgl, unsigned int read_nents, sense_reason_t ret; unsigned int offset; size_t rc; - int i; + int sg_cnt; buf = kzalloc(cmp_len, GFP_KERNEL); if (!buf) { @@ -467,7 +467,7 @@ compare_and_write_do_cmp(struct scatterlist *read_sgl, unsigned int read_nents, */ offset = 0; ret = TCM_NO_SENSE; - for_each_sg(read_sgl, sg, read_nents, i) { + for_each_sg(read_sgl, sg, read_nents, sg_cnt) { unsigned int len = min(sg->length, cmp_len); unsigned char *addr = kmap_atomic(sg_page(sg)); From patchwork Sat Feb 20 21:37:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097041 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=-13.8 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,UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED,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 18749C433E0 for ; Sat, 20 Feb 2021 21:39:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE0DA64ED6 for ; Sat, 20 Feb 2021 21:39:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbhBTVjG (ORCPT ); Sat, 20 Feb 2021 16:39:06 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:24626 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhBTVjF (ORCPT ); Sat, 20 Feb 2021 16:39:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857144; x=1645393144; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=a3O4OuuRcJWiUJGkluNQlnmV9xL7PI13uOtxrgN/iu4=; b=Bbn3dJDDEHz27F2RfdON2KFKr9TsYQQJTScwhh+8QlICbvIzDvo+4Y52 fhnIekShdYRiGAwgQTIFAbcp0Nx7X3ks5RvuUOpSswy7DbDe9j/Y1nMct aF/9EEq5Yk4JcnkMdG0EPVlCC7CqDQU9ZPrj8IOyZ/PDFyW4XilEczBPZ 8KHk2FkHyCA6zmPXq8AUJ6yP2XXuLfC76UVqij2+l+qNlkg0rSKXl/DZ3 KIVi9CLkBBGqRx12vgP82A7UmwgKFDq8b0lJDdy32ZKWbBEBkbd1Krs7G NGSGLsGBcjcVNuNa3juw20AmXtD7kysXwMPdgYdXpoy2SaYE8cG8fKZq3 Q==; IronPort-SDR: 5gkI+QBxhY+v8lV2aOW4bFaSO6Xca9MXvQ9GZXeyEsJhDQzcltU/q532+GfcbkrZsUSlt67610 op6+JCqyANMVpGbBgthJKNeCTMJC+XkwRkzoRiLMdmWN8OnrbNDBlexyNl2mjjeouDoiK/EbnB 1shS9oH/Vk3wlbhTqk3yde6HApY8Oy6PNzq/MgEq3XzHtEXSzTkpe4UdOgxubGRAE4ud8TDsqF E3tb4uB6S9RA2LqJEfpqyQubWKIXg26eRaX7JUuXmSYFdyoPC8xazt6A4xGFYcKTjUqAh1RQ4I N1c= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="270954940" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:37:59 +0800 IronPort-SDR: e56jwIehBcqz0NCtY7uXfS0Ud28VPdw2E1hD+uJK45YOi1tXTd4MDG+av+niu9letELGPeefOh jYe3nmPgdf8OmmJRt6Yle8y+6hZERRDbXVazHn5yf1nmsySC0ahbO168tEilIyaXUt8150pej7 3JjlHJ5iVsNk8WP/JLv1GMIHs0Krj/Dbe3cFBROb/Uz+PTw8o3Wa0dP6gmRRLo4pj7RVhfhNRT /vkH+8oDTHjS/0yiwXc/TEFyg7BZrMQdSc6bLCrX9wHxCyTfc/znpUVfbWwIepCvDZ/6PD3+tI 1yln0hl48+/vo2JdYaT+/Tg4 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:21:21 -0800 IronPort-SDR: gYlZXftLo21f6Vun5NCQb0OYohaGDURUcOPMnoLKTTdcLsPu2s40N5vY1NRoTvDIEMN4nN8mIH LDuc+/0cW1KnDg3PD0gG0Dq/SUCgcq52ssfTkHaX8epYth2wCwfclm6HmwhfcQq1t1T8AvV9XD CsIW3Jp01Gg/1k6fy8+8ef3YivvcLidDwD2UgaQHcPbuNzVXjnvldsD457qkAHowQYDcMbHFgn WB6IyOoFzFKG+zDaTcduNfwvC/2stMyu5jGLz/DrsJwiyiF/oNCslbpLht+fvt9MyormIA5suL mzQ= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:37:59 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 06/24] target/pscsi: remove unsed macro ISPRINT Date: Sat, 20 Feb 2021 13:37:57 -0800 Message-Id: <20210220213757.6577-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_pscsi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 003f6867ceb0..3b57e9c50c55 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -34,8 +34,6 @@ #include "target_core_internal.h" #include "target_core_pscsi.h" -#define ISPRINT(a) ((a >= ' ') && (a <= '~')) - static inline struct pscsi_dev_virt *PSCSI_DEV(struct se_device *dev) { return container_of(dev, struct pscsi_dev_virt, dev); From patchwork Sat Feb 20 21:38:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097043 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,URIBL_BLOCKED,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 BA163C433E0 for ; Sat, 20 Feb 2021 21:39:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CC0F64ED5 for ; Sat, 20 Feb 2021 21:39:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbhBTVjR (ORCPT ); Sat, 20 Feb 2021 16:39:17 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38804 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhBTVjQ (ORCPT ); Sat, 20 Feb 2021 16:39:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857263; x=1645393263; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xgBVSamztb/QEVlrz/STMNpxk152lgYhByCwg+nA08Q=; b=ZrIbHUJXXmJtX/QGcY3vCjij/oSJTtEcTnzIWw/PHyl55jXXFki3Ci31 F1ik6ybkuTRguVzfKYZfsRQjNMBcVy23UKSkT4sgt2kMDaU9DkmWKVnYj YYABi/k2lZZbMgm5JmDsxzGO+8K6HU/pZBVK8neSuffM7fmuhZUNdUli4 iceOYxX2q0lllDukFteDhP9D+9zV/6eRhR+JgotJJK5LdPbrewdzagPYk 5fGM1x3IO+rKBgudOw+aGaN0i8Yjjz0YryYmTiy4977+AOxgUW8u5hNQQ lCbF5MAOJg3OZXOpQGXdxpJ7lQs75tTnFOwzI8yp0mzj9vQwjPF3DygJs g==; IronPort-SDR: reCtUSe1M4gIHtCNmdVhlPK4Jxzapxy4o/vdwm+Jzwprun1sQ8ua4aGB5FRib60ZI30sQoeqAE 1AusB/QaBfa4yFXIrcj2L0PXxZIE71gH7zWf98u+w/qOb0ZdhDN+KhuhNYQl8Oy9M2UYGByNCx XaPpr5sBp7OZ/rDyL2y+DBbo3rXdPU6ZFcjs0VeQfn0f8xbAc9KQb2SXnodIiVs6/i0r/O2Aqi Z/sfP8o4N82dAnSK/rl7sfijVqhUMv97ANUcLjcaFapsnTT+ScxzwW2/ICg0SLk9MY7K7w4WCb t1M= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="264605641" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:39:23 +0800 IronPort-SDR: PBtAM9woadnVakEp97aF3EPSLs7+C/i4nkpBv8NsT2b7USgULko1ahmr761tnTTEO/zEsHqot6 X6Eg5ARYiBVYIm4COipAr2jecMwTKyWBQMln1YORuQCBOT9uXLuCIeFjHSgQt9Nkr0qbRaQ4pS 6WSisgqeWNKBBZFck5nMniSrm8jRThDr/yX2yP+70j0MrF+3z6bZzMDoNQ+lmXfIQJDo+2BjAj m5hBfzjA0+RYGdnWEU5zmNuwoM4Z0iECRSJCOkzvuZQ1Ju6yeOybwvkJ85XN5F7hzP8RsMUnoV ruVWcMt1f+8R6Wii35+/t2Sy Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:21:32 -0800 IronPort-SDR: Z/bGi8vOfi1w9naJtYFsMESCvVCozUNtb3jdNU0Kq38N1UPUC++ZDLlR35vJtTra14mErBUMK7 kbalNrazMrxQ2K+HY/98TkYblzMT5lEEYwviTm/YKb0eqnvBM/VyM5aUXT46UOTMCzRR8M+QIM T5yOSrInaRYpZKtE6dhGo5eHAytp3irkzu93AXRBnq9f6Cd52Gq8a8wxlxo4no3guoHiYuUiUV 7b4yJgiwqdK9um0oMuDVTIlj4gbnRO3a1Oryv+pe0FPPB6nDlrUPm5IlHdeNBiHR/iPBmvJKEP f4g= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:38:10 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 07/24] target/stat: remove unsed macro ISPRINT Date: Sat, 20 Feb 2021 13:38:08 -0800 Message-Id: <20210220213808.6621-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_stat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c index 237309db4b33..2d2c7e377722 100644 --- a/drivers/target/target_core_stat.c +++ b/drivers/target/target_core_stat.c @@ -32,7 +32,6 @@ #endif #define NONE "None" -#define ISPRINT(a) ((a >= ' ') && (a <= '~')) #define SCSI_LU_INDEX 1 #define LU_COUNT 1 From patchwork Sat Feb 20 21:38:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097045 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,URIBL_BLOCKED,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 29905C433DB for ; Sat, 20 Feb 2021 21:39:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF95864ED7 for ; Sat, 20 Feb 2021 21:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229926AbhBTVj3 (ORCPT ); Sat, 20 Feb 2021 16:39:29 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:50438 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhBTVj1 (ORCPT ); Sat, 20 Feb 2021 16:39:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857166; x=1645393166; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WcdoB4TYk6EI/9vfGmmzq6WJRU35o7uu66Ug5r/oOmY=; b=WtrphSzXh92QPFkcFvQuU5a/iEax1u6bQJl2rz54JQYucRzHc3E1u1ea AhpOCvb/dUSBq+pwL4pHTLNPZ96U8MzSFlY0tkDjaL2fUoIpLVGJv6O+v Aw/DkuhuRiyGM/uZS6PjW4mpiMTtmt03i+tvPog0e44xasIWWJHn9zx0J CjfkpX+ypEB9nQF50K24NY7Yai+H1vsj7mWQG+zlle+EbXhjcpJFIE51d nW9s1V9I2rgwwaHu9QlNv6EcrxAMudp6V1AbzslGdSWKRqWuPvohWCV5V vGsevYap/Jf5SAQQLnfSALaN5LlWawYWyqWIO3aurUchs9eoHp3ju8xF0 w==; IronPort-SDR: ZHg2c2GPu2la1Ld0fuzP+dFn51kur5a+f0+VTIXT9l7ux6KUy04SSqLBwYychF5GdH53pGCT5F 3o1LgI/3BHqx+jNXS1byH1FcyoP73XBrG6dyxljvl89XpX5bY4RKLjvw1pPNngWZNto70nci4Y P53hF36LVx2+twYba8uw6DD8Y7WWLs3TDeC3lf75rQWkm9JwcCnPkY+GFj4jEDwL1RZFYOCnFz 3RBhSfCFRqnhoeT0ooqqYeKSiRRRU5pkprPJGzZU2FSe6Td5bjp9qYIIvlQkSKvoVNGsYFqHwZ J/g= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="160409669" 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; 21 Feb 2021 05:38:20 +0800 IronPort-SDR: zh1qaT+taTfgSRtARU8BnldAQ35X40n6muTj7Vhi2jcMQH8bndk7RYjSHu2X3wMcUas0Z3z95c zgkoxvyWvoJk0XqaxOu1y4Tc02lEKrZKqDZM2bpxzz5Up/xcFiRyZ7Er3WdX3YBle82enpOhPX PVpwYI3eLk3HnAHbAEknGKKAzaQnfO9iPYVHmdTtLz6OHMu8GeSD+ihdiOuME+7sFxOlGYJyIi hP1KAMwMfLidwMN+trp4zlc/DVvRUypLPfJ7B+9t3eB93KJXTS2iwLh5dtLzhbnyPtquAhiZ2Z UQThYmXH5duIPj+B3WA6/sCN Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:19:54 -0800 IronPort-SDR: hjIokE8umHyoO/2EgcsOayl0MAAoFpCzclfkjdOOnfQFbxlZ881XQiXvbGKfy89XclSB7ixtsN YFtnHolMLTvqtQ3tWeyI268JeHfyueNjCU4qd0hgveU7blvAk637I3DZ5vqomvrnJYqpkA4QTM N5zt96xz3/slFAjbZXfuxZnEaiMcwKQhCvkRUf+CjXTEOMy4WD/aluoCFQt77WgkvgPgqgMjTd WuDJfhyI7WgYM/2ePtsC4f13zY+XlbQWlAC4kmilCzFZreI6wCH5d2YBnrYGWOXlAtRrVftX2b 7yc= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:38:21 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 08/24] target/stat: remove unsed macro NONE Date: Sat, 20 Feb 2021 13:38:19 -0800 Message-Id: <20210220213819.6687-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_stat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c index 2d2c7e377722..62d15bcc3d93 100644 --- a/drivers/target/target_core_stat.c +++ b/drivers/target/target_core_stat.c @@ -31,8 +31,6 @@ #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ)) #endif -#define NONE "None" - #define SCSI_LU_INDEX 1 #define LU_COUNT 1 From patchwork Sat Feb 20 21:38:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097049 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,URIBL_BLOCKED,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 78A95C433DB for ; Sat, 20 Feb 2021 21:39:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5228464ED6 for ; Sat, 20 Feb 2021 21:39:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229934AbhBTVju (ORCPT ); Sat, 20 Feb 2021 16:39:50 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:39682 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhBTVjs (ORCPT ); Sat, 20 Feb 2021 16:39:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857311; x=1645393311; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UzfZSkl2ERUTQxd8Z1s7Xi8Ud/dhl5VaL2EVyOdZxNE=; b=eX41LTQ9mokped35dFKljFQKSd2owubNFUqtkh9oiyyCc2qBjXtPys0r KwOqHB9YZSNOHQKZKXlBNchFdSzVYo04srZwDb1tDs0K80QNeoV5E/iAs pCooSHgIRTv+wQCYJzY4Ylhb7Pf6vruSJehKYZA1p4gsanngGJt+ULFHc A56OUW0Pwkwu5UTcypiBPabyDTR1qn84Nd0F2/cGrdfixKTh9ZbPbJ+Qs SzimfyHwqFVd8gCCLzNSkLwaNYCAVj18DdQl/R8x0NkDjpitqxyDlk69g pOklOKm/1ifi1KWt2guaz/XNVCeUcSncyFE5aohFywIpwdGe5CT8VTWLG w==; IronPort-SDR: G7OEb3CALMr/T8GZbznBpIXt1qy5S5bWD5km4yQf51KH3QQntiwXC+BfLP95GeaQst5Qqguhb2 S0O88hUbMomPlxjECC5MgIwpy4aJJPYtm5M36y8+hhvysQ71zJfkc7NScIJQfYW5Ld4YYeWW9U s6jlcyihe97DCQcWhygsgu6qhRUjVmI/9ZFlUM7exoo6xI4M0bDb823/TlscbS1T8glkOUH+fU AQqtLxdNSwI3ZbyEfMvrh6dwEQkpexgU/h1Wo3+6vaVKM+SeT9Zgt0m3itEzBKmbtrydTMfAKv QxM= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="264605647" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:39:56 +0800 IronPort-SDR: x3EzsZodpZuOV9dKSNy5VaiC8DUkoo0WvtSJhC+JoObFCNLZ+Hw/GbyUr58ZBPy6J0ftLZL9U7 B6cdVvqAtYyK0+drpSOW5v12EGJlBu/AD+iHY+7hSSjLquJ+R87vv9GJvq1YXqDUGGA19z+mlk jiD4/HYyk1XM4Fu9sujwLXRDpu43fApuxR/Ll2doXd3cYHZkaTDFtJQEARACV42tY6CI7ZTGs+ ETBVMLSkG5E4TsezCl6CSFWPRVS8lBhu/f5kxoiiH+2FqTLE4yuajyCYMKii7cU7VqqF+vsYvL lsYtYoUftHFkXMK+7bG0hZ6S Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:05 -0800 IronPort-SDR: sms1MttXnuy8nmA7KlNL+oQnw5RE6SdaQWB4XRnNjyS6eY2TYUSinkWrAfgLNANZjDRtSMP54p 1rsS8KDq6yPQ6lGna2AoHkxu6+ca6GZ/xHHyiVQuQ7Yey/wri4c7EFJe+mTiXqiRqK68Haz3sm Zuq10LQ3DNoDDLcfbvYtJuBJm1kkJNJghrmOffqYdaBvBU6N3iR6jjhCLdYQcnd+zAwCBatOpS eIE3IXQ9tUJzOskybYmF9fztIhNNSPDThoKn640ZtqWcwZuQDzJP3qA5XTLuKtJEyYffUSwAFl XnQ= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:38:32 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 09/24] target/stat: remove unsed macro Date: Sat, 20 Feb 2021 13:38:30 -0800 Message-Id: <20210220213830.6743-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/iscsi/iscsi_target_stat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c index 35e75a3569c9..cce3a827059e 100644 --- a/drivers/target/iscsi/iscsi_target_stat.c +++ b/drivers/target/iscsi/iscsi_target_stat.c @@ -28,7 +28,6 @@ /* Instance Attributes Table */ #define ISCSI_INST_NUM_NODES 1 #define ISCSI_INST_DESCR "Storage Engine Target" -#define ISCSI_INST_LAST_FAILURE_TYPE 0 #define ISCSI_DISCONTINUITY_TIME 0 #define ISCSI_NODE_INDEX 1 From patchwork Sat Feb 20 21:38:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097051 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,URIBL_BLOCKED,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 34AD4C433E0 for ; Sat, 20 Feb 2021 21:39:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BF3464ED7 for ; Sat, 20 Feb 2021 21:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhBTVj6 (ORCPT ); Sat, 20 Feb 2021 16:39:58 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:38804 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhBTVj5 (ORCPT ); Sat, 20 Feb 2021 16:39:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857325; x=1645393325; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VJVhaN+b+7PEVqFWOIeibFiMvdKqcg9V0KTFySe1jX8=; b=CUm+LVFU2/LXy2D+WdHE5pEb7RZ24WKUe7zKKMDQ8nqtB1L6a7KBr+of ICSIZ9UejiFyjaCzyJ9shc1xmGvn4vSLbYiVePz9B3dVxUuCbmb3y37Zh K0LPU6EYIlSoVO6taj29o6A8B3OS9az4e2edElGC/9k58DQ+aUvpc/XsB /+SSmNOSWsWKgC49mMQmEOe8eFJ/WcHG2IXoKc3ljzC1fctu15usB5mXn L5jBOHk0jn2s1q8okMdaq6Kzaat+c40yb+Ri61YK6phOLmmpxrDxoEUo6 WdcuKSYUAJmdky+qQZ3HDznVY9pBsTioC8wb7A30Pq43hynM+L5w70V9G g==; IronPort-SDR: uR14brqhYca87mbe52daDEyCSRaXmVvnWGGtoCd7LR7Y1vrJQeRMqqTNUXKNI+vCAQQsz0ndIz AlOdyieNbHj1GQmUv2NNaAB7eX/a0zE0vF5mzK0Um+uhfu/h2AFVUwt5/DUQROXp1MzZ4kt9lF xv/ujHM/R+QybVST6Y257ptdf/HfyWNyw5RXMNSPrcDr9Ncnk2KaLc26+baIa3gTmAXpFJwJ9D JyfqzQGq3t5OPLcJ2lR73U6ZqFwZcaKEVegSi4whnG7/MtD0Dm5KJZYbArkApeTNcswrVL8Yne HY0= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="264605653" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:40:12 +0800 IronPort-SDR: +iV9XL2/WKwhAbGNQRh2bWzZrVT8Oh7TCVbCc256bBF3BaqH+M6QpNxXaHVTfWs1h9wsIS6Tz/ v43nZwPpUblRzWuW+SSFTx12Mu/VRCoXS/qZ6dgI1ja1KNq/KHcTHkVWVK355yBCqrvu/ELPHg PpbaPzfol4jwm6W6JnQHAIVQJFZCk2JsmWVnmEbyKDjR5z8kBYJ4cVIXYL9kA+X4/hQlXouoqn IEJhdraLVfmT+3aerFV8QsJcr8gnEP8FZ49iPmpqEKwQA1ysN0ooWttrdDX5/LT2wvdZviaeb6 hzodRC6B2Qk/LZPdBt40wNjE Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:16 -0800 IronPort-SDR: cmjWuJrivO3UNPSmYQchr1RFRfKkrDhQMj3sZZMDyEDTpF1ZBPh2zSlFLNxlwopJrfUrp0PgKE 8+bkTCtkNEz0Lw/de7rNHvkQ7X+Pmg7M4FVvfIluB+doNyAjeaP042jd3mIKfG5tt3ElWlREJv 9rGHgFgeBpO5nEOoNJquy5gHMDmRXpoei1UJUiPznyIVg4DZFRtLIenYD+jxqY++UzPlpZ/yXD 8YWfRjBlFDIMK/aBj1PHQPom+lDYvP0JGD8idUi5xvzw8OSd/FUeOzcpFX52NwAn0N/+b+av4F M24= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:38:42 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 10/24] target/iscsi: remove unsed macro TEXT_LEN Date: Sat, 20 Feb 2021 13:38:41 -0800 Message-Id: <20210220213841.6787-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/iscsi/iscsi_target_nego.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 8b40f10976ff..151e2949bb75 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -28,7 +28,6 @@ #include "iscsi_target_auth.h" #define MAX_LOGIN_PDUS 7 -#define TEXT_LEN 4096 void convert_null_to_semi(char *buf, int len) { From patchwork Sat Feb 20 21:38: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: 12097047 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,URIBL_BLOCKED,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 114DDC433E6 for ; Sat, 20 Feb 2021 21:39:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D80CF64ED7 for ; Sat, 20 Feb 2021 21:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229932AbhBTVjs (ORCPT ); Sat, 20 Feb 2021 16:39:48 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:24626 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhBTVjr (ORCPT ); Sat, 20 Feb 2021 16:39:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857187; x=1645393187; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gR05BOvoajtwCw+9SUY0u9DvFzgIKgvpvEKZDII0cAE=; b=XDsDgOd/yhesqM7DdfnzydJg9i3SIUAeEI4xeuQKEOelIfhtaA29gRJU p9EHfoE03sSjveVsYJA9OmzzdoNud4vz/EFeH75TVfCGJof7JyV7NRO31 r2xhmd4uAw67keO0Rhy/vDjWv7BpJZyCoAHZNexJB9J9EgJJ5GV+PIPcT k3w2wKZQ/hb6/N2oUZ3FxefgcYbfO86vqX2Z2q5UvqmJAN+Ay0YE5P2h7 n65qsTRHwH3hHL0olr3GOTQKJB2hXO+Ue8K37PK205W7x2ESdDsstFGUY Zs5eeruJKgNNSVB2cC8ONtJ8JPlQJBSQa6MXrCFtiYuJV1zIDXPDZpdfB A==; IronPort-SDR: bLhcJzipadL6S6VQN4z4ydXuwjDFT0AflC4ptY67tyn7i7wkGFL9VtHwywzJluZtZwI3AEeN76 gBdAnPFGOZi1Mah35GiUvntV584YYxMDomgq0ROQ5pDFNjPftxz98KogreF3eEVl2K02MdPY3w Yt72Xerl45//UNrV/3BDabUAnmzXUR1h8uMeiIh+6FnI7bWcTj/KM1z1Tv0Npb0jQzPtLEkVFI kgqZDgYEbMxIDUHscyVL1Nb+JvQJnaQzP2GIRUwxzERW4ygzbSw9BFP93+yb+JwOXP8F8CGBv4 oPg= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="270954957" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:38:53 +0800 IronPort-SDR: jLzTkOCjfdg1aEP1IOzFzW+fV5/3d1dgiRZKGNcNYnAqBpYeROYsbgmpwprzYt9EyBFyVjtZb0 NOA/DimJDfGGoeiNMFmXwSrIqa2mjEPgI2haprmm17tCej6lboIHPFx7lip2eenmBIGFkqbppM Jr5Gaq3iwZF52ruGb5WUTiEwc2XC+hQ8JQTy/cDKSU84yTklyLOa3zKy0Kpfuq+TUfyHdttsFh 3KROZMMuKCaJ/85vh4+5QGI0gThSpPxmJG0pWjY1d1V6vmO0qzqk4Nw3Uq8RXUK1yDHirYWHTz pUqu46QoxH0LwLRK9YaqhuI5 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:27 -0800 IronPort-SDR: KHr8h6Y5DPRs8OwaELo29Iq2eatOGlyhP0X/u+RGl/4zvK1s9icGQ/oo47y3sY/mruWNvUv2cf WPElidHjeWVlMJN+sZ7MDlJ6p1Y3rrkQqaGLk/aIkUX+Dsnp6O5U2UGjhH5fvtfQ5SvV5T3VjS JX33ovA9q6U+ngSUyGV1dJQd3Q9Z+FPO1UnhxY0SthJrheO3oa9Hc/Xm3XHvjHAmgABbuPGPrB I24QttAkW9PGjJndJMCljagG1v5xfpTAkhETp1ScGyxHXxV+bRJFcSJVoTJ1dC6YKmc3N/m0se ZRU= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:38:53 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 11/24] target/iscsi: remove unsed macro PRINT_BUF Date: Sat, 20 Feb 2021 13:38:52 -0800 Message-Id: <20210220213852.6831-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/iscsi/iscsi_target_util.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 45ba07c6ec27..2db45cdd66af 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -28,23 +28,6 @@ #include "iscsi_target_util.h" #include "iscsi_target.h" -#define PRINT_BUFF(buff, len) \ -{ \ - int zzz; \ - \ - pr_debug("%d:\n", __LINE__); \ - for (zzz = 0; zzz < len; zzz++) { \ - if (zzz % 16 == 0) { \ - if (zzz) \ - pr_debug("\n"); \ - pr_debug("%4i: ", zzz); \ - } \ - pr_debug("%02x ", (unsigned char) (buff)[zzz]); \ - } \ - if ((len + 1) % 16) \ - pr_debug("\n"); \ -} - extern struct list_head g_tiqn_list; extern spinlock_t tiqn_lock; From patchwork Sat Feb 20 21:39:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097053 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,URIBL_BLOCKED,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 5B834C433E9 for ; Sat, 20 Feb 2021 21:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B7BC64E2F for ; Sat, 20 Feb 2021 21:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhBTVkO (ORCPT ); Sat, 20 Feb 2021 16:40:14 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:44367 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbhBTVkK (ORCPT ); Sat, 20 Feb 2021 16:40:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857209; x=1645393209; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dkPKjCBqGhzrj49JVwhxDItCZsnR/tu5CdenH05pm8E=; b=M1JlQLa3lDh2tR4hHZx9tCfk5PoCH2usSHpWIDdFT695lE1nlUY+MEMg cQrVY4Fcgv7pFzf52yLfXzjxK+r9bu38h+DwTJ0DaGdqw+aw0ICm2h97y qCo7SlZGlC7/2q/r35yP1RqTXTrk8TCspVbEpCkB0Uza5CMob6PhfE5oq oSyuzhoB+HWt63LtdLBdEgsviEd+BnxrBwn9mAMlLRjj1sYe/tv5IVPsY ery1TxRRYeSfOZkT6hnwzuVyrDFFthSYMW/TlbOiScOHPpLU5CTqOfDxC zbdE6ZbEDB3gDlc1k1oUELpnbXwU24HZxxGJ1Qg5McUx3GfctuRqnwYvG Q==; IronPort-SDR: 94lvgYRGsvKJLBHzidWcMceV23gEf6Xp04TsnyfNfeuTg48+l9zrdkFc3R4oLtR+BX5pDd0LVG fzQvNUqzIHHdLfLeibxFLafqzaUZdNR6NoRkz+qGVFikiA8QQWeaV2O9Utw8q/2ZpiRjkk+eaE P4pgLiFU0QGQABqGJ6dEriJPw7Xi1oMTv36okhXpmIpudR34pFad6kXgOyckX+50Z0QTmDv5Je nV15rQOl/SV4lC0QqUjbDIa7vSR+PLum0IXH7arcBXDDSBAaq9J1Du9bB36JDvxn/ir+TABSBn iww= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="164901599" 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; 21 Feb 2021 05:39:04 +0800 IronPort-SDR: y6RkL/9nZxV2k01TSdjcZOJEo80dexmWhZXTJYomUh72F1nEsbQ4Kj7umhoxgZwf5il4wsd6Ex yDk85E+q1E93nBmo+MPk+DUVZcaejFprFGxuQa7xkGnQ6QpDf20cfobyRzwzEReeOe3lKovYSk Q9XwLFDLhIgssgKqJEsQUKRw4Uvt9AhkAivXJOx1/dJj3sBJ0gx8/HppwIhxHDSKUChmnboYJX Ewmz9yvf5+GGS0YnU7l/gwo7sgrSQS04nvd1KgqYHaUWudrKVCGTGblFJDYMYj/RY9nkVno3ad m9dgR1+wQrYAfoBhxcZJmGfs Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:38 -0800 IronPort-SDR: Q3LpWj3g9+0qMJKlrnZHsIrMzpmnQQhLrgveo6+dMRZ472AO4pvaDRP4eFk3nPxLsJk6kRVRJV fXKq1lyAwHOHey1yPbd/p8crcaLuVhhI6IvZbu5370ETxtOtjDv8d5J5lbvqJvVFWZZzY5E2g/ Ib/pg1Yqs1C8RL/N+5kIwXqoThh+N0aP4eaS5xC31i4pTu8I+suV90r/lkmbpLuQJ2P32g0r9/ dlDjpkufCe17WuyxvCepVyxWdgLqTSmzq3FrMZzj5lkpUaWxcbYSx50vCKY/l35I8lj3AWe0b1 P6c= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:39:04 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 12/24] target/iscsi: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:39:02 -0800 Message-Id: <20210220213902.6875-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/iscsi/iscsi_target_configfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 0fa1d57b26fa..f4a24fa5058e 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -161,14 +161,13 @@ static struct se_tpg_np *lio_target_call_addnptotpg( char *str, *str2, *ip_str, *port_str; struct sockaddr_storage sockaddr = { }; int ret; - char buf[MAX_PORTAL_LEN + 1]; + char buf[MAX_PORTAL_LEN + 1] = { }; if (strlen(name) > MAX_PORTAL_LEN) { pr_err("strlen(name): %d exceeds MAX_PORTAL_LEN: %d\n", (int)strlen(name), MAX_PORTAL_LEN); return ERR_PTR(-EOVERFLOW); } - memset(buf, 0, MAX_PORTAL_LEN + 1); snprintf(buf, MAX_PORTAL_LEN + 1, "%s", name); str = strstr(buf, "["); From patchwork Sat Feb 20 21:39:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097055 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,URIBL_BLOCKED,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 B15FDC433E6 for ; Sat, 20 Feb 2021 21:40:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C2D564ED2 for ; Sat, 20 Feb 2021 21:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbhBTVkN (ORCPT ); Sat, 20 Feb 2021 16:40:13 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:50438 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbhBTVkJ (ORCPT ); Sat, 20 Feb 2021 16:40:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857208; x=1645393208; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=t+dWcFkfTOpQy5hRzCq1aDeZCc0SYWDCIdkoPXD+ysM=; b=Q1Cqlbsx/8/WbUuE7xcFc0dpKZVKxl/OuMu+g3DTZHxyboXkMjPywZ3h snlKY0JjcvWQan1HloXhQKM4vESR/cmRZh9DuYSXHLB4Udqe8QHVvVCEP Jwu+utGLytbXznNhTUE2XhALNYfGZECYXw7sLO+CeGVR0xjixMkkKwDpd clnl66AEoZVyZSVO3YVW4kcjbXrLO/RZ5PTSehr6y6Ibht8Yivocqcr2+ yBfoc9McVvZaRs0JFFhCjxDku3G+itUN4THAdE8dGQOJyRjrFewNriIL5 cF3njsrTqWVcClY4ZKwRF3G48pfxofJdLG+IfN62+DDNw97laHBMrJrqr Q==; IronPort-SDR: FtN6aIVTdq6+AvNMZa/VMHHHUqTC+lWYsVB4iI2+WesZoEgJUbvwfh3MzKUg9X++FXUVe0okQU AgnKjCEZCDADm4tR5jPawo0Mlt8eogShLamo8wkajAwZ8+juQ1mkqlzvXnS2fF7/Q8kWMLhs2p xb/2nD3GuSt9shgMfLoog06RimsUOSjfdn91PfKjc1ot/TvZ8H6Skdid2io9l9Mhab3vb1Zvvi xzpcEidQty/Di4MmDO5Kr6jp0ODxiviriH7UmnF7PvyzO2b0s5pXefnI/igN9VaxZ4lD+BKWym tNg= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="160409685" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:39:14 +0800 IronPort-SDR: 6yM9cQimorA1jRWlOdTWYkMtB53mPPy0PIUuXwmL+6vkc+0qtNpp7daNYfoQRxqXPLqBZq3+p5 AheKxjD7xlt+i5hSlkGVKnWbos/Vg8xMSuqosXy+DUB3zGETGVd4O6ehcxLuYBQinCztILeyOs Ep2+LhmeMq1Pp4D3FRXAzbeQgAli7XAF5AOp1PwPcnS2R8tdBvzOQRqry/ZboYs/61gXjs4p9O ZZETI4DDSWztNBJFE+u+C3J2c60m1FlwEZJWJSMql9/1vJGUUKhrG0HgaCw2Q4wQ+5fbO214Fq 2yod442DfNA87P0+z3huggOQ Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:22:37 -0800 IronPort-SDR: Zzzzy8+0Zr9WPSq8dKwVu6gKeT6mFckmWMdH2UKE0ertHIehnNyG92d8PkJK9ROgLEUC5xVgmJ lxea6ZVsGP2TgAYexH6+KRHC+Z6sz1CVydVWqJ1jN+l/zl8Gz70oqOXSVc55MD7cTv9fVJ0e6D dkHXhtrhc10e7t6pWbIiPf94vG/QkKbOYTTb6qhFSqErovjzfEWlWmTKv4ZGyFptE2t2MOxW9k SdnJrru+CuYLWRH24KbPD5jU/W/DqW6kIOxyV/nI4dXAa2elnoG0EJP5tI0LT14uULv3Nigg8N QLM= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:39:15 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 13/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:39:13 -0800 Message-Id: <20210220213913.6919-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index f04352285155..56ea47f5cda9 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -1494,7 +1494,7 @@ static ssize_t target_wwn_vpd_unit_serial_store(struct config_item *item, { struct t10_wwn *t10_wwn = to_t10_wwn(item); struct se_device *dev = t10_wwn->t10_dev; - unsigned char buf[INQUIRY_VPD_SERIAL_LEN]; + unsigned char buf[INQUIRY_VPD_SERIAL_LEN] = { }; /* * If Linux/SCSI subsystem_api_t plugin got a VPD Unit Serial @@ -1536,7 +1536,6 @@ static ssize_t target_wwn_vpd_unit_serial_store(struct config_item *item, * Also, strip any newline added from the userspace * echo $UUID > $TARGET/$HBA/$STORAGE_OBJECT/wwn/vpd_unit_serial */ - memset(buf, 0, INQUIRY_VPD_SERIAL_LEN); snprintf(buf, INQUIRY_VPD_SERIAL_LEN, "%s", page); snprintf(dev->t10_wwn.unit_serial, INQUIRY_VPD_SERIAL_LEN, "%s", strstrip(buf)); From patchwork Sat Feb 20 21:39:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097059 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,URIBL_BLOCKED,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 81C07C433E0 for ; Sat, 20 Feb 2021 21:40:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C8BE64ED5 for ; Sat, 20 Feb 2021 21:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbhBTVke (ORCPT ); Sat, 20 Feb 2021 16:40:34 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:27352 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhBTVkb (ORCPT ); Sat, 20 Feb 2021 16:40:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857230; x=1645393230; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dqM2HQr2l4cxWrynRndAoqxwrtYoG17Hxl0h/8YR+eU=; b=BKUQqxlcOJcvW7ciPANWJAF/MgxENZADxFg63yNL0INQ10BtJfN0xcit C/6EbsDRRU9OayAp8wshrTV3wCHyWaFMwTyoBWbvDPXRqq/xoc8PATMtl BQk9WWTwcgiHFvkyt+XDH8c1t97Cd+Nl3J6Oa0oSoKzQk8VAocWkDcLje mWOsNYRDhXaXpXzL+fYnW9C7p6mc+xNFpN8sSntJtW4rlJ0qDiHJIb6kM +VqdM5o8t8lxNiqd0rcctYO6gCrRUr8OIFnon2EUsl3AWv63K4HfC0Yg5 z8ZZmsfVtlzJi73lqg2OU13E+kcm5dCRlZZA2biJW3s0baML6BBs5TlnM w==; IronPort-SDR: lQCOvhhgKK/2ZWgkYDHZW+z7LSJgHq50KqzZjpydQ6ZqCMLj/KQt289WXhWJiK1he9ZQYxESa0 tAUfGpO6KwlD2AVXGIBl1edTBi1qenhyLfmHMZbAIzQ6hfOK6CNmQS0wHiZrnaNyoBh+lxFWmr d9wDXc8EXIsdnsupF/LD7va3YntW7F88i69K63QsF3+4vWoYekP4YfWQ9qYqE5kFaDYZYAhWxe YNZGsdxW3WaGlbvVE9Cdx4VHL/c556/bwP1RQXYJcdSs46vfd1uLBuX54iecXhNFUL9YCTu+6K 8fc= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="164901605" 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; 21 Feb 2021 05:39:25 +0800 IronPort-SDR: Br8CvKxU5swh3uW6r2FtXuKXUCNXxzsoHa5y8sVImCRo1cDtp7ECI5eeFCKtWWdJDdTo97Ybry BuqOA+BLMcqJGmeKAFasi4j7KN+MNXUwjd05tRBCAlK0DXLRFEyn305liCh1j1C2cooAuBYbS8 AFpWRWCqJb/tPwg16DhD64TLcAgD8JVi0UaS+n0sEyl7v/qNMf9HqO8oIcZnVqTfMYlEfRb0RP fPz3g8ojOgY1IW5Vy+pWAUwLEHDkd0+BCJeSJcbZNrTuE12a1c9nTk2yaLAL3bkzE3KoG1zGRM wNNeY1NIJukvwhn9ITpBBOlY Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:20:59 -0800 IronPort-SDR: V2wKsOcVXO//1IBjFlqIQ3xtlSEb1f2RbqB5tVmCNn+u+fHWsot5isA/Gi+jJU13EJ/Acnc/WO cXAYseNIBJdmWIpPjbFNw9QKGso4HQ6xdKUvB2ZhpeQRO2RVa1lHXsKcz2N5XxZajy4SwCmA5m 3qATWfvImVu2piB49iIrsrKEpC5qizmSg0Lw/1IoBr9eriqxJWmHv2K5asyLhpEAtnCdMytE9D EE6qitiRq5rQNOTaJr9Doy5FsWzIWNj4D8DLXpCU2yc3NKxMgwtdnLTyg77/iawzcc5aGNglCz yAA= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:39:26 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 14/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:39:24 -0800 Message-Id: <20210220213924.6982-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 56ea47f5cda9..4c60334a1e9f 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -1555,11 +1555,9 @@ static ssize_t target_wwn_vpd_protocol_identifier_show(struct config_item *item, { struct t10_wwn *t10_wwn = to_t10_wwn(item); struct t10_vpd *vpd; - unsigned char buf[VPD_TMP_BUF_SIZE]; + unsigned char buf[VPD_TMP_BUF_SIZE] = { }; ssize_t len = 0; - memset(buf, 0, VPD_TMP_BUF_SIZE); - spin_lock(&t10_wwn->t10_vpd_lock); list_for_each_entry(vpd, &t10_wwn->t10_vpd_list, vpd_list) { if (!vpd->protocol_identifier_set) From patchwork Sat Feb 20 21:39:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097061 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,URIBL_BLOCKED,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 99ED9C433DB for ; Sat, 20 Feb 2021 21:40:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7375A64ED6 for ; Sat, 20 Feb 2021 21:40:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbhBTVkn (ORCPT ); Sat, 20 Feb 2021 16:40:43 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:43906 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhBTVkm (ORCPT ); Sat, 20 Feb 2021 16:40:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857242; x=1645393242; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=t+uWJ2/u6p0oAIiWW+m/7/RLXqMtQsWSoqAEYSXfJYg=; b=I1MgMyYFmyVQLWb9Y8cUR+0kFlXqoeZfD+ZlSBh/5IUKHj4pGkt9mqzW 34ljelkWJWNBvcLBTxpcy38sRmZb7nhMs13kV9Vh9tp8IpWVsx3tZDSEs vrIG/ctiSJOPK4KmLYucIqunmqKpo05/5dt1AmwxWaQZjm9QOf71bopKA 0Xe0cSelnB3mXvKKJ2E0ycEShK+3O1DhbAzyQHg1WvbSxOlAtddWIUVnd XxTGr6XIfHjEB6KUmYqGI+BlDe2Q3oAuPEWFTRP+0/+cdKawQ8n7Bz5m+ EyWcdk2ieZFNW8XhT+vsH5QegPavkt8E5BZoqtv1gqgurEgExwFbmOzEF w==; IronPort-SDR: /3HNxwWcmf6Wn05ncdWmVTBDSxbmNXqo7ZiI7QI/obufQpN+mTIPUubv1Cjh73Yhx2SxWOEXY8 cQg7naSpA2v0uSCk+rzVOBZV2VrOYHBk4wulFGNmXiLAGLrLAzhmMwFKsEzYFshOSYdQOaJVQv F6vjpOqW+VESS4foFT2JKkxqpkYqdhI9erNZJLeaGhrjKTW5S8mIhEw+AXf6goUFjO2brtqT/I wZwSpwJpvqu/ssbQsCTjFCn4w7l6vnPAvmo5vcSnefbDt2cae+SDBFqTTkn4gekMObaKwnziw7 8ss= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="161591293" 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; 21 Feb 2021 05:39:37 +0800 IronPort-SDR: Hdi/VKpx0kvYO9QrHAzxMmmkRLUzb/6IjpZ7jW3wjqVuOZ9PjCyU98Q5NhjKHr8jpnCYrTE5RV oV931X5cWDb6cjyVInEDBMCB2FQegqh6MMGjZmQZpFC9EE9EteNmjq3XK3gZ7Nb+jDS2b/UBf5 54HQdwbaagzDsvjfDJViP85URZebxzNo5iZeBCCgYydkcH8WdXBOhPjPPqetixH7Ff0eJ2mv86 KlziyBh7oBPPv0FTPaQpVLBJgtJUvHmfZYJ/0nTxxZQeNElJX0FcdfflJO0N0um34YKUH76Orl poSH8aNdamQ7BjbGyX+teBLl Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:21:10 -0800 IronPort-SDR: ielavNkhAPhZ4LbGkQoEqArFC5Bm3wi9CMlYNoFR372SpX0hSzlatwI2EtWljX69cEREXCvOi8 U70zakfTbJL5io0KyZTXPTyUm8YHa4inDHr3Q9xsoSfmgnzLsn2OOGl/ZqYyJv5gEewY15GA/e G6jAzZ4X4sA2234BBuX53TSXLs3q/RmasiFj4Kcowm2/zXzKgOGJ4aK85OVLxTIB5G0RgsY2cs qBuudkVtsAGUxul+9vgu/jVHVG/oiLXGBcMqaJM81PrLZ1Xa8yfAy0aaCVt9ZRJrQKYSOI8XCP z1I= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:39:37 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 15/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:39:35 -0800 Message-Id: <20210220213935.7026-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 4c60334a1e9f..315791b5554a 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2283,7 +2283,7 @@ static ssize_t target_dev_alua_lu_gp_store(struct config_item *item, struct se_hba *hba = dev->se_hba; struct t10_alua_lu_gp *lu_gp = NULL, *lu_gp_new = NULL; struct t10_alua_lu_gp_member *lu_gp_mem; - unsigned char buf[LU_GROUP_NAME_BUF]; + unsigned char buf[LU_GROUP_NAME_BUF] = { }; int move = 0; lu_gp_mem = dev->dev_alua_lu_gp_mem; @@ -2294,7 +2294,6 @@ static ssize_t target_dev_alua_lu_gp_store(struct config_item *item, pr_err("ALUA LU Group Alias too large!\n"); return -EINVAL; } - memset(buf, 0, LU_GROUP_NAME_BUF); memcpy(buf, page, count); /* * Any ALUA logical unit alias besides "NULL" means we will be From patchwork Sat Feb 20 21:39:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097057 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,URIBL_BLOCKED,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 16286C433E6 for ; Sat, 20 Feb 2021 21:40:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E25A064E92 for ; Sat, 20 Feb 2021 21:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229961AbhBTVk3 (ORCPT ); Sat, 20 Feb 2021 16:40:29 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:24626 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhBTVk1 (ORCPT ); Sat, 20 Feb 2021 16:40:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857227; x=1645393227; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=H3opKqGZj2Y8gtgBowEc22imX9Y3dUijt/HPzs/xKP8=; b=o98e+HvfCUVDVsTfl3bMVG9PkS/y//g51lk2H4omzDdQ6ga3SjLYQfbK So4p84ib3JmSj2VOup7/C/u7fvs7nPikQyLFVU1/ZDCa4AaWu4agaP8H2 whZrC6eEzjw3+h791Gfm501WjM+6zGV+6paIIG53qhejyYnb9Mwb+jCZo VLT1JJTc0htMRqHlN0IkZ3efG8Zg3fKlAq581VtGR1IwdTTFKdkdB/rtw TDAb+EZjzeV0AXgQa5Ek9ttd01St4f3FJ7PI0PotXdj/OJT42Q/2VrUIw OUCwkm9ElC7VUHaxr0Z9PevEsZgOeNVvr4PmXjw21dEYqpXbh9rF/Zyd2 A==; IronPort-SDR: F1Ky4sF0USnKJVBAv9+HrRoqV+3e/HwtUhK+B386XVrgc69J7gnKBZkjCLrwvXoGhvY0sRdO2W OUcWnoSodI+aehqLiBkl9gK+awiiOc5tUYSkzAl8veMhZ3hMimYIzTibvH87eOVZGBx/5XRkCr OpPotsVfjqutmjJCmT+dGC6pPO/0QZyjuSzne/jPScEbWxfrC/d7Kn7g97VgYi1Po3tkPhwcyU hRzjcBiGyFIlQA0MyhPP7NWf1bAC8NDTQmdSk2f0lEn/kQWiUKs/0XEjYhZsMt3O2eJlVsikNV yPA= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="270954978" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:39:47 +0800 IronPort-SDR: dzecAQDbbxB1u9vrWbkRSo1QUUkOnGUlcr+R29DhgVEFAnBlJGk46j6njFni7bbn3oWRoUSTAS w+DtukmEWa6jA4V20OOODs18SgVQqbT5sjz8/9+SAJwR9I2TzP2kxjp6e4tAZxbXdCXXb8YgLF zd8BWEAtp6BFR9i/OBwxErrFkbNqIbh4M1pyoKbWx1l+eY/KsOTAaJ+lZw0zCu1Qo4AdSBy55h w5hFRi0zirE8DCAXNVSN14DuNOUlRFhIyLmHongX9pxTnjScmS2SWNc6xTIua5R93LYszMMoNG yw0csABVBGW4vg2LazOdLtBb Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:23:10 -0800 IronPort-SDR: RuioXGs6dp+B+/pvSUB0+g1Nye4NJHJpDc2PuHINnVLWYO+J789+0fpe2HPv31y7P28/+pzfzt KTU3yuI6/fsWYRSxybhEoXrrj1enLipTJetQi3CQrj+16MqpikkZ9JpN71QtlMAmO6bErJTGc2 O+wAihPpFURPTchNMQZfCuqO/46nmD9VeZ9YsR0hsP5jDWBaLFNZO+MiRXszIJv/rdDuo1zLdu SRaVEkLsGDlKF36KId1ZSliESrA54H6y67tX5ifeBB7pEhlDzGkauGws4kvseJOJULjCArY2i7 5AU= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:39:47 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 16/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:39:46 -0800 Message-Id: <20210220213946.7070-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 315791b5554a..ca5b083d2958 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -1660,9 +1660,7 @@ static ssize_t target_core_dev_pr_show_spc3_res(struct se_device *dev, { struct se_node_acl *se_nacl; struct t10_pr_registration *pr_reg; - char i_buf[PR_REG_ISID_ID_LEN]; - - memset(i_buf, 0, PR_REG_ISID_ID_LEN); + char i_buf[PR_REG_ISID_ID_LEN] = { }; pr_reg = dev->dev_pr_res_holder; if (!pr_reg) From patchwork Sat Feb 20 21:39:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097063 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,URIBL_BLOCKED,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 DC66FC433E6 for ; Sat, 20 Feb 2021 21:41:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A512264E2F for ; Sat, 20 Feb 2021 21:41:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbhBTVlG (ORCPT ); Sat, 20 Feb 2021 16:41:06 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:16730 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbhBTVlE (ORCPT ); Sat, 20 Feb 2021 16:41:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857263; x=1645393263; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HBxVB6qCGQ11GplGDmSfQDtFEQ7HBcmHy4k41+SDWxg=; b=Yu2cOkDjbre7d36mdbf3uOmge+bVW8AL7A/I/ElJGidDFQtnTNppnGxx a8iNsEVUm6M3faN1/RZP1HsIRCXgYrMnRosO1tQkEcsPI/UDdObhfF82s hP3gCWdHSqfWeheXLFPccPGz/FGiv2JHEIGRLUmv9dXd0pTIQk53scCGx X0hgc/Aa034uOuIrAeHY93okvw/x64TMPNBMO+9VgLkN41pUg9uDcAJ8P 1lzLex5DCrbBnM/Dl2jv2TujQewdQKsDdzDa3nmb4hCEslWNYh3EWbjx9 ivGbLLwHcir2kAIsRLV9YsAk+DOnx/wS4MTEAEVRsz9iI+uz6iYnniuSK Q==; IronPort-SDR: PCtgZK+NMBlrH/mSXB7H2WTfp8trRz0sIflgkWXiLtPfMbh9TeCDEfZxvNrPK6b6vD79Hzelp7 nz7t91PVMRfOVfNOktb04xCzlZtNDlHC7TmWYGmIlsFwzM+p06pII4TZ0kLvMYtf08ubgK5CsD 0hySj8lgifio1bGRu4FT0tP3+d5NtjcP1rTJfElolrQYRASUL/+jGHdah+KxQ+HY13EvsqDbvM Z6UslzX6J/26nOLBrYs0+kXx6eZDnuEGU0QIZg96/CNkwlpxedANismFR98YPBlGsVMigJRTTy X/4= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="160432961" 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; 21 Feb 2021 05:39:58 +0800 IronPort-SDR: u1CN8RMe28PzjjPKXMHjnYBd2G6LlTTxNZbhIc43cVqxw7keLn0xt2xl3SnAuSzVsCJP5b5otV tnpeVzDc/R0MEHnfL9y4EbUX+N/Hd7nLnn18qutKL2l3IMO1sR0GrpWIAEhSTNmhMCAa+rZh+c oh/N88LGwcmkfY8aUQORG4OvWmSJUp4DS/4FNxV/+kwBHM9hHXLaV8p5+Om7v5ejv7NRyCEEsy HKOEnLpr2Vq+GlS4Q2z0Z7doAIMEUTog78jnGrUFa8llNB+cZugCr/6wvpIR5+RUOJmXyXw8IE TEVtiBIv//fSUoJqPqafeMmb Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:21:32 -0800 IronPort-SDR: OmzJfykDTQHGPrumUjLTPUSFIwqw3v75yRTVc1pwNF599H+Fe2yoiThvChDz/rMY/TuNli9psn n3S53Ja5PEZP9PI/Gvnf7wI7E6VXKB/U26hdRCGkpvXaowGku+uLf7r8FX3hLGYFgSwLbijRNp q9XH0Ju2bpAmdI2Muuo+1UGjeZ/ZAM5Ih5NQVxprenzOzVy5sTiGcJGzxt4ywz829ZxapHc7NS QV3S/Q2C6xACvo0dw5/r3izg3ngOZ5NqE8oQjVpbzNP6cB+AeDSni5GfUgWKSBPOdReU0gGnXq iIg= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:39:58 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 17/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:39:57 -0800 Message-Id: <20210220213957.7114-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index ca5b083d2958..0ec9fe1ebade 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2609,9 +2609,7 @@ static ssize_t target_lu_gp_members_show(struct config_item *item, char *page) struct se_hba *hba; struct t10_alua_lu_gp_member *lu_gp_mem; ssize_t len = 0, cur_len; - unsigned char buf[LU_GROUP_NAME_BUF]; - - memset(buf, 0, LU_GROUP_NAME_BUF); + unsigned char buf[LU_GROUP_NAME_BUF] = { }; spin_lock(&lu_gp->lu_gp_lock); list_for_each_entry(lu_gp_mem, &lu_gp->lu_gp_mem_list, lu_gp_mem_list) { From patchwork Sat Feb 20 21:40:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097065 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,URIBL_BLOCKED,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 00D21C433E0 for ; Sat, 20 Feb 2021 21:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE4D464E2F for ; Sat, 20 Feb 2021 21:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbhBTVl2 (ORCPT ); Sat, 20 Feb 2021 16:41:28 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:43957 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229838AbhBTVlO (ORCPT ); Sat, 20 Feb 2021 16:41:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857275; x=1645393275; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cFraFuGaZvjFcSBrZOICDluVzeLEnOLktlPkgx7ydOs=; b=ZvdAmq7SG3AaOaKAfiA9ALXeLmeiUjrhne8b8PFtIGOiR3Il99PPADJW HR0pOQyFZ0nA4Wc3JtNwi45xbuU/PUn7GJmf8iG9ITueJjKnZyIEtiknn 0ba5HW+onVfK3fp4TSGymc3hHDjNEm59J2ohYp+uvWCH8I7vOLv0M2fDf Id05EkiBiFaIYAeutHV4r6QHDoYZhaY4Y7FwAi9K58jHfzz7nzAKp+rOs DTYTq6pktTZu5FWSPvJ+DWQnbW0yuVz+ZIECCsok8FeNHbO1TfQI50N4/ PkrK6VE6Ahx6kTStOXSjOI9c0iVJmAuG8Jilf541kZdo97z6hDly5w4qb A==; IronPort-SDR: 7NV6V4MXG7A/n6t1IzSlZ9/nCVZ8CT24XzIqerPKwZcKGXDOmYdQhJQNIdt9U6nh6ldwGDb85/ XaowBKjWEHMotdYXZN9i6engizaCBk60ZQeIMJVNl1k49zztbtSlfvax2Fw9smj3S/l5bqd0oW SAEdYYUtopjHmf08LZPsmcwo5XL20FqY8xcEZUPp2sOqqCP2y5fISf6NEsA6JF01G4B/T5ZebB qKMuWJaUvZVjyWEfHdwOWLVIP++JJuFY2RBq5XOiWZc7tcGfsdFbkOfVE1W8x7l2WRNv16p96C vuk= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="161591308" 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; 21 Feb 2021 05:40:09 +0800 IronPort-SDR: cG9McoxxNwP8rQ0t1MYURafz73cpcsnDJsSC8BKhe8/OGnMhRCHk+K85onckbUNZWqmkKCjPeA ipmmWucAGn45Jnr+ZqJm8nIJL8KxTuCBdfNaIRLGAxIknJxCBDA+IrU75dg/yWxMhxbKH+/YQI 6HRJXX47lKMp+AWZMJ3y3B8Hs2nElxgEGxGzRgXaeESxERcvbtOsoizb1jeRj6R2ZuC3BVovqb fmU2g0TJMP9u3KM4cQJYZK/gqoaowyn785G/SIkiPhqdhgsMNJvBdvy9RC5uqy7ZXOmfu4fflY aEsmHsCfZCoTpK6yKypi1Gs8 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:21:43 -0800 IronPort-SDR: 7LkzrnyJl3V3rMm+XvpCSVv9JyvJYm4Qm5a9Nhy9i/wkSuJujVGhi4lga/q8TehaegMUAH+Lh2 9A5cJ1NxsSeRo+J3pdaAmixwbfQwck9fRNI0xIBOjna0estx2RShog6+DWtFBPduOzdvLEk04m ftan7dt6H3JOSgxB0yffvkTuM9Y1H9PjxpLr+w9q7Mnq0xrSpHLRrcjaMAThil5ye1KDxXnLPo mFlpwru/oMXryWy73FFZMJeOmPKd04n5sWVqUaif0m7WtBr7cdXkpZKP+P7oYdF/smlAT6dk+/ KAg= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:40:09 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 18/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:40:07 -0800 Message-Id: <20210220214007.7185-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 0ec9fe1ebade..d6554468ef65 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -3012,9 +3012,7 @@ static ssize_t target_tg_pt_gp_members_show(struct config_item *item, struct t10_alua_tg_pt_gp *tg_pt_gp = to_tg_pt_gp(item); struct se_lun *lun; ssize_t len = 0, cur_len; - unsigned char buf[TG_PT_GROUP_NAME_BUF]; - - memset(buf, 0, TG_PT_GROUP_NAME_BUF); + unsigned char buf[TG_PT_GROUP_NAME_BUF] = { }; spin_lock(&tg_pt_gp->tg_pt_gp_lock); list_for_each_entry(lun, &tg_pt_gp->tg_pt_gp_lun_list, From patchwork Sat Feb 20 21:40:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097067 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,URIBL_BLOCKED,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 2A4C0C433E9 for ; Sat, 20 Feb 2021 21:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07FCA64E2F for ; Sat, 20 Feb 2021 21:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbhBTVl2 (ORCPT ); Sat, 20 Feb 2021 16:41:28 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:43906 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbhBTVlY (ORCPT ); Sat, 20 Feb 2021 16:41:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857284; x=1645393284; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2YO4BsWafjPFqQDWBRowWiri1qYzIAiaVzl+bi4mvu8=; b=k5mlfe4PUb4BQpNBKvqcXnfBMwcOLoG3JRELBJEG6xDS4N/EsSEMaLhR x/XCFxoyJ4Zh+cfyQp+q/k7DZIZnEZJ/g/CRLp2fKZqSZCDtN5/UhYozx pcMYTrr1ycR6dIjD69GZxWgWmVEtdms2JL8ZI5F8FYuwDO8wuyXmOafUF rsRzm449VuBaOnMiAc1rjYBwN53cduh+2LmD4sgt9HnF1bJr6i1G1Et9l bLM6GwI5B0LoKGiDBtKsx7w48jW8Iiv+VQeKxrjyzFRsdRSajrmROIQlR 8PhcO3b7L1KhquK86RybwOXYW6Hxe41YZoyRJpyezHVdrtD+dRBROpNMm w==; IronPort-SDR: V/xg9FJ+Z+PZtRP0GFrXFC1d/gLvk2Nc4f/BGT8VK57188bu8Ls78NExIOhO3qB+QEwx5Ug8mh SIUBU+s4RD68H4FaC9zhPIK4rCKKjgPFasY71Dz5GPy/vmWNBJgAXdc4jPDqXnqj40Di8m7Ler JaCbjkC8/D0FlJWKlePJSJwTaJagocvk5sQ8n5ucZj/9QP92+jJ/Zy2nof7V3qVAbt3kejG8No JbZYMkafVuS6rmH0FnIgOsqptoT00CkY7CLJIACh8YH0mXVK2c3Pqm4G+EsUfZLCWJUK+sotVz G30= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="161591315" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:40:20 +0800 IronPort-SDR: 8tMX7j1ao8BO5o8Dcu6s8CRVzV6TiAqDyvAXjikdbluxbyMRsAev8/4dnrCOkfowXfXBn9XvWH bkOX0yJVVyth/gIPDflXLHYIUmkjT6UE0vVHSRPwcvWTH43hcma6OvYHRY7jan9alGOf6CXkqw CLutlLeIzvWmPeujhCXITYt228bEwLLTfTXX9fcPeTXGxBAWCCz09IxIdqD8zl44ifc9yEZO3x wGwLhfPWVCdtbxsCqfNBR2aD9Ga2MLGxx16VzxNU/yKmuNy7jGEKEM0zQSsXzZc2olUUG3vV2F 5cjqWr0kO/+W8kr3sFcnMxl5 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:23:42 -0800 IronPort-SDR: tonu6DCmzb4hSW/RX3Ni3J+eR4v1RMx6OXW7XcHiYbQEzNNWJyXIZdamL4aejOZoRgOJ/pWYXx 0atZyayObVl6Uk2HPDopu+A/uQiuplExIOhHH17FA0dHhlQ2HR9fv3HsVt4Jyle+15N4QNB5oR 7uWv3F6O0Jyk1ID0YqhsjqWp6L9B6DiihpwaBWBO34sciZ44qRjTmOyg8PKz2NMSX9/CF4UNZ8 sfTPHRhpXtNk1+qj5cMHM0u8X8GJ90W9WBmkfk61uvYgCyqCD1FaCukDuKf3i0SxtoAkFYOGFM RRw= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:40:20 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 19/24] target/configfs: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:40:18 -0800 Message-Id: <20210220214018.7237-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_configfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index d6554468ef65..9cb1ca8421c8 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -3399,11 +3399,10 @@ static struct config_group *target_core_call_addhbatotarget( { char *se_plugin_str, *str, *str2; struct se_hba *hba; - char buf[TARGET_CORE_NAME_MAX_LEN]; + char buf[TARGET_CORE_NAME_MAX_LEN] = { }; unsigned long plugin_dep_id = 0; int ret; - memset(buf, 0, TARGET_CORE_NAME_MAX_LEN); if (strlen(name) >= TARGET_CORE_NAME_MAX_LEN) { pr_err("Passed *name strlen(): %d exceeds" " TARGET_CORE_NAME_MAX_LEN: %d\n", (int)strlen(name), From patchwork Sat Feb 20 21:40:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097069 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,URIBL_BLOCKED,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 A0392C43331 for ; Sat, 20 Feb 2021 21:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8AC4764E92 for ; Sat, 20 Feb 2021 21:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbhBTVli (ORCPT ); Sat, 20 Feb 2021 16:41:38 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:16763 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbhBTVlg (ORCPT ); Sat, 20 Feb 2021 16:41:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857295; x=1645393295; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rivaMoXvEXjyk/pEn822tjwPBz6E11qXaMBR8eM9koo=; b=igu4W7WoMtDL/bMZ1AwDnEGgk6V5KmXcyww+ziqHkmXsaGTZsqIb1qWN v5u7BiKNeXN2cg2je7wTMk53FNUSMnIC2z9tbbr6CX3mYhzuwc1xhQ+4t xYlosIQS0kbHhKtAhU6GBbx0bLgm7eOIROz0qA0C3N6U70kE8fSDfcVgd aXikehbRWMx+FpOtNPrn0vKaV0IBb3P5Sbmo6eYZKORMHg6L8Ga/eJjGg Jd7S+f6RnlfNdhh0sIS2u2H531K9DafN0BX17mAtoaPDbqejiEOWD6nRP r4guxBHBrTTLh/d1o1dUwtwKB2ylSl0H5DrXI+pcKHSDFVc+qH5rX6Gr6 g==; IronPort-SDR: jLcQPRKMGAhhZjyc8pDnoLhuULm+M5oBrc7+tHExqUd1GJTF+JBdifHifRgdlrZAeT9v3RXwyJ 1aE31pZ1gv81sVRb7RWIU+wgv2MyURY8Ikfme0wmIedLC0avIBI4+D/b+SkaBuACPH/ci7N5dl PpBLs8DrQ2U1m8mlrBlF8Z7oACOrEaVHAsOEXIu1KpdInrSlPiJt/PKjDvbZpBe+70fWDk2VNY r+NY/w+RGowlhc11MAuBy/5XOcUtJ4vtKrh8wkq9pyD0rB0fofYyAUtEUsg1qqgiYDssfkOBF5 PvI= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="160432975" 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; 21 Feb 2021 05:40:30 +0800 IronPort-SDR: jKuPQaUqY2xloNufQQEWq1RFTW1TbzJpQCBS6pgmT0/f2S7eLO34afqrtdbEvEBWB+4KIGrOHT dofFeKTjsQTbZM+C9BxHFRKl2qgvVo/dYe/l4MnlPqF6T9Wxr4DdofNdzYW7Ku6RGtv8VeY7Q/ so7bEQirUhhQWuBjISKb04Ez09hKDbsn5tMekVp/8rKPCXOXi1N1lJI14gi7ruyYfZYZk4VVGJ sDAxZF4eHAo7C2D+6HwE+Fxa0hLYEOK4Um5+qwWIMHl++1IiJtmzjfoDYPmy8A01Zd5RXgYzJt tHEdhxraq+rhsgcybS4GO+41 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:23:53 -0800 IronPort-SDR: L/89aeBMb96HQsm74I/8f1ByKOCiGpXFUAPKsxXccFriLmJ+jRXbsnb756xPPWCNMd1BPZ5ct/ wDYww1OnENChouJQuwHM3Ic9oF8T9BgkVeyWKqLIFNKKOH7LOvbFFeV/1AMSlmkg2t2IlXIJQX 2VR92xak12VLdaBWqKm+SgKY6LHxoulbi2KjXrjPA9yk4GScGBh0Ia2Y/McENfClBznCjJZQRq fQKnxkVS2KvvuvWqr68K+YxIDCXhxmZKlLEhS1pMQ2XmRqXv1LaM6BPEIpDrav7P5aDVZp6Ney GrM= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:40:31 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 20/24] target/pr: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:40:29 -0800 Message-Id: <20210220214029.7293-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_pr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 14db5e568f22..942b93d12295 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -928,12 +928,10 @@ static int __core_scsi3_check_aptpl_registration( { struct t10_pr_registration *pr_reg, *pr_reg_tmp; struct t10_reservation *pr_tmpl = &dev->t10_pr; - unsigned char i_port[PR_APTPL_MAX_IPORT_LEN]; - unsigned char t_port[PR_APTPL_MAX_TPORT_LEN]; + unsigned char i_port[PR_APTPL_MAX_IPORT_LEN] = { }; + unsigned char t_port[PR_APTPL_MAX_TPORT_LEN] = { }; u16 tpgt; - memset(i_port, 0, PR_APTPL_MAX_IPORT_LEN); - memset(t_port, 0, PR_APTPL_MAX_TPORT_LEN); /* * Copy Initiator Port information from struct se_node_acl */ From patchwork Sat Feb 20 21:40:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097085 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,URIBL_BLOCKED,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 5E0F9C433E6 for ; Sat, 20 Feb 2021 21:42:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 289FA64ED5 for ; Sat, 20 Feb 2021 21:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbhBTVlu (ORCPT ); Sat, 20 Feb 2021 16:41:50 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:61325 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbhBTVlr (ORCPT ); Sat, 20 Feb 2021 16:41:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857306; x=1645393306; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2x0mJTAFudYLvb9g2HDJPH8JbRdupRGSp/jjFKHtNc4=; b=kdywml/7siRGW8ud48JlHtCNGUkaHoHvx0ODTxEdZYcPpeGq4yk8rZdh Rkt4JTTRMSk/uLGGXW3viQdwM/0q7ukCROAQLgsNeXEP1lUSHBftDqV8T linCJwlEovuOCvpKCbWT/EdVVpSJ+CKpuNgcE6hyua6h75UGpXZynVHwt 74WYQjgnW8SI6n8Mlaluj1jTWngtJPNlc5lngq8ZGS+YCqGGAEBOnE90r LZiU3pTfjHVDDmzkKg2EgGbGqolcjCoVuNGBy+Ox1Ezy9q9OJ4RCh732X 9jS32nV6ecRYbzPGtP2CoEu0DjtE2pPYlu3RPvY6WkldSjuXT2IhnmN3p w==; IronPort-SDR: 8xnmLJQpNrhBhItyE6zflUPdvTQIGTQ8YcSXnUHbi51awkx2/yr+snosoIFaMBIWXe1MR9h0as dqNb6N++x4VrES1eocL/5Bg6vBDie6OJeq9sczjTOn15lGsV7MLIEnzHVQgaSenTT5MP8XLWy+ HLc0fVMZo4B5dVuBNxcqsEkjD+ZpJA0XhtTPZcYbil8ueHEnvZFhn6K5xbHuJ5KbSRaavkg01E n6uBRs4zfxFiMnV7VkGpWHTepyzxmftb5XcdTUyCN6ELZbyD7axmq+sJfuIPTdzPnygx/r0uQX MH0= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="270955008" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:40:41 +0800 IronPort-SDR: PDzbXjjufeD/vlytU8Mg4oPzz0q38wX0KEj9QFEPMLoS2/m2wa+vcN/5HoYPfYh8L+/VElr1Q3 yryk4Z1lNbik9JcL97l6z2aTFQ1Y2e9DwH5Fenrx603XXwPw6Z4Bvi5XrEuqgjkH19P1szISEs 2Cz7yG+zVsokMXtNJrMuaGHHdzG2FQcpYSwk/33AZcU2yQMvseV4r+vi8E1rP+tEKQmKgC+IvD ObGb5KYm3RWIcymSXnsxBAxaFbRmitW31hZ5etFIhjuVLGWqyYANtKShKiRhLDOulRb6aJQ+ww DoNj0HUvumB2bf5ScC/L2kvv Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:24:04 -0800 IronPort-SDR: LW4eJkghoij1CcAnYKcCWJi4mLVgxp5cyTQuPWgmIGHFEgf0qqYsTPeUSP5rR+JOjKjCwIZ3CW Eh0a5dM9PvVJWdFePCxh2N5KGeL/GuaXjKc7YSXCFemArXfS33fJ4qsOWvIPKKBeyuXKZS60Va SJQtf8XBAH6FNdStCkOv5ryisEQ/umQNWZH/FxyfpZ7zHmUQd8sZFphU+g4mloNRkv19FWHU98 FTWaLKcKwb/4EG51d2PBgzuvdmsb76Pb+1Ibs+qH2uwLsoOR7hfQlTZ4TM+ejaMLJQVvoqCHHj EmI= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:40:42 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 21/24] target/pr: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:40:40 -0800 Message-Id: <20210220214040.7337-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_pr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 942b93d12295..3644d2642929 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -1202,10 +1202,10 @@ static struct t10_pr_registration *core_scsi3_locate_pr_reg( struct se_session *sess) { struct se_portal_group *tpg = nacl->se_tpg; - unsigned char buf[PR_REG_ISID_LEN], *isid_ptr = NULL; + unsigned char buf[PR_REG_ISID_LEN] = { }; + unsigned char *isid_ptr = NULL; if (tpg->se_tpg_tfo->sess_get_initiator_sid != NULL) { - memset(&buf[0], 0, PR_REG_ISID_LEN); tpg->se_tpg_tfo->sess_get_initiator_sid(sess, &buf[0], PR_REG_ISID_LEN); isid_ptr = &buf[0]; From patchwork Sat Feb 20 21:40: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: 12097087 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,URIBL_BLOCKED,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 DFD35C433E0 for ; Sat, 20 Feb 2021 21:42:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B369964EB8 for ; Sat, 20 Feb 2021 21:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230038AbhBTVmY (ORCPT ); Sat, 20 Feb 2021 16:42:24 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:61339 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbhBTVl6 (ORCPT ); Sat, 20 Feb 2021 16:41:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857317; x=1645393317; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=slEW5jUIHdjn6ZgklOXQG+55T+E7Y+l5P0x8rbnaJGc=; b=a2fhnTr34jrgs0DMUYFMgaW3FFcPGSXJuJZM+3dPvv7MzKFaHYtCnr4l VKTv7SlEnwjPR7BHCiJhKD+6WCzAtqez1hveRsON3IKuc6tE17iWPeYa8 ELqDLJanaAlB+WyTzD34LMpLQcJZaepGH0ZCkZb0G/EdwflcQP7IYeOz7 dd4Z9YnVzneB91pjMAg5OEQrTSF9qZjNWixiw2NP8Oc+Kv+qWoINLPTgJ ZmkTeFgTwUkHhtc1hBnzQyq0hB8+p/tpEZabuGvSfGUvM95kKxIRklRRq 6lJD6OXOTmwHa9knPWwyXHxSf9QNq9T3QFgMM85zUeQ7+qsII6vMSuV9r A==; IronPort-SDR: zpxZB9zCCrwwU4nZXmqt6kwEDIO7MkRquagMcxT+jKtYzU0pnn2gX8Uaz4Hc6Zxppft1nPKe/y lQfavDcd+Zl6NNS+JBfXlbsfRa6PxWD/OfLnsCGNmHB3e8UBJ3Nav6vkOuZbGh5v+60nNU3yMv lce916/HjECltogQ9OjIDkP7H4+CMjloBC5PiR/nZfDFXsuQwHp8oEz1N5kuQfWjmNaxmiDvg9 +ghriwKe9pB/sQfmXb7ma1h08Yl2uPiqneaipP8ZgQArmF/ZIsRMGj85sakyzRvcZjrxZXqcOu tFw= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="270955012" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:40:52 +0800 IronPort-SDR: uO0FNYYmxufwjbRexr2USOTzMbZ1apiTqWO18tD2WGKjkcdBaSyymoA/NSkfnQEVxbg18zdyk1 2Z7HyEmHZFOuCH7TdPt8sg43SvMslNXxzUwx9xQ18Rw5w1/WxNt9EC7yA5igI/O2OgqwWCwXFG 7Fn+BXdOlKcEi/8FF0VzNB5pEGN8q7rbFLgSZj0PJi0291SGFmhnJNKhDs6tUZh30RfFNjTxj2 B1y8e0rI0xq6aAoMjKVrc2xLkbXNzX1wOwWX57EE+AqVwVDg6LNtR8aKweO18TxegRp0pJrg6N lnbeU3X3oLnSQWxWHGf6nbkv Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:24:15 -0800 IronPort-SDR: 52IIn5Z2HvQ2QL6R9+vrHuD/ZHyatKkqGm/NWnkdDPs5QJ1aoCEb5lV9Alli5MXBkGq0nHgulU RMEN8a7RAOZjmBP5JNzKtyGlKJ8r6E98zra/ovzGZuvjcWD/uKdx/UUeLLIJviR3DuNOBcMzVt Dawdc4If4XknE3xl/QSMy3Q7y7t2lWek0CcD7So9/xM9qOrwKw+sDK0IrscZGArm4Ve3db9mCb 7TTRVanb2hT5glTrW2kJYiPRNvnB8ySTl6Kzt+24nnYKXYzUjDUlyvNdfLpDYbUxeSGYtCNiAz bgk= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:40:52 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 22/24] target/pr: remove the memset with declare-init Date: Sat, 20 Feb 2021 13:40:51 -0800 Message-Id: <20210220214051.7381-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_pr.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 3644d2642929..894cda06261c 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -896,9 +896,8 @@ static void core_scsi3_aptpl_reserve( struct se_node_acl *node_acl, struct t10_pr_registration *pr_reg) { - char i_buf[PR_REG_ISID_ID_LEN]; + char i_buf[PR_REG_ISID_ID_LEN] = { }; - memset(i_buf, 0, PR_REG_ISID_ID_LEN); core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); spin_lock(&dev->dev_reservation_lock); @@ -1021,9 +1020,8 @@ static void __core_scsi3_dump_registration( enum register_type register_type) { struct se_portal_group *se_tpg = nacl->se_tpg; - char i_buf[PR_REG_ISID_ID_LEN]; + char i_buf[PR_REG_ISID_ID_LEN] = { }; - memset(&i_buf[0], 0, PR_REG_ISID_ID_LEN); core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); pr_debug("SPC-3 PR [%s] Service Action: REGISTER%s Initiator" @@ -1283,11 +1281,10 @@ static void __core_scsi3_free_registration( struct t10_reservation *pr_tmpl = &dev->t10_pr; struct se_node_acl *nacl = pr_reg->pr_reg_nacl; struct se_dev_entry *deve; - char i_buf[PR_REG_ISID_ID_LEN]; + char i_buf[PR_REG_ISID_ID_LEN] = { }; lockdep_assert_held(&pr_tmpl->registration_lock); - memset(i_buf, 0, PR_REG_ISID_ID_LEN); core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); if (!list_empty(&pr_reg->pr_reg_list)) @@ -2057,7 +2054,8 @@ core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key, struct se_portal_group *se_tpg; struct t10_pr_registration *pr_reg, *pr_reg_p, *pr_reg_tmp; struct t10_reservation *pr_tmpl = &dev->t10_pr; - unsigned char isid_buf[PR_REG_ISID_LEN], *isid_ptr = NULL; + unsigned char isid_buf[PR_REG_ISID_LEN] = { }; + unsigned char *isid_ptr = NULL; sense_reason_t ret = TCM_NO_SENSE; int pr_holder = 0, type; @@ -2068,7 +2066,6 @@ core_scsi3_emulate_pro_register(struct se_cmd *cmd, u64 res_key, u64 sa_res_key, se_tpg = se_sess->se_tpg; if (se_tpg->se_tpg_tfo->sess_get_initiator_sid) { - memset(&isid_buf[0], 0, PR_REG_ISID_LEN); se_tpg->se_tpg_tfo->sess_get_initiator_sid(se_sess, &isid_buf[0], PR_REG_ISID_LEN); isid_ptr = &isid_buf[0]; @@ -2280,11 +2277,9 @@ core_scsi3_pro_reserve(struct se_cmd *cmd, int type, int scope, u64 res_key) struct se_lun *se_lun = cmd->se_lun; struct t10_pr_registration *pr_reg, *pr_res_holder; struct t10_reservation *pr_tmpl = &dev->t10_pr; - char i_buf[PR_REG_ISID_ID_LEN]; + char i_buf[PR_REG_ISID_ID_LEN] = { }; sense_reason_t ret; - memset(i_buf, 0, PR_REG_ISID_ID_LEN); - if (!se_sess || !se_lun) { pr_err("SPC-3 PR: se_sess || struct se_lun is NULL!\n"); return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; @@ -2455,12 +2450,11 @@ static void __core_scsi3_complete_pro_release( int unreg) { const struct target_core_fabric_ops *tfo = se_nacl->se_tpg->se_tpg_tfo; - char i_buf[PR_REG_ISID_ID_LEN]; + char i_buf[PR_REG_ISID_ID_LEN] = { }; int pr_res_type = 0, pr_res_scope = 0; lockdep_assert_held(&dev->dev_reservation_lock); - memset(i_buf, 0, PR_REG_ISID_ID_LEN); core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); /* * Go ahead and release the current PR reservation holder. @@ -2766,11 +2760,10 @@ static void __core_scsi3_complete_pro_preempt( { struct se_node_acl *nacl = pr_reg->pr_reg_nacl; const struct target_core_fabric_ops *tfo = nacl->se_tpg->se_tpg_tfo; - char i_buf[PR_REG_ISID_ID_LEN]; + char i_buf[PR_REG_ISID_ID_LEN] = { }; lockdep_assert_held(&dev->dev_reservation_lock); - memset(i_buf, 0, PR_REG_ISID_ID_LEN); core_pr_dump_initiator_port(pr_reg, i_buf, PR_REG_ISID_ID_LEN); /* * Do an implicit RELEASE of the existing reservation. @@ -3156,7 +3149,7 @@ core_scsi3_emulate_pro_register_and_move(struct se_cmd *cmd, u64 res_key, struct t10_reservation *pr_tmpl = &dev->t10_pr; unsigned char *buf; const unsigned char *initiator_str; - char *iport_ptr = NULL, i_buf[PR_REG_ISID_ID_LEN]; + char *iport_ptr = NULL, i_buf[PR_REG_ISID_ID_LEN] = { }; u32 tid_len, tmp_tid_len; int new_reg = 0, type, scope, matching_iname; sense_reason_t ret; @@ -3168,7 +3161,6 @@ core_scsi3_emulate_pro_register_and_move(struct se_cmd *cmd, u64 res_key, return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; } - memset(i_buf, 0, PR_REG_ISID_ID_LEN); se_tpg = se_sess->se_tpg; tf_ops = se_tpg->se_tpg_tfo; /* From patchwork Sat Feb 20 21:41:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097091 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,URIBL_BLOCKED,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 188D0C433E9 for ; Sat, 20 Feb 2021 21:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01EB564EB8 for ; Sat, 20 Feb 2021 21:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbhBTVmZ (ORCPT ); Sat, 20 Feb 2021 16:42:25 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:43957 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbhBTVmI (ORCPT ); Sat, 20 Feb 2021 16:42:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857328; x=1645393328; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Def7Pmhe7nl2nwbzkNC0E/C7Ibx8KE9SjYFMt9IMIQ8=; b=O/gC0jdY4mjRQ4rb1NSfeuW6uHBw+B7h4UYP+kWSYtmE8zSNKP1TFBzy sLp7GeGUVQL2shL/K3Wxp0O7SL7bNzZkTcoLJ73J+xnrrwgehANVfakRg ABV7dT3M2pVTyv7+90aWR/wkDpS2Z6z2cd6K6F/z/vrPR0gOC9GtAkGk1 v/YB/CLWUoxgyGCl3o8H9fZhM5y2F1ov0Hz5RWGQYf2F4xWI80rGUKPKH 9qbYEPvUgpZLFUKXKNu5uRP5VJ7RhWwpdufZrCnbUBy9hNxPjK/Vm5t2S NYkphiVfxprPpg8IwzxXJiL6rD2DIR4BiFYWbKTGkqdkhal08I0C8A81N w==; IronPort-SDR: XIOoOtoXxSIy8h6GQ/An6Bv5efVk6rXOW6MX9YUJO/eSL9mhBso3FFT/95AmTSyRmW/mt8eWEA B1gzqT39ZqRWEORMQxyqN0uUzT6nc5FsdcjVyEeAUuCFvRUSVQOHIwLLcl1nJfbr4YHuyDaWV0 msWilK27gfILeo4vSWl4XbsiCo2ojOhVbGGH9S1LwOVQ7xmpE4CVlyozRT4kfWK76UnXg4UStK gh4BSwnVBdeW7CqHy1ZksZVOC4+BuIiBl0OBrI2Fv1qhls/j+xiul6nbe2NEXctMbCnuT1rQom DOo= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="161591334" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:41:03 +0800 IronPort-SDR: FYoqzbCza8IYlHQ9vIcaSEzKknV+dCEYvhBVFy5LKegOkUn2chGChAbR3evEt0fjW5RPe4vZNM J4hlMxqOinw/iF1h9Nvsxgw8oqSHVCjYzbkFM0soHO1RZIDXT24WDx3LmWygPcOrESa6zWB6TL QABv3XH8UPXi5s2iwfk4U3j996dUptUjeNLlKCw+fzC1sZ1A6tZGUBveC9TY5W1UYZI/gVnUgz fB4YPbpzXVm1DyHQzCL1mucghIMhS2XOx35Eg49QjNK4YWfPUm2eBsSftAcGZHuTZ/izlKCsYQ viX5lz4yK7J3FQbtv1p5Cxdp Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:24:25 -0800 IronPort-SDR: f/K98XIfX44U0e1IbSwX9nDfDJ1oBRiljHktNPvawWlQ8mAcnCEI2nTNVlakW3AWXcxoR932Dv gyw6hXAtK4iJqqhoIFNrSJxuSyQ9KFQviSZqLJhUDstlWPJm30faUwQb7LPVjgPyBqhexcrTAY 1bDqz4MgFW+mQOpH31/6PT/Fw+6LiGlwJ30VSCe+xW9sWUPl6EBr3WOtKD92iP8jbPREuCcg1p 2CqO2WKDoQ8jvVo+bCX/DWh0fNH5/nERDBTOzxxcd6kZyiCQoAGsYKGKnZesw0yxnreHwV4YX9 /OU= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:41:03 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 23/24] target/core: don't duplicate memset 0xff Date: Sat, 20 Feb 2021 13:41:02 -0800 Message-Id: <20210220214102.7425-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Signed-off-by: Chaitanya Kulkarni --- drivers/target/target_core_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index cce455929778..3ea5c879d15a 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -498,6 +498,7 @@ fd_do_prot_fill(struct se_device *se_dev, sector_t lba, sector_t nolb, prot_length = nolb * se_dev->prot_length; + memset(buf, 0xff, bufsize); for (prot = 0; prot < prot_length;) { sector_t len = min_t(sector_t, bufsize, prot_length - prot); ssize_t ret = kernel_write(prot_fd, buf, len, &pos); @@ -523,7 +524,6 @@ fd_do_prot_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) pr_err("Unable to allocate FILEIO prot buf\n"); return -ENOMEM; } - memset(buf, 0xff, PAGE_SIZE); rc = fd_do_prot_fill(cmd->se_dev, lba, nolb, buf, PAGE_SIZE); @@ -882,7 +882,6 @@ static int fd_format_prot(struct se_device *dev) (unsigned long long)(dev->transport->get_blocks(dev) + 1) * dev->prot_length); - memset(buf, 0xff, unit_size); ret = fd_do_prot_fill(dev, 0, dev->transport->get_blocks(dev) + 1, buf, unit_size); vfree(buf); From patchwork Sat Feb 20 21:41:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12097089 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,URIBL_BLOCKED,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 40E20C4332D for ; Sat, 20 Feb 2021 21:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17D2864E2F for ; Sat, 20 Feb 2021 21:42:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbhBTVmZ (ORCPT ); Sat, 20 Feb 2021 16:42:25 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:27052 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhBTVmU (ORCPT ); Sat, 20 Feb 2021 16:42:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1613857540; x=1645393540; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CvMOpSgoYytlC6qwwSYq5xzOl3ZXzVL0I3PPdQ/+aGM=; b=MKtclAtBrETtmMYkb8WtRwLzhYrbbCE0ljF1fw9tSwEBEzdBUElzPDb5 LAVRWj1cPKkYCPf1dSBg+2otFq/2p6ksQhncHNjN2RgYUx/M/Lr3xiwhS MxeKlrMuA2xGrdJlHWwak+7ca6B+RnkOqQaDs7mXpDUEWSRFQ6Xng3uRi QGZXZC7LTBTMh9be/p+Sl5FK81eSchDt2w7OppuRAuG5MmrSib4jZcFKT zXr22dzhxK3mffRy6yRUKrjxK+h/8n9WT7a+aQaaAyTApJnAejQLtmoUf 0FmImBi7cKbyJDJrbsGbttLusX10OM++wbhdzlE6echduA2spHiYAh0D5 w==; IronPort-SDR: KxRjWZNGZCUG/MI3VcbLG0B99yugeMl3MNvRtSFZ0F9smwF/SsmUY7Y5zMRB//wr3k5pfwPzEA eB/RB3nDn7iq0iDTPYQzJSfNG0xwG+8nRyJncXy21z9gUWKfYdQ4zjsoNB0NQt+AP+326MCtsj iVjsdF8SXFaCrewBy3RJm+DLwmD/w6ccOhnQef4rzVJCQm8FMWhtySDJBa9sGM7GaJ16TpItLT bs7QxzxJGcao1RfmawydNX5dpV4/5iEA/RjQaamwvOsaCx9vUmo+1h89BEH17LCHDsBHBgeGHY W0M= X-IronPort-AV: E=Sophos;i="5.81,193,1610380800"; d="scan'208";a="264605693" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 21 Feb 2021 05:44:01 +0800 IronPort-SDR: MrtJcFsefka4juUgNVQNWjMwLfW5KQbYptDwDaiKZK0V3pyt9izumA20YuBcybM4s7/AMhQF8X MdV29u/ra0eQXcklxSkp34/lSoyx8gefU09ZQ5YHu+8ZIC12fTMTCMqg76h9cREixnzx7jTNZ8 FYWLm0BSEPo9knFKfDs4Pwf6ZtEi4qmDbvHLoAO8hyyPNhIqADuyLuaTFC9EskITev9XwMb3Zk A0Wy6giY7Zf4P9ypRcjvKBpcKZ/WRjrQTLI9qwxRj8Pa6ZhUuF5yYcZ/BrQyPdBpUL/jyy4RGU tQmzFYOJFtiNQ1EkWqiUpRpi Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2021 13:24:36 -0800 IronPort-SDR: mWPvCoPDxxt1+6tkL4srfghJL9yRuxw9QWAErNNz4h5NoJhuppXaHQiD8HnBhtfd9V4opwTaMB e4putINBRUWOvXw6iYuC5MvZOlumq6hFNRgFMIAdTRV95MjO/YgjxPN7n9/+NkNZyd6if9IiwS tvWNDr57t10UwrxknfNpIAi6qj8ag5kHEx0ddblHDB2oLaNPAlq+H3t+SkRLBjzY3HUJlnu9M2 Om8ejVjLNipEQhUklOCpa2mtAVRVdaGmI1mp/AdudvEbchXhTksjLYQh5ZQxvkusj1XA+XEj+7 4fo= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 20 Feb 2021 13:41:14 -0800 From: Chaitanya Kulkarni To: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Cc: martin.petersen@oracle.com, hare@suse.de, jejb@linux.ibm.com, mlombard@redhat.com, michael.christie@oracle.com, houpu@bytedance.com, Chaitanya Kulkarni Subject: [RFC PATCH 24/24] target: mark __rcu to avoid warning Date: Sat, 20 Feb 2021 13:41:12 -0800 Message-Id: <20210220214112.7469-1-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1.dirty MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Mark struct fc_lport member prov with __rcu that fixes following warning :- drivers/target/tcm_fc/tfc_sess.c:47:17: error: incompatible types in comparison expression (different address spaces): drivers/target/tcm_fc/tfc_sess.c:47:17: void [noderef] __rcu * drivers/target/tcm_fc/tfc_sess.c:47:17: void * drivers/target/tcm_fc/tfc_sess.c:72:9: error: incompatible types in comparison expression (different address spaces): drivers/target/tcm_fc/tfc_sess.c:72:9: void [noderef] __rcu * drivers/target/tcm_fc/tfc_sess.c:72:9: void * Signed-off-by: Chaitanya Kulkarni --- include/scsi/libfc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 9b87e1a1c646..0446513e46d8 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -746,7 +746,7 @@ struct fc_lport { struct mutex lp_mutex; struct list_head list; struct delayed_work retry_work; - void *prov[FC_FC4_PROV_SIZE]; + void __rcu *prov[FC_FC4_PROV_SIZE]; struct list_head lport_list; };