Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp264863rwb; Mon, 26 Sep 2022 12:02:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6EcqSKlVV5/H9tnGyUzY+nA2hcSgrivr5BJaqD9WKvsuuDrYWvIs2TIXL1vdrmWwZinJcv X-Received: by 2002:a63:9d06:0:b0:43a:5cf5:1204 with SMTP id i6-20020a639d06000000b0043a5cf51204mr20913643pgd.557.1664218972143; Mon, 26 Sep 2022 12:02:52 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 68-20020a630147000000b0043c5fa5a469si10559246pgb.812.2022.09.26.12.02.27; Mon, 26 Sep 2022 12:02:52 -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=@intel.com header.s=Intel header.b="by/rZiCw"; arc=fail (signature failed); 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbiIZSNx (ORCPT + 99 others); Mon, 26 Sep 2022 14:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbiIZSMz (ORCPT ); Mon, 26 Sep 2022 14:12:55 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93165883E3 for ; Mon, 26 Sep 2022 11:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664215307; x=1695751307; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=lz0YIGSLN2ywkMkseobCRxPGJq51yOlslereRPGdyDE=; b=by/rZiCwEhFP+ZzW0QcE9l4XWfl35nMZu9WaVceTs9yjXo1Ky1v6KV4j 7/hUssl9Xh+VL3xQ2dHsWsNsPBlke6PWr/9VfKskuvNjTBy529NBMedul idWQVhNmVsK9F2bp29LD2wOgdrDo5Qp5rL5dllsjXVJl3Zk/7NKKSSRCJ 5UaB7QwjqRgfKGQuyjeYsPnryK+9jpzAWXR/H4UKpg5jmE8wgujU6zWMk p0+H6bwASHzNuTkuvjxuY5VDod7F3kz5IOkOo7iVWIaWDdpcB83S0tN77 yQrrz5qYM1y+ei4kOTPZUb2qoEM6iPtB/EHwjDoMGvnk7YCU+g1PPfcXj A==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="387389810" X-IronPort-AV: E=Sophos;i="5.93,346,1654585200"; d="scan'208";a="387389810" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 11:01:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="654371613" X-IronPort-AV: E=Sophos;i="5.93,346,1654585200"; d="scan'208";a="654371613" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP; 26 Sep 2022 11:01:14 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 26 Sep 2022 11:01:14 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 26 Sep 2022 11:01:13 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 26 Sep 2022 11:01:13 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 26 Sep 2022 11:01:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PDbkL+miCNlE9BIOmqNjAD5EWoyHJ21ePFXef48nut9dxaixBUOapP/P/C4ilx/rPwnizxtYVXjxQc076ZTiDQh3t+asN6VGP3PGYhr/YvaajbhLNju+zRzz9OwBfTYRdO3pDXL8VjbI1VuUXurljekIhJ1v30s+qYyyOF4lrdIOcQxjIr1wKWn1+FSE1Ss03zlsn8sHr8jNyorQeQA0zrMcao5YWYsgZEfEW4cSmR48aSSd8TeXYvVq+xkJTyUMw+yiwb2Ugu7fph6km3iDc1IhEJLlKEwurYHie5nrhdaZwIlsn8d9C/Hy5JaaY5dUa4kAI7VpT2nxi+p5bTLmwQ== 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=hvf7oCZQRHw78UBJqzCqXyoCBOJxgt4IJSs4pK5TZpg=; b=ToaGJaJg2CPmwfZ+pxLSaDpKlW/UtnsvKhe8L3cejrBWdFzkQpBPKMTO1jnfNrqzar8dTGc2chrcEo18W0qTp8TPeSxtzQbmCn1zjLiTvrNpCYxMyKaviXYTXHPibWXBdI4dB1oNu3zOk0S39uwHeAli3xpQGUougqav45Oh/SjdnegLta0PUunodzFRxDXJccg03oS8+tavvqLxXT3fi/ImJnvO3ih+q60jwJmXvGEdpelcxpyGFlKcpoVSUg9MlZ1UsDX4eSPu0jd/8LAkvmwMOJSOWRVoVazacO8eoe/dITS//OEK9ef/z8AMOVt56LuucdCv2GnBzhxRsb/p/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) by IA0PR11MB7308.namprd11.prod.outlook.com (2603:10b6:208:436::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 26 Sep 2022 18:01:10 +0000 Received: from SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::b572:2e32:300b:d14a]) by SA1PR11MB6733.namprd11.prod.outlook.com ([fe80::b572:2e32:300b:d14a%3]) with mapi id 15.20.5654.022; Mon, 26 Sep 2022 18:01:09 +0000 Date: Mon, 26 Sep 2022 11:01:04 -0700 From: Ira Weiny To: Bo Liu CC: , , , , Subject: Re: [PATCH] dax: Remove usage of the deprecated ida_simple_xxx API Message-ID: References: <20220926012635.3205-1-liubo03@inspur.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220926012635.3205-1-liubo03@inspur.com> X-ClientProxiedBy: SJ0PR13CA0027.namprd13.prod.outlook.com (2603:10b6:a03:2c0::32) To SA1PR11MB6733.namprd11.prod.outlook.com (2603:10b6:806:25c::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB6733:EE_|IA0PR11MB7308:EE_ X-MS-Office365-Filtering-Correlation-Id: 13a4cd30-4a29-4126-cef4-08da9fe91750 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: laFWtTd9HLIYFdXzgxubttgj/OspS+/dk6k/LKWsE1ZVqh4hOvnbKupzaFK4FBCh+w17rgTaqw5rp4NVlCzBPdiWec86b5KpiIEsu2zSEDF3loMdI6ytA9vKP/NdB2sVPsRuH2WQSN22ZiZmPot+NGoHcaAE0EYlig6i0AEsaL2NEfNbEkDqmg+1WvLazaJZacNhe8IGNx9eD89RnPcdOuS4PLjapa/JRlxPO7O4HH28DoQAjOrMFhMsJh0pegw/xMq03k4/Z0+uuyZO4gbnb7KNXcAAYOnBWJd8KkAtKPhynvO0hvQKAvCeq3ZmWH4R0rqJ+yMpJpTmxju7gta6aj4kxlOyzXN/PKuWE9A9WIRquNeocrsHVpxyKTLr3zH8xWsOm5xcXyH1JfDBhfHLLSv2fgZe2XCg40coAsY8eyGtPw8pb4d6GBhIft5lUl7Jh+wIqDpvfyyfPSUK+2nVJ/kMKZCNFLelY42qcPCQSzDa55JA297KG3IFvsBxRWKg4BO8WFcUsdNbeyX1quRS2J6HeVn1+DN1FFK3YJWy/ZeYwwjHk2Cy8T9OvR2Qv0kuuK9KVKnuRx3L8MYK8QquDMCKdNQALuRQqEsUgonl8bfQTRSiSDQ2Lj13+UXb9eNyLTKLc7apQ6x4GdNViBwBj+v7Sh9a6h3P2Y+yCW3ui/mOnIUW4Or5NjGDVihYbtnm8s/PgljjI69J3cE8sdDkN6x5cWTkjZ9Ph85WeYQSDnxeAw9bedE08nXIQcu7A+hE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB6733.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(7916004)(39860400002)(346002)(136003)(366004)(376002)(396003)(451199015)(6512007)(9686003)(26005)(44832011)(5660300002)(8936002)(2906002)(66946007)(66476007)(66556008)(4326008)(8676002)(6506007)(6666004)(41300700001)(38100700002)(33716001)(86362001)(186003)(82960400001)(6486002)(316002)(6916009)(478600001)(83380400001)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?OZFXdyu81/+PIAt9Ax7JIJaNK/DosWJBnmL3vVwrcKb1IY/+qPkpq8g201wq?= =?us-ascii?Q?0qJxbARuTFazUVf9UfjEuhS+JEwcKX2Z1AoiD7ELL4nNi97J0xqre8RyUnB8?= =?us-ascii?Q?ns+pi4X4v5Poiu649C40VmMVlwYdkccfO0wsUiesIAz5/WSxv3pZxznoRVFA?= =?us-ascii?Q?mHLtBxPvbIicFMNf1dNKgOmFjnLjK3N1B2lRwJvH/cR6xxin99iNWPXOY5dQ?= =?us-ascii?Q?dM25/3ENBnFTViusYizhEXQnETg0y2T5cu6Ry8NVwFl+TnzP9DufeFQ3Ka4g?= =?us-ascii?Q?7391dhK3Tt38b1vZO43LlMYjYIhMrRG2KUEIYPO7Rqe1d4M+cvqDd4Y1+2rx?= =?us-ascii?Q?LU8MoBmgVU/cZmuqhTLpLrkl8enh+rAPzvQQnz5s2WF514t6FQEfIc43fU4H?= =?us-ascii?Q?wqfGHx/bV+cjSp7jl+uFV4cvJ0GHjbrYXUCKkX8HVJeAqjeCXRrYEIYLV8sS?= =?us-ascii?Q?jT3o+DR6ixikeVi59z9rL0rSQSz9GCpxbcKy0BFnSQMUjdIiu0Xi/whjdgdG?= =?us-ascii?Q?icibgjWI3Rfxir7VAqN8JbIBi1I7ny+3Y/F/xdmMeDnOkvnzfmHAnrJjV8/8?= =?us-ascii?Q?4WDT++hN35SKlP9iWHF9OSwTX30LUT3HXJfPu8ncKH5rcTz2vkPNaBXyolEa?= =?us-ascii?Q?RRqFqTry+H+9g3FrzOZ1HlS3THOMaL4yC/MRlrTwMUzPg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?us-ascii?Q?9wxHc0MtbL2z94iF8nVFsQvJPpOg+J95/+dOVHGm?= X-MS-Exchange-CrossTenant-Network-Message-Id: 13a4cd30-4a29-4126-cef4-08da9fe91750 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB6733.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2022 18:01:09.4808 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +YreBaKbfxq5vqdbCjDu4cVBV+O7wrfLN3kyFvLVBA7AHxnIVss1esKJ87E8WjQEm2FWYs/HqagRsEE0TfmVQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7308 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On Sun, Sep 25, 2022 at 09:26:35PM -0400, Bo Liu wrote: > Use ida_alloc_xxx()/ida_free() instead of > ida_simple_get()/ida_simple_remove(). > The latter is deprecated and more verbose. > > Signed-off-by: Bo Liu Reviewed-by: Ira Weiny > --- > drivers/dax/super.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/dax/super.c b/drivers/dax/super.c > index 9b5e2a5eb0ae..da4438f3188c 100644 > --- a/drivers/dax/super.c > +++ b/drivers/dax/super.c > @@ -363,7 +363,7 @@ static void dax_free_inode(struct inode *inode) > { > struct dax_device *dax_dev = to_dax_dev(inode); > if (inode->i_rdev) > - ida_simple_remove(&dax_minor_ida, iminor(inode)); > + ida_free(&dax_minor_ida, iminor(inode)); > kmem_cache_free(dax_cache, dax_dev); > } > > @@ -445,7 +445,7 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops) > if (WARN_ON_ONCE(ops && !ops->zero_page_range)) > return ERR_PTR(-EINVAL); > > - minor = ida_simple_get(&dax_minor_ida, 0, MINORMASK+1, GFP_KERNEL); > + minor = ida_alloc_max(&dax_minor_ida, MINORMASK, GFP_KERNEL); > if (minor < 0) > return ERR_PTR(-ENOMEM); > > @@ -459,7 +459,7 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops) > return dax_dev; > > err_dev: > - ida_simple_remove(&dax_minor_ida, minor); > + ida_free(&dax_minor_ida, minor); > return ERR_PTR(-ENOMEM); > } > EXPORT_SYMBOL_GPL(alloc_dax); > -- > 2.27.0 > >