Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1173380rwd; Thu, 1 Jun 2023 11:26:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7XaYpf8eKyu/jSIfHSR3Zk8rrJyPnpsGfuEaM9Jhn4MrCpcmaPlKpKI80dV9+KGLq4ADH0 X-Received: by 2002:a17:90b:4f43:b0:250:af6d:bd7b with SMTP id pj3-20020a17090b4f4300b00250af6dbd7bmr2524480pjb.24.1685644014737; Thu, 01 Jun 2023 11:26:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685644014; cv=none; d=google.com; s=arc-20160816; b=GBS1xbCngqjzXj+4Xne3QaLa/tvGSs9WTdYNQP5QUbp9R6kGpB9ECBd+mM/6uHTQDY SqB+nyCAVQrKZKb+QUoz2OCNcWAOT1Jw1SiWX4TVF6PHCCInowUHfb/u45JaTOLezeki Fp/d7qetWAkwqUUdXwqB+PuQl3EA1uCiWIWfUp/GCrvtiSlB9QVwSJdCqw1MZ1nBQ3qM b8JDh+Ze7JnyZ6f2MQqCe5pw0qEgUgpWo7rLrOsfivhywewyfkYDTE1fS9oSopwYG04w ZvAfiG83CgESlSrbDtjlIBfo67duk8jptzzy7FqnP7terxcNVcGEd8Z/sshdTv/owPD+ 87Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=jTGP7Vsgjxm812AUKY1rMnWy3VKrpwWdhTSG3NhCRo0=; b=Ft/B/G0UufoDYK0PxBPUDR9Ur8ZNFt+HUrA4PkP0z2dEOLZKfj6TzQuyEiMJb4BtnK bJuFkZRA9eTiX+VuMdLVRYQM2JjYmHGhsvD9zk5V6aIRfwculVf8daj7d2KQaQNrNzXl v+QWTInplTeaOGcOrlQLSguK+czZn6qrhucMh30cxbih+PKDT2HMV3waA/93qt9H21eg nZ8duyb/PXwAFzUO/QvZAiZfv41V/bk+vtu/khiAYuYMR0OZXe0SB/JE6XbJ0bhUdiPy fIuYwvxwuWxGjPC/JMpbk44nBirj1zLInCWywlrZ6gUD8zVO0OMCGAgzOmMfHwCMU8Hz ISsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WII1+L0r; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi12-20020a17090b4b4c00b0023d22d0f0fdsi1592135pjb.19.2023.06.01.11.26.42; Thu, 01 Jun 2023 11:26:54 -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=@quicinc.com header.s=qcppdkim1 header.b=WII1+L0r; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbjFASNM (ORCPT + 99 others); Thu, 1 Jun 2023 14:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjFASNK (ORCPT ); Thu, 1 Jun 2023 14:13:10 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB3B123; Thu, 1 Jun 2023 11:13:09 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 351A6QH6009107; Thu, 1 Jun 2023 18:12:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=jTGP7Vsgjxm812AUKY1rMnWy3VKrpwWdhTSG3NhCRo0=; b=WII1+L0rmbqBCh1e/z8d0oQHKwX4cA4lTH+30kJdQJsJqNGK/+gRI9V+CaOLkp6pI8vc akeuB6T9P3ccBnbCqflAM60sioEzqtq0gA0kMuwadqgXpz3dDD6w849x6MfCrHzF5fM4 MBj+SzXfLmn9Fda+00hMctuUlQrGIl8514fG4BrVpnNOP7kDBTBBJsFsz6W/7FWVhfw7 9HE+aQOXav9r8C5JbWdyvF5wRwWw5zcI7/OY/SK+L6VW9lHIUkGNKbTlySvzgkonO45l TDi1LekVlvwONVJJ4SdASgbvjVaIhx3Xp4EnSqzf5qH7SXmOtZ0RloTFZUk13pwjV5KV Rw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qxs9gs9e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Jun 2023 18:12:59 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 351ICwgH001124 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Jun 2023 18:12:58 GMT Received: from [192.168.143.77] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 1 Jun 2023 11:12:57 -0700 Message-ID: Date: Thu, 1 Jun 2023 11:12:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v1] ufs: core: Remove the nolock version of ufshcd_mcq_poll_cqe() Content-Language: en-US To: Stanley Chu , , , , , , , References: <20230601090202.27035-1-stanley.chu@mediatek.com> From: "Bao D. Nguyen" In-Reply-To: <20230601090202.27035-1-stanley.chu@mediatek.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 6jBla3t2X-I2NVpN2T5O7i2jh1BsVb7J X-Proofpoint-GUID: 6jBla3t2X-I2NVpN2T5O7i2jh1BsVb7J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-01_08,2023-05-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 spamscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306010157 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 6/1/2023 2:02 AM, Stanley Chu wrote: > Since ufshcd_mcq_poll_cqe_nolock() is no longer used by any users, > it should be removed. > > Signed-off-by: Stanley Chu > --- > drivers/ufs/core/ufs-mcq.c | 17 ++++------------- > 1 file changed, 4 insertions(+), 13 deletions(-) > > diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c > index 920eb954f594..785fc9762cad 100644 > --- a/drivers/ufs/core/ufs-mcq.c > +++ b/drivers/ufs/core/ufs-mcq.c > @@ -307,11 +307,13 @@ void ufshcd_mcq_compl_all_cqes_lock(struct ufs_hba *hba, > spin_unlock_irqrestore(&hwq->cq_lock, flags); > } > > -static unsigned long ufshcd_mcq_poll_cqe_nolock(struct ufs_hba *hba, > - struct ufs_hw_queue *hwq) > +unsigned long ufshcd_mcq_poll_cqe_lock(struct ufs_hba *hba, > + struct ufs_hw_queue *hwq) > { > unsigned long completed_reqs = 0; > + unsigned long flags; > > + spin_lock_irqsave(&hwq->cq_lock, flags); > ufshcd_mcq_update_cq_tail_slot(hwq); > while (!ufshcd_mcq_is_cq_empty(hwq)) { > ufshcd_mcq_process_cqe(hba, hwq); > @@ -321,17 +323,6 @@ static unsigned long ufshcd_mcq_poll_cqe_nolock(struct ufs_hba *hba, > > if (completed_reqs) > ufshcd_mcq_update_cq_head(hwq); > - > - return completed_reqs; > -} > - > -unsigned long ufshcd_mcq_poll_cqe_lock(struct ufs_hba *hba, > - struct ufs_hw_queue *hwq) > -{ > - unsigned long completed_reqs, flags; > - > - spin_lock_irqsave(&hwq->cq_lock, flags); > - completed_reqs = ufshcd_mcq_poll_cqe_nolock(hba, hwq); > spin_unlock_irqrestore(&hwq->cq_lock, flags); > > return completed_reqs; Hi Stanley, Other than the commit message that Bart mentioned, this patch looks good. Reviewed-by: Bao D. Nguyen