Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2092509ybm; Sun, 31 May 2020 08:20:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylBEZsONgd5OfzZ71M3tlwXiSsv/48xHkXMepDrfcq4jt6aqUvOAg+CT1GMA/uGXnLA5XW X-Received: by 2002:a05:6402:17af:: with SMTP id j15mr16967469edy.67.1590938408167; Sun, 31 May 2020 08:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590938408; cv=none; d=google.com; s=arc-20160816; b=JAnhZXQAX7HxPj6KR7dlWEt+1ikZdAiColDiUxxfkqvE8+IWjsW8CuNS0e1XeTkVRG +oXy2wUJkvykTpxv8BHWiw8o0Dinvug6J1SfjQ4QBOzB8T9DntjrzbGp2MvQZtS5DIFV q2zg8J22yyBIdYRlx/gprBBVHoOwksdESjoes6RR4mxs6ZUGgHegoWpWQx3OhccYrRjk phPky3KfPl7+mU3vnaIogwe5+Wiz/FJyw48WGvO158vTi/eFlnJLobws81rb5E9ZLtm0 f19G0T2/HKmCLRhUM3sEgNG8qRE8KWBzWhCPjdqzebGCMzA2lmu3t5eMtMwzvdxlo8Bh 9v/w== 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=/iVfVdmH13jpJlRd9mjv8JKjfCbbit0p7BrDulSQioM=; b=C7WPFgyzxjW7pILCfI53vfDfbsqsFYkdH4Ig1ScG7Z+KAUfbIWx1ZuuJTrxHnvBRre xe5b/+gfk2XJ84lY7ZzBAxWiDnK7qpWGGSrRTq+6Dx+EBfn6P5yb5f9Zsf8FOu9VeRPG R9bagQEqhYhqghnmfSfsucVH16fhzhz5L9km0UW02WFeeZLIENVN7fa8t2KHldqpeN/w vFdjwaHuunFOWeGP1ZeMFRdSGbXkNblXezInMZjtvYAUUrs3uMr3lESG1mivaPu7STgf na5AQtLPWFZpXlIudrqbz0dFPAbJ/nLKmWruqDIjV6/0D/FtHp7W0LI9q8DBw7llwDuc GgIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="M/A4dMsd"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ks19si6392697ejb.409.2020.05.31.08.19.44; Sun, 31 May 2020 08:20:08 -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=@gmail.com header.s=20161025 header.b="M/A4dMsd"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728259AbgEaPIx (ORCPT + 99 others); Sun, 31 May 2020 11:08:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728207AbgEaPIr (ORCPT ); Sun, 31 May 2020 11:08:47 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEDB0C05BD43; Sun, 31 May 2020 08:08:46 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id a2so6766728ejb.10; Sun, 31 May 2020 08:08:46 -0700 (PDT) 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=/iVfVdmH13jpJlRd9mjv8JKjfCbbit0p7BrDulSQioM=; b=M/A4dMsdA7oB6kxYWqouN9nahc4JHTXW0VazjPUHZBSHVyQL+y+Vjmv5vxlctK3mJY dnlxbqLkCXmOwropflL3WBpglEKKxmo0PC6WAcTXPJaM/ulC0IGc9gRDQZMTtTLsSmhL y/wQI9uNmKwqXsCCMz4Nlzv3J4F3O7uTlVqU44mD+0s4NmwX5sjcS5nBaJkBN9a4vBrJ TRSaKPuFLcYfc55eCm/iJAKkqFB7UtxgJZuzd4OwuO5XcAPOtLvi9PLkclgTnm5JCNjJ OXaAanLwMgp7ncaEN4jGeiIEVAcf+VgrsqgGF8B9S9uWSxQhMrHbrFo4jMZGRhtiklVs +SlQ== 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=/iVfVdmH13jpJlRd9mjv8JKjfCbbit0p7BrDulSQioM=; b=ACXLWvj80TTpX6ZtCsV4nIxeyKAnPcEOlafghtmFMmXsFU3t1DMvufXq5ioesdS7KY vjtAzwuSwpV9RmnPjmQ9+ahxxyNkC0QdcysSF4S+R23Eq8evqn92y8u0Gb7aZKxWOofs ICStbp4tcar/QCcKe0Y4bbjoS26SwrSw4k8lGqNh6Tz4aGbXNyNfTbYp8mqALB5KW9YN MqHsQgG3hPyuoJgmbfM1aM/f2S41d7vNES/OlN36bjM3eUDpbUHX0L8QuWx4rR0lNzRi HchgTaE+HcmK20ApjImh2w1qnuL/+oXoCS2C7V27o+gzu8Nc1kxmERyGdZtdrrM59l9v IOBw== X-Gm-Message-State: AOAM530/MbBSbJZ4hqLVQdt0Kaq4vVHYU9CcZKA2elCfHELWTASDLjgE ugI7Bdz1cjB+UYOa18MwGNg= X-Received: by 2002:a17:906:264a:: with SMTP id i10mr2617046ejc.210.1590937725546; Sun, 31 May 2020 08:08:45 -0700 (PDT) Received: from localhost.localdomain (ip5f5bfcfd.dynamic.kabel-deutschland.de. [95.91.252.253]) by smtp.gmail.com with ESMTPSA id a62sm9564928edf.38.2020.05.31.08.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 08:08:45 -0700 (PDT) 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 v4 2/5] scsi: ufs: delete ufshcd_read_desc() Date: Sun, 31 May 2020 17:08:28 +0200 Message-Id: <20200531150831.9946-3-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200531150831.9946-1-huobean@gmail.com> References: <20200531150831.9946-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_desc(). Instead, let caller directly call ufshcd_read_desc_param(). Signed-off-by: Bean Huo Reviewed-by: Avri Altman Reviewed-by: Bart van Assche Reviewed-by: Stanley Chu --- drivers/scsi/ufs/ufshcd.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index f57acfbf9d60..f7e8bfefe3d4 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -3221,16 +3221,6 @@ int ufshcd_read_desc_param(struct ufs_hba *hba, return ret; } -static inline int ufshcd_read_desc(struct ufs_hba *hba, - enum desc_idn desc_id, - int desc_index, - void *buf, - u32 size) -{ - return ufshcd_read_desc_param(hba, desc_id, desc_index, 0, buf, size); -} - - /** * struct uc_string_id - unicode string * @@ -3278,9 +3268,8 @@ int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index, if (!uc_str) return -ENOMEM; - ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_STRING, - desc_index, uc_str, - QUERY_DESC_MAX_SIZE); + ret = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_STRING, desc_index, 0, + (u8 *)uc_str, QUERY_DESC_MAX_SIZE); if (ret < 0) { dev_err(hba->dev, "Reading String Desc failed after %d retries. err = %d\n", QUERY_REQ_RETRIES, ret); @@ -6684,8 +6673,8 @@ static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba) if (!desc_buf) return; - ret = ufshcd_read_desc(hba, QUERY_DESC_IDN_POWER, 0, - desc_buf, buff_len); + ret = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_POWER, 0, 0, + desc_buf, buff_len); if (ret) { dev_err(hba->dev, "%s: Failed reading power descriptor.len = %d ret = %d", @@ -6886,8 +6875,8 @@ static int ufs_get_device_desc(struct ufs_hba *hba) goto out; } - err = ufshcd_read_desc(hba, QUERY_DESC_IDN_DEVICE, 0, desc_buf, - hba->desc_size.dev_desc); + err = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_DEVICE, 0, 0, desc_buf, + hba->desc_size.dev_desc); if (err) { dev_err(hba->dev, "%s: Failed reading Device Desc. err = %d\n", __func__, err); @@ -7168,8 +7157,8 @@ static int ufshcd_device_geo_params_init(struct ufs_hba *hba) goto out; } - err = ufshcd_read_desc(hba, QUERY_DESC_IDN_GEOMETRY, 0, - desc_buf, buff_len); + err = ufshcd_read_desc_param(hba, QUERY_DESC_IDN_GEOMETRY, 0, 0, + desc_buf, buff_len); if (err) { dev_err(hba->dev, "%s: Failed reading Geometry Desc. err = %d\n", __func__, err); -- 2.17.1