Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1256060rwe; Thu, 25 Aug 2022 20:04:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7JZp8HA+AOBPXyMRqZRDuhfxjbhjg/Pt4vL0Yq438Bv8+S1b0dhzBcQ1lf8cya980FotOM X-Received: by 2002:a17:90b:3a87:b0:1fb:6182:def6 with SMTP id om7-20020a17090b3a8700b001fb6182def6mr2105872pjb.64.1661483041341; Thu, 25 Aug 2022 20:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661483041; cv=none; d=google.com; s=arc-20160816; b=ZGykJHiuWKT6EJ0Vfsn9wUpves4BakIJyx2kHklPRsNnsSd8OLJ/Z8inLMETMMBjIe AloxI1iyjgVpFzbFNhfWDkanKwmWuWFIQ4MoThGTR3rb6lVFVcBMFo7bnbTFHfr7ngRq sdu7/K4ARjKxT9Lc8XkAnE/tp8FGrdlUwscqrwLWkoZ5cGhwSGJcBOVpRKJbHInfm3NP kNp3C+FPJiQ7+JHq1afFRkRKI3qPlAa10cMtuxXBJcgcfdJliRaFS9ausQAWNsA0oCe/ eJGeeLc6hscAzjajQuolCSWAAKyOMR3796ZStZZOS6Y2B2cVL5fdk5Tqi/RyBzlDi63V 7opQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=9VC4i9+wdEuqqZOzz7W3dwAMZ7NPP/FGA6UvfFvG6aU=; b=wQD5uh2NcNq45HZVTebY5QII9lEInZWV+oRz/lIqZg/xDYi/z6ANF9O2hUIpisCMsU TI+ljIkI4FXn6+I7wLbQuXUI+ecccAqKA/9/esonTeXMsp0+Ru7uKXv/NRu1rWsvIAgF iCX55ZidAyE888AtEhAsEcF2vpxSTDSJyiL/c9zjsne6vvockrjJabbm7+mla/mpv6NM AsMbWSKLP+5f2pMLYSYOGa34cz9Vl/qqW+IrksQ1M1XqF6o7PX5HqB9suUVTFeLtm8nN iqLZrxVS8ovtlemLGrrAq8AwRVP7YiplxmFCvQ/+IxW627MkLxpRvuWXnUiHvz4JeUkd LQIg== ARC-Authentication-Results: i=1; mx.google.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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a170902bb8e00b0016d2959cf40si475584pls.617.2022.08.25.20.03.09; Thu, 25 Aug 2022 20:04:01 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244907AbiHZCnG (ORCPT + 99 others); Thu, 25 Aug 2022 22:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244906AbiHZCmZ (ORCPT ); Thu, 25 Aug 2022 22:42:25 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 167A9CD503 for ; Thu, 25 Aug 2022 19:42:20 -0700 (PDT) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MDPBv02WFzYcpM; Fri, 26 Aug 2022 10:37:59 +0800 (CST) Received: from huawei.com (10.175.112.208) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 26 Aug 2022 10:42:17 +0800 From: Yuan Can To: , , , CC: , , , Subject: [PATCH] iommu: use iommu_group_ref_get to hold group reference Date: Fri, 26 Aug 2022 02:40:24 +0000 Message-ID: <20220826024024.101553-1-yuancan@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Replace kobject_get with iommu_group_ref_get for better readability. Signed-off-by: Yuan Can --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 780fb7071577..8e7f30f7188c 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -903,7 +903,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev) goto err_free_name; } - kobject_get(group->devices_kobj); + iommu_group_ref_get(group); dev->iommu_group = group; -- 2.17.1