Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1894477pxu; Sun, 6 Dec 2020 10:56:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxTjIwonkJvyhCYKkU+mLKvPiJAZZYJMab+EBvhmUp7eMypYt/+Uo8Ugl4Wy39Eax4VROx X-Received: by 2002:a17:906:b306:: with SMTP id n6mr15645407ejz.473.1607280971508; Sun, 06 Dec 2020 10:56:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607280971; cv=none; d=google.com; s=arc-20160816; b=it98d5apm9nw4EKogUvgWKeRT68ZMzOrv6U5pCLikK+1FdcF6wdxAYDPe+NREXhFZl BgZ16VlKB3uEpu7u4Ihfr90MBTSiTLpL7oG1yvnxAu1HsN1t+SfpP1QbFQdY3R16/fh8 l8/iMTDwrOympFufVaC7/F+XYH7wD135jPbYD2LY8ivfZ2onlK6kN584i7Ho+cHLfPTZ 9vK7MnIRVo5nYSeXk+iTG21D1XYOLfRZYG/uE3L/HK1ou1EqIXsk2M18hNURLKqVRRUp /cokvQ7+Zxqs4nLqcMcgyz+9ciw+O6MyTDNbd/Flb/epjVRrmqUyzBuKPmTJD6uVPy5c WjtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=kGZCtvl0XaNikvAbCuKKM1R8Hnkj5Xl9CBbjMiN+opw=; b=VvPgqyWB8ICSB8w2j8yjc3jpJfKlJqgv4hvJJrNqHRZKeLupO1oYCxYtNmSPAJ+u8h 6yctyo3WQSSV6Vjt4kqxxkBXAl0mYh6cLQTbtGqIm/kJqvZhKV24WEzpwmsTcl3l+YiH Hqsmn7979yXRg6X3P3Gih0Xuf81+Be1W/23LEmf6Q2KXyV7il4JG6/46Ka6ZekoKsJBw ZrHlk1AeQFLr0jRn/KMZxhSroPSFkm+qAccYA6wFtDRJuGRGng1hyhfd/FnHDm/C4Ac2 EDmWLxlzsJedZL0f4asqWrpVOuoPxa4UurlTtBCAdTAh/klxo+/sL16zUVjGBO+/Qt/r 0lEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si5634819ejt.421.2020.12.06.10.55.49; Sun, 06 Dec 2020 10:56:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727864AbgLFSxS (ORCPT + 99 others); Sun, 6 Dec 2020 13:53:18 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:40793 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727135AbgLFSxS (ORCPT ); Sun, 6 Dec 2020 13:53:18 -0500 Received: by mail-pj1-f67.google.com with SMTP id m5so6154430pjv.5; Sun, 06 Dec 2020 10:53:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kGZCtvl0XaNikvAbCuKKM1R8Hnkj5Xl9CBbjMiN+opw=; b=Ilhs9IKYS/hiUOpYbxEY0kZmfwK4pgUGmeYUyokoDjBzuj71uR6ATafWf0FGtaWH6J vTxgBmZ4ogtXedmGhTK1NRGcPzfLGD+F0GW5fbx1QtCoaEAQ+47x+QWNoj6VgZm+sv4z jmZsCwclyLMnZeyH/YXFUa9B5MUGiwSIEkeYCxviWFXGqvvWwUBu2B6OGt8XIRRUatys CFlcoEn7uPwwUllRQoNVnYDMoeLyhrenaWLZTNpmDGQ9a2uAOIgC5YXv4zgzvWcdsnWT c4016GWW5Pr2/zcUPqlhG0N/zYx0Wo1TYy74fqLlrOBmPq1k7hMlZ9NDduBYkSzyfq+c yp4g== X-Gm-Message-State: AOAM533/0Ur4vm1Io53ljXdOHfG3Kkr4wS2P8Pj38RJX1QJWi4z2wDoZ yJ/gJL0ns7at/cZEuzijb+Y= X-Received: by 2002:a17:90b:3594:: with SMTP id mm20mr13389370pjb.121.1607280757514; Sun, 06 Dec 2020 10:52:37 -0800 (PST) Received: from [192.168.3.217] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id w70sm2320999pfd.65.2020.12.06.10.52.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Dec 2020 10:52:36 -0800 (PST) Subject: Re: [PATCH v1 2/3] scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace To: Bean Huo , alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org References: <20201206164226.6595-1-huobean@gmail.com> <20201206164226.6595-3-huobean@gmail.com> From: Bart Van Assche Message-ID: <1508c318-8cbe-0abc-48f0-463a96a53477@acm.org> Date: Sun, 6 Dec 2020 10:52:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201206164226.6595-3-huobean@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/6/20 8:42 AM, Bean Huo wrote: > From: Bean Huo > > Distinguish between TM request UPIU and response UPIU in TM UPIU trace, > for the TM response, let TM UPIU trace print its TM response UPIU. > > Signed-off-by: Bean Huo > --- > drivers/scsi/ufs/ufshcd.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index e10de94adb3f..29d7240a61bf 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -338,8 +338,12 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag, > int off = (int)tag - hba->nutrs; > struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off]; > > - trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->req_header, > - &descp->input_param1); > + if (!strcmp("tm_send", str)) > + trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->req_header, > + &descp->input_param1); > + else > + trace_ufshcd_upiu(dev_name(hba->dev), str, &descp->rsp_header, > + &descp->output_param1); > } Same comment here: please change the type of the 'str' argument in an enum such that the strcmp() call can be changed into an integer comparison. Thanks, Bart.