Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp996401ybl; Sat, 18 Jan 2020 16:15:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyn4zjrBOW1QF0Ae9PLxJ3YHFZWw4FMZFLbIHjcJanhJ2ks/SZFQANGawetaOm2Fuxq+OmL X-Received: by 2002:aca:d4ca:: with SMTP id l193mr8560856oig.133.1579392928762; Sat, 18 Jan 2020 16:15:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579392928; cv=none; d=google.com; s=arc-20160816; b=ktieMTtuptkdJHyc6S8gtiBG+RL9U3tE5tLzWp4WaMohiJXjt5AvJeZpKZz1up7Hil bCHB8Zhu1c6IwupEVPWlQxP0N834DW6O9+963JE7Po2f+iVRya0p8JQeVLKe5kpagruX O+o7gDjG6UnloY5tRhcOYwPfVlB3UmKa/E0UHYnImKPS3EThtMNoNBQAUP3KKe1bmSOE mNsVwn1XhE2bQN6JVUL/uP8s4J1OKfrVRo1gwfv+dh5imzfxZgsGz7SJaoOIqiuxuaJx NkQT+dlJNkA4fW4bpp+GfPgseP6Ct2tjjkSI58bGGJcf90FGNWLsYi061uPiq3EBGIvS maqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=KQ+N4tgHIW2CTZZWICt6xNlWKRm3ezXQOgqUFuWPieE=; b=KHC8dFxCxIC+yJN1mAGh2+xCQGhTlz+wxOxEb/A9fOdrYRjwjPIGBbM+lS4h30kiXS loATlBWfPSiboq13Ub4pccXhtPMFPPB7ymfO0MqNQSbcskUmQC4thO8v0r+Au/JY4yt6 TgEdL4UI1tATjT/J+nWsgdnjlWE9H3o6k42UD64cLOsTNgIvkSbMKu/VDW5T4eUleRwV mXciXPxf9bI389KpneFLADbhRbJ8Q3znILqIWdId8bl4lf7fDO7tfIIODfWnhGZGwO77 s1H3W4mlHxYAKcGxwfQ+NQX0DGNTI0Yr1G3LAuZ5kMN3YzLKe+U0QS9z6oSAIeW3C+O+ iCzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uRX+7+jO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si16392130oig.255.2020.01.18.16.15.17; Sat, 18 Jan 2020 16:15:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uRX+7+jO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728946AbgASAOO (ORCPT + 99 others); Sat, 18 Jan 2020 19:14:14 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52230 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbgASAOM (ORCPT ); Sat, 18 Jan 2020 19:14:12 -0500 Received: by mail-wm1-f65.google.com with SMTP id p9so10913973wmc.2; Sat, 18 Jan 2020 16:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KQ+N4tgHIW2CTZZWICt6xNlWKRm3ezXQOgqUFuWPieE=; b=uRX+7+jO4sXPlkwbL6xZSMH/7riWE2GcLPUQNsega5krOcmjImsTlWLmdfKgm/9rWy BdXalv3nvsMsqM+xrH1il+d0v/l40kfUj5jHBd2L+slrW8avXfdN5n0qbWnLZYJv+6gz cUcloJFvBcVws8HIpGbL/5Y8fQ6YGdki/2jNASvbBu4DKW77/p5EnPuYwQWMe7LxGTwt PgOgJWa/tdbRiFMVOcVpxIqS91ZkOQWnlj6a1WzHBdgdGne+RPF8SFDBPbq4Rvrl7dRT 71COKy/Wrh/QfCBGU8FtOzofSYBkdADftIlb7wxP55CDSWkZ+lel3a3nZvWtVfmf/vtW jhLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KQ+N4tgHIW2CTZZWICt6xNlWKRm3ezXQOgqUFuWPieE=; b=FZ/AEukMzxwvhXi2daFGROx1Cwl3s0VoIGg5hgcW/9gwlvz8Oz6Prgh3zhy2GzHMCA 4mLJKiMsgOw4gk98kR3BnpkCtahIp7ubf71acUyUEWId2TAKFYD+6CRl/ASFaPSdJyW0 iRHzmf0PDg+v5DoThNxw8vczJEazbElWaEs0p+77rpxrbaa3HWV05ClhbRYRRAWMmC+q 17lgVWAkb/aN3zIeaVRpVMqv6YvkbTNuq0DVSXwBr29XKGhK2lrx/buf7fH/mbjpX9Nk 9lokKp0H8qFc+tYFEEkVJ2GVb4ICe+uOkzQKG1zqXmyPltU5vX9xRr7usTXj5W9gPSca CTxA== X-Gm-Message-State: APjAAAV7qXIdlbinPZXg9SuPqtG4skO5Nv4yyWvCm4Zx3BpXOOGKXGiB XdbMVnj8ZILx8GZ1BNXPW+c= X-Received: by 2002:a05:600c:2406:: with SMTP id 6mr11812175wmp.30.1579392850818; Sat, 18 Jan 2020 16:14:10 -0800 (PST) Received: from localhost.localdomain (ip5f5bee3c.dynamic.kabel-deutschland.de. [95.91.238.60]) by smtp.gmail.com with ESMTPSA id i8sm42177432wro.47.2020.01.18.16.14.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 16:14:10 -0800 (PST) From: Bean Huo To: 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, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/8] scsi: ufs: Inline two functions into their callers Date: Sun, 19 Jan 2020 01:13:24 +0100 Message-Id: <20200119001327.29155-6-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200119001327.29155-1-huobean@gmail.com> References: <20200119001327.29155-1-huobean@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo Delete ufshcd_read_power_desc() and ufshcd_read_device_desc(), directly inline ufshcd_read_desc() into its callers. Signed-off-by: Bean Huo --- drivers/scsi/ufs/ufshcd.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 925b31dc3110..5f3b0ad5135a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3146,17 +3146,6 @@ static inline int ufshcd_read_desc(struct ufs_hba *hba, return ufshcd_read_desc_param(hba, desc_id, desc_index, 0, buf, size); } -static inline int ufshcd_read_power_desc(struct ufs_hba *hba, - u8 *buf, - u32 size) -{ - return ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0, buf, size); -} - -static int ufshcd_read_device_desc(struct ufs_hba *hba, u8 *buf, u32 size) -{ - return ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, buf, size); -} /** * struct uc_string_id - unicode string @@ -6493,7 +6482,8 @@ static void ufshcd_init_icc_levels(struct ufs_hba *hba) if (!desc_buf) return; - ret = ufshcd_read_power_desc(hba, desc_buf, buff_len); + ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0, + desc_buf, buff_len); if (ret) { dev_err(hba->dev, "%s: Failed reading power descriptor.len = %d ret = %d", @@ -6599,7 +6589,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba) goto out; } - err = ufshcd_read_device_desc(hba, desc_buf, hba->desc_size.dev_desc); + err = ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, desc_buf, + hba->desc_size.dev_desc); if (err) { dev_err(hba->dev, "%s: Failed reading Device Desc. err = %d\n", __func__, err); -- 2.17.1