Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2237069rdb; Wed, 21 Feb 2024 01:00:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWenvEE9MGzCtbTMnfSDfkaoq8VJwXGKCaia3JLLlb7L5a2WYrWuMjtXt8S7pHM6yxX1Ydf4fwS0sc4XkHxQGZzala6sb3ub0VuwpFDfw== X-Google-Smtp-Source: AGHT+IGvRaDm2/UWEIoAz1BiOIcLkqjrxjvM587HL+ZlA9JVS4AGBwixXi5nZh9s5j5INwde9COF X-Received: by 2002:a05:6808:1207:b0:3c1:63d0:5da5 with SMTP id a7-20020a056808120700b003c163d05da5mr6050297oil.52.1708506041325; Wed, 21 Feb 2024 01:00:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708506041; cv=pass; d=google.com; s=arc-20160816; b=gvOcD9dfg9tH1wAWkezU46BmE+3ToM6BDfsjpIX1H66Hsfdi2pMX1f0FILFk7KMr76 282UOWLh6MHg3vGDokvTPiMwcLFvLkzxzeHIMhbjiIMVLUIa97cWuilBTW73o9N3dmOI hgXhujXM+hAs3BdRkAZvT2tuD2F6TC9n6xf5eeTo5YVmKhZGAY/r0uAcnQvdvXeqcqdv ggSKZzUP07Spakf59uJiw4rYKjluSawCHBPr5EULWaqRYV0hOH3FJjWjZBs5+tWDSK5E sJe1TUhOLuLymU62h+59FX8HR18ttREBglQEgnE2FOlwAZ/AIEJwpAT079lgtRCQyahc RJMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=awoADLD19MHBaIIeOK/stqwnXMzC5vQcvCVIc5Cztrg=; fh=2P730UAIZMlxOMAjCvSmhjnnYdMNOTkMrSxhk21Sjp0=; b=mhpeNgd3anSr/QtSpLgtK8zb8u9VEML+B19K1RVTvbBkZKA4oVQoW84LDQkYNcmVIu 89jotNWA59dfNSAGvgYR0TgCcdwpqSi9hBsYGPytmb3qbpddMl6sv4H9tGc5OebPPOo/ vmCou+XlnCkJYJVBykQwAeR6hZuc6U7I6ocf0t9HOParJ2M8QjzLHv2T7OU2SgHkO49O 4J/1cXQPLa5ozs/MaKzCXIZDHroM6JjwVYPcegrufBirxO+zAHHnUpIavGpEm0DfDNi5 3Sw0swtlkJYSrZuCMXMMjtSkBg0X0kdIQihPhk2w3AY4aTdL2Sa7q1ed8LfSrLHjTe1R tNCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-74337-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74337-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b17-20020a639311000000b0058986c61bb6si7847001pge.706.2024.02.21.01.00.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:00:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74337-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-74337-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74337-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9BF53286597 for ; Wed, 21 Feb 2024 09:00:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B70813D0D2; Wed, 21 Feb 2024 08:59:49 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA53D3D0C6; Wed, 21 Feb 2024 08:59:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708505989; cv=none; b=l/ogs95GKLgVI8JmVzyQLbsbFR1NpJ0ScrGEzmv7MRaN+dv1JUg13me3VJDufRHIZaN+KRSjD3gMsR8JNz3p7TxtRDQievM0xx1Df5eZh2TALtLG9OJVQpgFPbp6bsAVbY3+2oi9KX77aDZ1C1+ur42fDwaP64kwGcW+wzlQ36U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708505989; c=relaxed/simple; bh=bpSDrbg1x+ADfRkSuv6gR85kGx7h4cdgDMDUKWHwcaY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ldD1mXjYaaD+CX6xs+YnHkDECo/OlXc9TdKBeBolQnNU8JS2E574ODTpwpbkM4pdTCwZo4KYr+1woKqEC/wJLIXmf96bxQqWwsvsMG1KjeFymzJicFhymA5tfBAaz+GjYh2joQr/gfthjbTs+j4amYqOKa61XzWFj6X1dfi1hGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 229ba8d755af451e99cec9e56b9074ff-20240221 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:fd401693-8bb0-4312-b356-3816213a343c,IP:10, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:-5 X-CID-INFO: VERSION:1.1.35,REQID:fd401693-8bb0-4312-b356-3816213a343c,IP:10,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:5d391d7,CLOUDID:4c458b8f-e2c0-40b0-a8fe-7c7e47299109,B ulkID:240221165940WOC6CRID,BulkQuantity:0,Recheck:0,SF:66|24|17|19|44|102, TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_FSI,TF_CID_SPAM_SNR,TF_CID_SPAM_FAS X-UUID: 229ba8d755af451e99cec9e56b9074ff-20240221 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 584099357; Wed, 21 Feb 2024 16:59:40 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 01462E000EBC; Wed, 21 Feb 2024 16:59:40 +0800 (CST) X-ns-mid: postfix-65D5BB7B-805504581 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id D5B81E000EBC; Wed, 21 Feb 2024 16:59:38 +0800 (CST) From: Kunwu Chan To: manivannan.sadhasivam@linaro.org Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] bus: mhi: ep: Simplify the allocation of slab caches in mhi_ep_register_controller Date: Wed, 21 Feb 2024 16:59:37 +0800 Message-Id: <20240221085937.167200-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/bus/mhi/ep/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c index 65fc1d738bec..7b61d384b2b6 100644 --- a/drivers/bus/mhi/ep/main.c +++ b/drivers/bus/mhi/ep/main.c @@ -1493,9 +1493,7 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl = *mhi_cntrl, goto err_destroy_ev_ring_el_cache; } =20 - mhi_cntrl->ring_item_cache =3D kmem_cache_create("mhi_ep_ring_item", - sizeof(struct mhi_ep_ring_item), 0, - 0, NULL); + mhi_cntrl->ring_item_cache =3D KMEM_CACHE(mhi_ep_ring_item, 0); if (!mhi_cntrl->ev_ring_el_cache) { ret =3D -ENOMEM; goto err_destroy_tre_buf_cache; --=20 2.39.2