Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1064208ybl; Sat, 18 Jan 2020 17:55:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwCLhVQcItkn/Utssy6qoTh8Ty4xM2XEipDFm95EJyuF2NGq3OHtgPEZ/MBv5KmBpjXUARb X-Received: by 2002:aca:4306:: with SMTP id q6mr8767672oia.54.1579398939446; Sat, 18 Jan 2020 17:55:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579398939; cv=none; d=google.com; s=arc-20160816; b=w2u8K+jnkq+qiwrLmEzhkNxa3TSGNuBH1r2hHeVRB0FHtkU+NwlZRimTG/QQW8ah/2 Wfi4XGnyZXCtVNb4mnfyJHp/BlhSFzJEx946W0ej7CEQEbyWYvn8fjigRewBl11lhja+ ADIcL6L2LkYI0CYLEb3VQmrPX0kmZKMVRivTCZJehmNuqkuZXAL/pcbKD3b6K8E7dPd9 oAG47jsU9aTFc9/poaO7dOv/T6aduilxkE6TeSQqAR9IMfHmwS2qqk992wuPLnmwMMGc LOsdAAS3v/IhWunWwtJFTQWS3GUGa2bhY8y+pTqcdjq8vD+8vGIBrmQYL33kMuHP39TY veDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TTozb2zePNKT8aZKd3kD9UXbrPwY+ZsZD84I1bqkZt0=; b=IAzP9DCuVx0YOOX6uCqoj+8IO3v50w6AdU9sLZHJeeNb6xZYw9k+gSdAX/RoSdEr8F qZSbidStJulUEALJgeaA/b6zc7EiNv6XrSgxMPqPGnlqHFwIXs2pjHsfc3dyjC6tVlEu Gd1i+kUvQgjbfeliu77wMRbtFCZ9kxK00+O+JjRVeF9fNIbS6ZfW67iTr73It376GkhH Fvk87J7Tf79YEGuJ4jrgg+wc6o39cEI79HuJ8plq2sKVgDk91DCDTbchwR/hG6NQObtC mrgMOGCzRt95+2t+ydoX3SF0imM73pO2KJlDd90zb0qVRFS681fVFPBcU9hDZaHtQXyt YS1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NWjlMtnN; 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 q72si16819321oic.18.2020.01.18.17.55.27; Sat, 18 Jan 2020 17:55:39 -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=NWjlMtnN; 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 S1727178AbgASBye (ORCPT + 99 others); Sat, 18 Jan 2020 20:54:34 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:36218 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbgASBye (ORCPT ); Sat, 18 Jan 2020 20:54:34 -0500 Received: by mail-ua1-f67.google.com with SMTP id y3so10326232uae.3; Sat, 18 Jan 2020 17:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TTozb2zePNKT8aZKd3kD9UXbrPwY+ZsZD84I1bqkZt0=; b=NWjlMtnN0AvKVjD4KMk6naHTEcgvwwlzSmdo0s/PGVBqd/r3IAdCXCCzfyMEtE4TKm xoqA7l86kOmxSrQeE1AGIXPdl3BIk7TwiFm2pg7ndj4A8I/8L0qUo1MIHlKorK2RCnOq O5PEiXjJAvvyByPPSzd/zgBdzhrsR0wkvSemlwP/X3KCL/wXjRlgsBCSUaZ/qU8YSdE+ n3kirr6onWrpAk6PDiBAK2ElQtHG3RIl1YieE+DGVWsesubKuk6dhIesEDf3sBDP1d2P 1A3ftOjMAi/ehPlfVlxOSqBMO1yJ1NFeQ9nwtJogAiSy2KBnasNEtMgWjLlsr5NgrXDz gwmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TTozb2zePNKT8aZKd3kD9UXbrPwY+ZsZD84I1bqkZt0=; b=F1J/xnjmsghuRLlEwg8ml0tJqre0V4fMidSf3OXHaUSmnEBV7tMZnruIBd5MJ8EQtk 9EIVvibJDzLLto+XOKbudx0BgE5Oq+4ikap3Sxd4epY0Ijg6F5q32udwnbjl6/RFJ8JX gMSQ2F/Z4jHuCWEMGumpIU44GsEKNr+/8z0v7PZSUEtX/TCWHK4DPd6QWvVxHtjk1Rt8 MpBuNQJOifU4e1YpOKKE9vjbDJl9us9WvKRZWeHYkcgb7uLqSOaflega+aCGUIq58BKT 6ODfUMnNMfg4JXL6Axj5r7KzOLz1KOsD25MVXlgPFHm7hxrycgmAKEPPM07nAMdLKRTn dWIg== X-Gm-Message-State: APjAAAU+eskva6JKCibJZ3TQuV6lvIqst9lTBRgypPVBpNhGWgrUJtei KFXhQReuLrkuztBoi00kDh0/QVrxmQ9eM4wWyFU= X-Received: by 2002:ab0:30c2:: with SMTP id c2mr28532356uam.8.1579398873157; Sat, 18 Jan 2020 17:54:33 -0800 (PST) MIME-Version: 1.0 References: <20200119001327.29155-1-huobean@gmail.com> <20200119001327.29155-6-huobean@gmail.com> In-Reply-To: <20200119001327.29155-6-huobean@gmail.com> From: Alim Akhtar Date: Sun, 19 Jan 2020 07:23:57 +0530 Message-ID: Subject: Re: [PATCH v3 5/8] scsi: ufs: Inline two functions into their callers To: Bean Huo Cc: Alim Akhtar , Avri Altman , asutoshd@codeaurora.org, "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , "Bean Huo (beanhuo)" , Bart Van Assche , Tomas Winkler , Can Guo , linux-scsi@vger.kernel.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 19, 2020 at 5:45 AM Bean Huo wrote: > > 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 > --- Reviewed-by: Alim Akhtar > 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 > -- Regards, Alim