Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1692951imu; Thu, 17 Jan 2019 01:32:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN7wRFJdnD+yWxThvqXL3568+bbZ6as4FnzTfBvtEzKA4/QdwtMh4oWpw8/jiruIBTXKVUAw X-Received: by 2002:a17:902:209:: with SMTP id 9mr14492832plc.288.1547717556695; Thu, 17 Jan 2019 01:32:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547717556; cv=none; d=google.com; s=arc-20160816; b=KxOGZ7iLvu2aTyFVc1iWJRwptkye8HWfF5Xq7uv2eulIBx0+pZ2GjSm1un0tTsFAX4 dveIvYy8nhCpzpasOF93BnZvIvbczGmU2bEuc428B0NnaqdT+vvEHMacJo9C8P5WYn8u VSV8bH/6hGQn0JweUcVGOd0VJwiKmxxfeQhisJRrint6oyHxxSSev5wZWxj3m5JtyFuE VYceuDnhGCVFp70yzRGyNkjNRgSjnnnF6q6jvoUvFUhaEEbpHw9TdDg+FO10xQDdE5He gJJtKS4dZUwZLzRXUTDMYKBcta1jcJwAJlRkdyTfxf2qBmJwiEBG0L6FVD9vJ45dm4uB q51w== 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=4bzHHpcuNMPV3yQDBBGNY9UoBFq7oyi4ujidxMhLP+c=; b=kL485xRoIYjPfB0YSVSiHoqOz5xA0ON89iXbBj3vdzm9mZMGASvg3cgVQJBZqkmBGA 3y3Rs/Xfqx8L8ibKf2w5BiaivaZoqH0V/XbRZIhX7iAezfbN4sm0tDf+crKSTsDUEL1r nFAQQm4Lg9+ELjcxyuefFIWILapoA7aSen+M8lg/jr70QGVu24PEkeg4QjSoysWcyYF4 l7ECEcS35ZZLZT+ZbRUQuw+An+47fqsbwM52lQRQZOLnf3OexooKeU/hOQJ1qHAKQUPp idZJm3djk+tW/x1uZ4iZiNJuX7wMu1/UmxRt+VhwgMi1VVzuk8l5wnRAKYWNYoemA7bu HP4Q== 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 w11si1152013plz.327.2019.01.17.01.32.20; Thu, 17 Jan 2019 01: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 S1727758AbfAQHvc convert rfc822-to-8bit (ORCPT + 99 others); Thu, 17 Jan 2019 02:51:32 -0500 Received: from mga07.intel.com ([134.134.136.100]:8737 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727272AbfAQHvc (ORCPT ); Thu, 17 Jan 2019 02:51:32 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2019 23:51:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,488,1539673200"; d="scan'208";a="119182678" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 16 Jan 2019 23:51:31 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 16 Jan 2019 23:51:08 -0800 Received: from lcsmsx155.ger.corp.intel.com (10.186.165.233) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 16 Jan 2019 23:51:07 -0800 Received: from hasmsx108.ger.corp.intel.com ([169.254.9.155]) by LCSMSX155.ger.corp.intel.com ([169.254.12.76]) with mapi id 14.03.0415.000; Thu, 17 Jan 2019 09:51:05 +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" , "Winkler, Tomas" Subject: RE: [PATCH] scsi: ufs: revamp string descriptor reading Thread-Topic: [PATCH] scsi: ufs: revamp string descriptor reading Thread-Index: AQHUkToXZ68GRbLa4ESXHC/L0gTpRaV5llCAgAOL1XCAI5V+oA== Date: Thu, 17 Jan 2019 07:51:04 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9DA7C91D@hasmsx108.ger.corp.intel.com> References: <20181211110705.11646-1-tomas.winkler@intel.com> <5B8DA87D05A7694D9FA63FD143655C1B9DA525B5@hasmsx108.ger.corp.intel.com> In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9DA525B5@hasmsx108.ger.corp.intel.com> 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.12.126.93] 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 > > 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. > Is this okay, can we merge? Thanks Tomas