From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C68B0C433E6 for ; Tue, 16 Feb 2021 17:39:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FB9064E0F for ; Tue, 16 Feb 2021 17:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbhBPRjN (ORCPT ); Tue, 16 Feb 2021 12:39:13 -0500 Received: from m42-2.mailgun.net ([69.72.42.2]:34141 "EHLO m42-2.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbhBPRjJ (ORCPT ); Tue, 16 Feb 2021 12:39:09 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1613497122; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=dHSm7vvwLQgIxBTKqi4LaoYnmAC8Gq0ayiqNbTZxQok=; b=SAuTfqNUiyNKDl2v5r9/A80KJnEHmG1ttjpK4+48OViGdqQUOMIAmpi/9iRA41eZqqJ+OHJJ wRw15WrRQ/TEFBbmJM2JmdvSKWF+MhzgwWL8tjY+CqXwGxHLHz2QhzmFiCog3GmTiwlswQIu TYzl2W9GnM+RnLLOCMD3I85+y70= X-Mailgun-Sending-Ip: 69.72.42.2 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 602c031906bddda9df22eec3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 16 Feb 2021 17:38:33 GMT Sender: asutoshd=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 92211C433CA; Tue, 16 Feb 2021 17:38:32 +0000 (UTC) Received: from stor-presley.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: asutoshd) by smtp.codeaurora.org (Postfix) with ESMTPSA id B38A5C433CA; Tue, 16 Feb 2021 17:38:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B38A5C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=asutoshd@codeaurora.org Date: Tue, 16 Feb 2021 09:38:29 -0800 From: Asutosh Das To: Bart Van Assche Cc: cang@codeaurora.org, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, stern@rowland.harvard.edu, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , Steven Rostedt , Ingo Molnar , Stanley Chu , Bean Huo , Jaegeuk Kim , Kiwoong Kim , Adrian Hunter , Satya Tangirala , open list Subject: Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun Message-ID: <20210216173829.GB35819@stor-presley.qualcomm.com> References: <29fcd3c1-72c7-1191-ec03-aea1b0c6b8c9@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <29fcd3c1-72c7-1191-ec03-aea1b0c6b8c9@acm.org> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12 2021 at 19:25 -0800, Bart Van Assche wrote: >On 2/11/21 11:18 AM, Asutosh Das wrote: >> +static inline bool is_rpmb_wlun(struct scsi_device *sdev) >> +{ >> + return (sdev->lun == ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN)); >> +} >> + >> +static inline bool is_device_wlun(struct scsi_device *sdev) >> +{ >> + return (sdev->lun == >> + ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_UFS_DEVICE_WLUN)); >> +} > >A minor comment: checkpatch should have reported that "return is not a >function" for the above code. > >> /** >> + * ufshcd_setup_links - associate link b/w device wlun and other luns >> + * @sdev: pointer to SCSI device >> + * @hba: pointer to ufs hba >> + * >> + * Returns void >> + */ > >Please leave out "Returns void". > >> +static int ufshcd_wl_suspend(struct device *dev) >> +{ >> + struct scsi_device *sdev = to_scsi_device(dev); >> + struct ufs_hba *hba; >> + int ret; >> + ktime_t start = ktime_get(); >> + >> + if (is_rpmb_wlun(sdev)) >> + return 0; >> + hba = shost_priv(sdev->host); >> + ret = __ufshcd_wl_suspend(hba, UFS_SYSTEM_PM); >> + if (ret) >> + dev_err(&sdev->sdev_gendev, "%s failed: %d\n", __func__, ret); >> + >> + trace_ufshcd_wl_suspend(dev_name(dev), ret, >> + ktime_to_us(ktime_sub(ktime_get(), start)), >> + hba->curr_dev_pwr_mode, hba->uic_link_state); >> + >> + return ret; >> + >> +} > >Please remove the blank line after the return statement. > >Otherwise this patch looks good to me. Hence: > >Reviewed-by: Bart Van Assche > Done. Thanks, -asd