Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3234954pxv; Sun, 27 Jun 2021 23:22:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypWakXRGOKL6E1jU37o7JAOaFiBj4DuG7w0lMGYQJcb7+kQnGkALR56hNDKom+QZlrhsVg X-Received: by 2002:a02:c6d9:: with SMTP id r25mr21403377jan.137.1624861322703; Sun, 27 Jun 2021 23:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624861322; cv=none; d=google.com; s=arc-20160816; b=gXSsywqO5cfs/7KVaT0r953TjpIYtF+pdwg/bD0PilPIvCqW1JCnAN3c0SwoiZVOiS snqWE/z0nHeTwzXCC3L9j7RA3tndOc9JOAKce57B3qWqI48Zj5lOl7n8YULaaljw7Jvz /YyIuRp81VcvdUXbmJr8fjrX5kibVghYIN9/9LpY2L+oG5AvoydmpTnjQwLvrbp/cnQA nYosgE+DFLrJP3ya+m1o95SGnjcgWKpyFlp2NMBFpHI2LX9FgJy4lK9j7H6LKj9AU6+2 4vSsGqYGUpXf7SygK9OCFhyinxL1uF2CarURe2QSOqxPBwg5xCXxi0IMa3afjZLUa8Mx G1Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding:date :message-id:to:from:sender:reply-to:subject:mime-version :dkim-signature:dkim-filter; bh=ZBOaOnM5XEPFGcC55XN4dpE+X+wQQkFTm3DwUDgOvdE=; b=XbfZJx7+Nwbu09YkvtE+rARDBjJ7vx9jJsYmnWtbm/Odt1k4tBkUe7jSIsrebgwe4F SQ85F/EWSgspvQKbp1rgb2S+FbgeC1dQ8WjhqtwXkuWLYxtuXYG9KowA9SO14LX2uWLu Okb4+OOJn4R4Ykj3O2VsTXAImMPL+6j/j2K8dVA49jG8ostDxH0jbOUu1ugFf7YM3oXW xUDiF3J7gg/Tc6L19yvwnCVkgZpuD+E1Yc+0hn+qkUVfvqQfUypsTc3BlgdwSAb3F7kQ T+rgS5Z0Fy6qC8NKflAzH5LXL7udeGisfSkjXc9oo6oK8SFeqQHdwZpRKdpji8VqlRJw 0dhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MpmJLGRb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si17044551jar.85.2021.06.27.23.21.51; Sun, 27 Jun 2021 23:22:02 -0700 (PDT) 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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MpmJLGRb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232250AbhF1GCa (ORCPT + 99 others); Mon, 28 Jun 2021 02:02:30 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:14778 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232191AbhF1GC3 (ORCPT ); Mon, 28 Jun 2021 02:02:29 -0400 Received: from epcas3p3.samsung.com (unknown [182.195.41.21]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210628060003epoutp03c877fd6f8ebd38604bb40c1aec5315a8~MqZBjW65u0252602526epoutp03w for ; Mon, 28 Jun 2021 06:00:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210628060003epoutp03c877fd6f8ebd38604bb40c1aec5315a8~MqZBjW65u0252602526epoutp03w DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1624860003; bh=ZBOaOnM5XEPFGcC55XN4dpE+X+wQQkFTm3DwUDgOvdE=; h=Subject:Reply-To:From:To:Date:References:From; b=MpmJLGRbgtwsqQ4a9ugeeVwbsgYImWzKsP0rdvFV6zJIeRumR8hCvQ6F31jKRVRZK L6n3rmb2OS2aLf2mIT+WjwjUC7aV7XSrVdQA/3gcaCKnLJ5P4IgG9fJHAwy06xRkf4 86fAzJSyIulcel4kSSpynAx9iJdr9J1DvsIkYzcU= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas3p2.samsung.com (KnoxPortal) with ESMTP id 20210628060001epcas3p2c38c4026db1fbb6c43a167d8095aab09~MqZAVAEGW1026810268epcas3p21; Mon, 28 Jun 2021 06:00:01 +0000 (GMT) Received: from epcpadp3 (unknown [182.195.40.17]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4GCxlj5qcBz4x9QP; Mon, 28 Jun 2021 06:00:01 +0000 (GMT) Mime-Version: 1.0 Subject: [PATCH v2] scsi: ufs: Refactor ufshcd_is_intr_aggr_allowed() Reply-To: keosung.park@samsung.com Sender: Keoseong Park From: Keoseong Park To: ALIM AKHTAR , "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "beanhuo@micron.com" , "adrian.hunter@intel.com" , Kiwoong Kim , "satyat@google.com" , "asutoshd@codeaurora.org" , "bvanassche@acm.org" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jpinto@synopsys.com" , "joe@perches.com" X-Priority: 3 X-Content-Kind-Code: NORMAL X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <1891546521.01624860001810.JavaMail.epsvc@epcpadp3> Date: Mon, 28 Jun 2021 14:58:01 +0900 X-CMS-MailID: 20210628055801epcms2p449fdffa1a6c801497d7e65bae2896b79 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20210628055801epcms2p449fdffa1a6c801497d7e65bae2896b79 References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify if else statement to return statement, and remove code related to CONFIG_SCSI_UFS_DWC that is not in use. v1 -> v2 Remove code related to CONFIG_SCSI_UFS_DWC that is not in use. Cc: Joao Pinto Signed-off-by: Keoseong Park --- drivers/scsi/ufs/ufshcd.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index c98d540ac044..c9faca237290 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -893,16 +893,8 @@ static inline bool ufshcd_is_rpm_autosuspend_allowed(struct ufs_hba *hba) static inline bool ufshcd_is_intr_aggr_allowed(struct ufs_hba *hba) { -/* DWC UFS Core has the Interrupt aggregation feature but is not detectable*/ -#ifndef CONFIG_SCSI_UFS_DWC - if ((hba->caps & UFSHCD_CAP_INTR_AGGR) && - !(hba->quirks & UFSHCD_QUIRK_BROKEN_INTR_AGGR)) - return true; - else - return false; -#else -return true; -#endif + return (hba->caps & UFSHCD_CAP_INTR_AGGR) && + !(hba->quirks & UFSHCD_QUIRK_BROKEN_INTR_AGGR); } static inline bool ufshcd_can_aggressive_pc(struct ufs_hba *hba) -- 2.17.1