Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2991203rwb; Thu, 29 Sep 2022 18:57:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5UvYN0g7BoSTmI14ckO5cSSeWCL1ARRzPHHquYpb1ax7Fc+IkRP7VNs+k9xs1c7ZQNB0aj X-Received: by 2002:a05:6402:428a:b0:42e:8f7e:1638 with SMTP id g10-20020a056402428a00b0042e8f7e1638mr5964090edc.228.1664503077656; Thu, 29 Sep 2022 18:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664503077; cv=none; d=google.com; s=arc-20160816; b=Rw5FVWcxzTLGgfdDGYKQHmrEAFOg0iy69/1syo2atLSspUxSQdlo5Eh5in+8rlxCgy AU/qW6OJXDAzfAJN10xrskNyOzrF2wobks1qffx4Q9y9NPKSTbLpouSkFEnNcFRAUkSv Dp6TiqEQ4CvJ/UTGdysIZsRuaQNQzuMXWcpn28YavWnF5iADQiv9vGuFS31olnbP/t/n llxklJlDCSA2KJxo0QPKYyeJTlNe64xOzIH7E3rTHpWXEuJ/CO17OZL4anA5p9ABV9US gFKS6Xnf8vqcvaCPPHQ5L63W4lqO9v1Yfb0Uf+1qtzVv1Pp6OAm8rlXVAmvv6l8klqSI 5a0w== ARC-Message-Signature: i=1; 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=f6yNKO+rqmQfcCkmn6GG4pzViP9KcMoEUIZ4T1w3isc=; b=byAtYfGa4TezhmXLkn04xNBX/HqdZTpuOaEoFMif1Q+LgHMychJ53HuUT9FqTf/FIR rmmWiBJ6zE3zmIYq3P2wWJ+BmY5SotjbXBsqxXgGgkslbyB3eVvsrQQj8v7BkFY7LIzD mHUNlR+wUGuWzcApALdecnDMILS4d1A16TVkC0vCgKaoEDUPGXa2u+7qmM8UmE/nWXzL zfeJAGFd+rUbwgB1BjqkuDtSzrstRvdnbe+2A5DaupUdJADwwnlFpUH1GdihBgpY0SMT 9IibCsVq3TdJ3qzOfMPTEXqOhXrwbUcf9RdXZwxalk71lVQiwR6edGuj1Dj12+yh1dY5 cOVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=StZehtKY; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a056402510a00b00447f4482f9asi1038847edd.443.2022.09.29.18.57.31; Thu, 29 Sep 2022 18:57:57 -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=@kernel.org header.s=k20201202 header.b=StZehtKY; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbiI3AvC (ORCPT + 99 others); Thu, 29 Sep 2022 20:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbiI3Au3 (ORCPT ); Thu, 29 Sep 2022 20:50:29 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED77B5B05D for ; Thu, 29 Sep 2022 17:50:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 0479ECE23EF for ; Fri, 30 Sep 2022 00:50:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16DC4C433D7; Fri, 30 Sep 2022 00:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664499020; bh=xeoSzNuqPluHkoak2Kt2ZcLQHxT/FauXizeyldfJSO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StZehtKYnEQuryaZA9/cyN6tSYSlHkb77b2RNpIF2Uf8mSJhFb7uhi1QrCfLXuD/L 60r9qcxcIBWdiKI20bC6pUFtd7lXIDSxDAC3pn7gsnx9LyZgmKneNQa/cLB1pZhMVu 4cvClIfxTKSTqXbm80nKyUiELgixA7VLI8h9X+TT5lBEaKY9thyMDfczGa9nYHtK5H Fh3bSnG+P9KFvN9y5E/C5e1wG/dpcmG6yWe2DNTi/mnO9jOgsnR0ecyeFNxfblVe93 uB0GO8ijxeIksbeQN+hgiFhvv+3zyu0dbMAc5QsF6vd9X6zdqr/flI2cADPA59R9b2 Aum3wenBsNa+w== From: Stephen Boyd To: Greg Kroah-Hartman Cc: keliu , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH 1/9] drivers: spmi: Directly use ida_alloc()/free() Date: Thu, 29 Sep 2022 17:50:10 -0700 Message-Id: <20220930005019.2663064-2-sboyd@kernel.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220930005019.2663064-1-sboyd@kernel.org> References: <20220930005019.2663064-1-sboyd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: keliu Use ida_alloc()/ida_free() instead of deprecated ida_simple_get()/ida_simple_remove() . Signed-off-by: keliu Link: https://lore.kernel.org/r/20220527071338.2359733-1-liuke94@huawei.com Signed-off-by: Stephen Boyd --- drivers/spmi/spmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index a456ce5141e1..55381592bb5a 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -35,7 +35,7 @@ static void spmi_ctrl_release(struct device *dev) { struct spmi_controller *ctrl = to_spmi_controller(dev); - ida_simple_remove(&ctrl_ida, ctrl->nr); + ida_free(&ctrl_ida, ctrl->nr); kfree(ctrl); } @@ -457,7 +457,7 @@ struct spmi_controller *spmi_controller_alloc(struct device *parent, ctrl->dev.of_node = parent->of_node; spmi_controller_set_drvdata(ctrl, &ctrl[1]); - id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL); + id = ida_alloc(&ctrl_ida, GFP_KERNEL); if (id < 0) { dev_err(parent, "unable to allocate SPMI controller identifier.\n"); -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git