Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1292357imu; Thu, 13 Dec 2018 12:32:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/XoFLcUwDHtsoeUeA2BWFFw+yWRZ9weN1CDLYnca5VFXV2KaxiZtM7sJu1OaPIoxP0CBPcw X-Received: by 2002:a17:902:b592:: with SMTP id a18mr233465pls.293.1544733156735; Thu, 13 Dec 2018 12:32:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544733156; cv=none; d=google.com; s=arc-20160816; b=Ch3O+PYpFKyIOVvZIVJGHsn8DjyesOc65jptzc/imHOD06F0prtcR2aJuM6xez18Dx e2/CypCWlXZYDWSUByl2nWfHmzxW/wld0j1SbofZh/Jnj1I8AXZovpppSD/frPqTtrSr ty6e4c7FLBcjrr/DkC0pNSnQsRz1ovw6ug3Fbu9SYG9Rd+7D+0K9J2P44qCjFRsV6bvQ tlp43o/LmUjCyvfYC3azYz5JLSFMEKrx7ZMKuCL556qQ1tp/E5AyLiuuK69uYTfv5gg7 mwGNPd/7rxJe4qX0gtm7yI+nWr3PqRMqZ+pu8b0wuUCmTH/IlWOTowBVBa5FmpGnMFri U4Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=/4aDDZU3fiZLtDcl+V801pkL9eeO0uSJUalBJ9NTJ5A=; b=GXyVobB8aTiPqo0f2JMsIdZJhKrgE3RGObeJ1nUesmDH2ETDZTvQwOwQU/dCEESD6W DdnOL8YE2LCQ/oIxlVRTl6SN+aSLNk8iSDGRfQARW8OxQLlrOhvySoXr57qTPtHFHsVE kb53QkBtRyn64vlqz0SonhQT8p5o6fC5gVtK7NfbT99MM3cqxKOiBocZMceWhLr05/M5 mdyz2nCdeDyHZr2+b1/F4EhpOEY+qFaxtbfOME8sDKrBRrsvzEHOr1fUf7dc0IPy4IVa KmVAcvoh+G5Iwq3dTQzviKArr+TMj/g3PaDaBjirWzexzge9D27n5s7rEBrqu31o3cJF TwHg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si2325362pgs.8.2018.12.13.12.32.21; Thu, 13 Dec 2018 12:32:36 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727449AbeLMUbZ convert rfc822-to-8bit (ORCPT + 99 others); Thu, 13 Dec 2018 15:31:25 -0500 Received: from mga06.intel.com ([134.134.136.31]:45390 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbeLMUbY (ORCPT ); Thu, 13 Dec 2018 15:31:24 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 12:31:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,349,1539673200"; d="scan'208";a="129746197" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 13 Dec 2018 12:31:24 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 12:31:23 -0800 Received: from hasmsx112.ger.corp.intel.com (10.184.198.40) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 12:31:23 -0800 Received: from hasmsx108.ger.corp.intel.com ([169.254.9.61]) by HASMSX112.ger.corp.intel.com ([169.254.11.88]) with mapi id 14.03.0415.000; Thu, 13 Dec 2018 22:31:20 +0200 From: "Winkler, Tomas" To: Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , Vinayak Holikatti , "Hunter, Adrian" CC: Christoph Hellwig , Vivek Gautam , Subhash Jadavani , Alex Lemberg , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] scsi: ufs: revamp string descriptor reading Thread-Topic: [PATCH] scsi: ufs: revamp string descriptor reading Thread-Index: AQHUkToXZ68GRbLa4ESXHC/L0gTpRaV5llCAgAOL1XA= Date: Thu, 13 Dec 2018 20:31:19 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9DA525B5@hasmsx108.ger.corp.intel.com> References: <20181211110705.11646-1-tomas.winkler@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzBlNTBjOTctYWU1Yy00OWE3LWFjOGEtZjUxMjBjNDRhMWQwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQmlGZzZzMzRnV1MzSzhtYm1OUmliR0xlc0ZoVWpVUmdocEdEcXVlQ3hWQ250dE1zZVVxTTJvVTBsTWd4XC9qaUsifQ== dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.249.91.43] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Avri Altman [mailto:Avri.Altman@wdc.com] > Sent: Tuesday, December 11, 2018 18:18 > To: Winkler, Tomas ; James E . J . Bottomley > ; Martin K . Petersen > ; Vinayak Holikatti ; > Hunter, Adrian > Cc: Christoph Hellwig ; Vivek Gautam > ; Subhash Jadavani > ; Alex Lemberg ; linux- > scsi@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH] scsi: ufs: revamp string descriptor reading > > Hello Tomas, > > > > > Define new a type: uc_string_id for easier string handling and less > > casting. Reduce number or string copies in price of a dynamic > > allocation. > > > > Signed-off-by: Tomas Winkler > Tested-by: Avri Altman > > Just one nit - doesn't really matters. > > Cheers, > Avri > > > --- > > drivers/scsi/ufs/ufs-sysfs.c | 20 ++--- > > drivers/scsi/ufs/ufs.h | 2 +- > > drivers/scsi/ufs/ufshcd.c | 164 +++++++++++++++++++++-------------- > > drivers/scsi/ufs/ufshcd.h | 9 +- > > 4 files changed, 115 insertions(+), 80 deletions(-) > > > > > > ufs_fixup_device_setup(hba, &card); > > + ufs_put_device_desc(&card); > ufs_get_device_desc() and ufs_put_device_desc() actually serves the quirks > setup. > Make sense to call it from within so the logic is clear and in one place. > Might also save ufs_put_device_desc(). You are right from the current perspective , just I'd need it also for the RPMB patches that should follow, then it will have bit larger span than the quirks. Thanks Tomas