Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1342016rwb; Tue, 4 Oct 2022 20:30:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TNmWadl6/jO2mDhD/xKw22VpoxUE/GfSmT3mXxfKGeaZPa4pBbHMWs06Y7Mse3LX7hHbR X-Received: by 2002:a17:907:3ea9:b0:787:f6aa:8ad5 with SMTP id hs41-20020a1709073ea900b00787f6aa8ad5mr18955765ejc.3.1664940641925; Tue, 04 Oct 2022 20:30:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664940641; cv=pass; d=google.com; s=arc-20160816; b=ljqIQ2K5xekHwejZewvq1bjoxPwc4ng2g6+tCpFbexgPme8yHq3pdPRbT2ZRhLQALa BaGM7XbrwYwOfKK5Lo7eS2i/7NZ5gI+/KznRIqMOZ0/3yir5PtmP4RJWSUa33lesj/IB RwDjNtnxLkZPxWzu6rkotoV3g65pXXRFTHy8LYsDf8mbakVYXkpmDu5DSZcu7uMYUEfA HsmMlDpI+dEZ9ZsOAC4YU3s26TV57C46JySVdYHzGxlMF2KcoZLt/sBhpr4++C9ZQ6qY O/br8Ljxk3158gO1aToeg5y9hF6Zz5/jM0EzrEiALTaYhHp3Fut6H9CGcSJo9ZYEI2+O fdmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MwJoYyzzFtLJ6RYN8jm17eFSPpNKKb7Ir3gvcoHky7s=; b=rGPqA0ZHYoDB/RPaWY/mJk7covZO8zOkCXxMXIt9wj4Hs+X3cXQMhWvg9ekmq5URrS x6DhodeeZJDCFHEOgROt3Ct5spAyaIDJXzvvdNVCFIoYH9GGmudgyJxkf6SvGm4saz+p bkssr42WqegyynsQmcw5lz4LqQXsmSjL218aOj8J2zBgNUGpnp/uetnYmXmjRu0CgmRD ys3VdPEdopNdWT95j0ROeA7QRZ9ZP8Ly3TDuITRCWzU1cbkHidSlLK9v0h/YXY9cRPZs 8Nmk0Q7snMzxip7uVw2Ypb4f1DXTe8gloDu4GF12vTcuh2ZV0V61Yv1GutxD5lVrmUjs Fhfw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=JdicFUG8; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz30-20020a1709077d9e00b007316ac034acsi12849615ejc.834.2022.10.04.20.30.15; Tue, 04 Oct 2022 20:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=JdicFUG8; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiJED1b (ORCPT + 99 others); Tue, 4 Oct 2022 23:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbiJED0m (ORCPT ); Tue, 4 Oct 2022 23:26:42 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB7D733C1; Tue, 4 Oct 2022 20:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GsP9CuxPJtR/q9XS5KKaJXEvOi6BADmwLOjAlReHkmXHF63nglaj+3k4CMTARb7SPRbyiyxueGw6a+HTI3eC/0kNJc09JDk2GMJvYtUFsJe0/0J/X3nvJtFWM582oMOBrqMqv4XQFZZ2wEcRQLTXPT3cMdNQXd3n2MParjE8XEREjt5H+OZ2SR1k/2pDFuwqloUKz1XcwVXUq2r9T0k/M0oEOL6YaFcpf2Mgr7PDiekplDY5OQcPlwlYU+H3lwxYlK6OviWOXUjn5+BCwi7njRrx1ElnNnDsdCoeOwrjRB/p/fabLhfnBO0gfNKVh/r8OaDA1YKnwnqbB0eucqyecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MwJoYyzzFtLJ6RYN8jm17eFSPpNKKb7Ir3gvcoHky7s=; b=I/elbQjDx9Hs+tsKJ50X7fdP0RdAlKW6n6rYJCyrSRaN1j2C9bGo2xLLiKmfAgqi/grAqNuqhRzk9WvoolEvwLQ7wNrRWmi+x0NFkJA9SEvEvDW6BpwWB3MUyiSneiJxPfiy5GR2MSVUZkZ6ioDExsXIz4s76IW1g1yPy6MxMbKvTsswl0tz0FIHtuXMu0215dBaefSue93kaFAQRPtWOmodZfmxE4ECzqrz8O118khaAI1AHi+W4U6bdeCdi3Ted8efjEVN3N5M411wvMh4b1WpC4Cl83C1pSAlU2AuLMZh9qz5lbSh90vF/oyqInSBoBpN0az8LTEGFjr54UxLUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MwJoYyzzFtLJ6RYN8jm17eFSPpNKKb7Ir3gvcoHky7s=; b=JdicFUG8fzc8JW0qLJGYk2kcaMIlzPVt022pzB6MEtPRTX6X8T0xHzyTON4HeIoArTZEnvfFo87s+KCjXtg7sOsCQPBoYwYuFzmG4k/rvFtd5LHMWQSievHUejUWr5VJqN2sA1jVv+WOSJJR6AUsupRC4KINf3yG00mLBp9syazP0zj3IDGEvy/yMT4NzEgWPcH/W/y0cPGLAs3O6ocbXLYemRUj3BSmBMEKlzkjUelsOxT4/xt41bw6GYAtbojbk0Ve5rWNakUx+LiAlsCm682Y+x6FIfd5SbQf3/XKKCVLYoEJ1U3+2cGa9vjCVjmlyiY+WDfEmxQYHTgao/XEFg== Received: from DM5PR07CA0077.namprd07.prod.outlook.com (2603:10b6:4:ad::42) by CH3PR12MB7689.namprd12.prod.outlook.com (2603:10b6:610:14d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17; Wed, 5 Oct 2022 03:25:29 +0000 Received: from DM6NAM11FT100.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ad:cafe::6a) by DM5PR07CA0077.outlook.office365.com (2603:10b6:4:ad::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25 via Frontend Transport; Wed, 5 Oct 2022 03:25:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT100.mail.protection.outlook.com (10.13.172.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.10 via Frontend Transport; Wed, 5 Oct 2022 03:25:29 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Tue, 4 Oct 2022 20:25:26 -0700 Received: from dev.nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 4 Oct 2022 20:25:23 -0700 From: Chaitanya Kulkarni To: , , , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC PATCH 10/21] amiflop: use lib tagset init helper Date: Tue, 4 Oct 2022 20:22:46 -0700 Message-ID: <20221005032257.80681-11-kch@nvidia.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20221005032257.80681-1-kch@nvidia.com> References: <20221005032257.80681-1-kch@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT100:EE_|CH3PR12MB7689:EE_ X-MS-Office365-Filtering-Correlation-Id: b706260a-84d9-4945-0731-08daa68140d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qaLD80h+r+AI/5ufb/enJLpaqCCOh4b3Rak4Zo+0qBI4SfshnOJHnnYCHodzIeaE+KkAoMJHzFkZ7lFTUHjq33FL00Rw2VtMqJGiqn9eZq8YPPi5wDr6IADXjmPabyL50hN4jJwYK4f1IiH9bJAcPHvcAvonFinGIOBuubttRsERKQC7biX2nVTUeXpD9UlXelMM1wbbGkjEJs9X7qhS79acHxZpFu11eyiZa+RPNs21l2wejLpyOe9E/RMUj3/c7XdgXVpfVuz6TPtqhfS4BvBgKlHkE7tO5a02jF529MJ8UfqAMCKCoBH69ovSJlYlJCQ4dt7GdNDK6Vyc3OZEcHeceVg1kWrukYe8UaWR1urHd9gXiWyOLt3qjxKOacr7R+lyInSm0SUT9ULGnX3d+HLJYhaOeOQsY32XE6pm77a9EOC2M/DAhYh8HB42h1/Tko/WSrxwzP04v8RmE5mEl1oYxyLM3JSo2hAZnrkVV3VRX7b60t6Y5QTiZd3peFDm0kw4Whnt1h7BzDRLgNDXN1xDAArqEE6R9Zo8+ibnygb4Yd79WZsi9wxLPred57ejxexCx8ZvzU5ibd1UyHAh10GOsvAUz2+ZfZqdSEwQzsq4UrJAgQeJQCWiWuoaXmYuK192Bp5rLpTX9lxO0VLLilOSINaef/CIItHwUlxCd1yga0VhixPrv7b+nzN4+7HLotZIRcDWudMtsywafqAHKPM1yKaMQ7SP4BD/eWvywpAeYQ4EPhlp+MniyeOd/tzyAUyRsOe4wCtL9eYLT2gO+iCISW3ZS2djqr/CWEbivtM3B3E9/YE948bA41tULWwyxMFNjyFFt+cUUHpwvk/QKBaFY+tw3o/0kAT3U3Nwi80= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(346002)(396003)(376002)(451199015)(46966006)(36840700001)(40470700004)(83380400001)(4326008)(7696005)(186003)(6666004)(82310400005)(1076003)(478600001)(8936002)(110136005)(16526019)(54906003)(70586007)(7406005)(336012)(47076005)(426003)(2616005)(36756003)(26005)(70206006)(2906002)(7636003)(41300700001)(36860700001)(356005)(7416002)(40460700003)(8676002)(316002)(5660300002)(7366002)(40480700001)(82740400003)(921005)(21314003)(2101003)(83996005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2022 03:25:29.3504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b706260a-84d9-4945-0731-08daa68140d3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT100.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7689 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the block layer helper to initialize the common fields of tag_set such as blk_mq_ops, number of h/w queues, queue depth, command size, numa_node, timeout, BLK_MQ_F_XXX flags, driver data. This initialization is spread all over the block drivers. This avoids the code repetation of the inialization code of the tag set in current block drivers and any future ones. Signed-off-by: Chaitanya Kulkarni --- drivers/block/amiflop.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 4c8b2ba579ee..af3f9a4b46ab 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c @@ -1813,12 +1813,10 @@ static int fd_alloc_drive(int drive) goto out; memset(&unit[drive].tag_set, 0, sizeof(unit[drive].tag_set)); - unit[drive].tag_set.ops = &amiflop_mq_ops; - unit[drive].tag_set.nr_hw_queues = 1; + blk_mq_init_tag_set(&unit[drive].tag_set, &amiflop_mq_ops, 1, 2, 0, + NUMA_NO_NODE, 0, BLK_MQ_F_SHOULD_MERGE, NULL); unit[drive].tag_set.nr_maps = 1; - unit[drive].tag_set.queue_depth = 2; - unit[drive].tag_set.numa_node = NUMA_NO_NODE; - unit[drive].tag_set.flags = BLK_MQ_F_SHOULD_MERGE; + if (blk_mq_alloc_tag_set(&unit[drive].tag_set)) goto out_cleanup_trackbuf; -- 2.29.0