Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp698277imm; Fri, 8 Jun 2018 03:56:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKItso5LB6w78X9Mrrxz/hcfosJWRyXqBcb5gnfGKUoWXdltgJDVaq4rRapRbsWpIeZ8hu0B X-Received: by 2002:a62:cd82:: with SMTP id o124-v6mr5524076pfg.250.1528455408318; Fri, 08 Jun 2018 03:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528455408; cv=none; d=google.com; s=arc-20160816; b=oVsQlwiTRZCzmHz93JPYE/7Zlo8dkqdY/SHYq2K2mcytWTaxADWjDQtfsuBxusFkxH oB9SYWY5nkkZVuzljwafnbQDnnX7OSqmPuq38Pmpqy0PF9FouluDSBG4Y3jDrSuvul5S x297wDbKnoxrQ23PhLHzXzjQn90Jcyxii44JMLm0JeJsF39ciFAmILKcSXU5vxh2m06b jqiNkE7z3Z0RT5rul1IJnAztvu6CgSRfCVpaF2KzDBQF6vPi041/Bmyob/KscAkVND5s 1/C6tOuSUrUgqCegcoYmrLq8Dm2OrDrv5ozLkyheJmy02z2xXIYJ6JiZ2AjNJ7qT81PA /o+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dmarc-filter:dkim-signature :dkim-signature:arc-authentication-results; bh=+jalOFoy0lO4kw0zGJPd1mRdqHOYgmbvNa0/Bek38iI=; b=WHSB7EpdER7fJg3Y0g8laxcSBICtrY1AvZnGwe/tcyUtxSEt+uoDR7qEcOHHSKCnLJ 7Al5pEZJtDxEwu/OhrzndIjFVjIY5Vt/HGNQ4QDxQ/ak31sv7igDZIE0thY39KX5v4HI bpPRO0veKUk6LORNdm+gdNXv+X/kOzKgNNtLHZXyyu0cc2nAn57SUXyvExjpjomSwRRl jNxAWH4BO3BQvsjWh+KmzIDkICGBqhRK1RI3R6DB0TqUYKARcOJFjQeG7WtV0CojS86Z rPK5ACzTVyJvk22qqDtZpuZLdePBTZtwA7cA/vqhZtK7CIk56lcgS2GZkmWbtkyp5ym4 9P9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KtvgZA4A; dkim=pass header.i=@codeaurora.org header.s=default header.b=nn+zqWH8; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j187-v6si12109001pgc.552.2018.06.08.03.56.31; Fri, 08 Jun 2018 03:56:48 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=KtvgZA4A; dkim=pass header.i=@codeaurora.org header.s=default header.b=nn+zqWH8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751504AbeFHK4F (ORCPT + 99 others); Fri, 8 Jun 2018 06:56:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45036 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751056AbeFHK4D (ORCPT ); Fri, 8 Jun 2018 06:56:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1E018607E4; Fri, 8 Jun 2018 10:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528455363; bh=E9ALAvsCtWMZU9z3HM+b8JBaVy4mmQRgePINFT1+u2Y=; h=From:To:Cc:References:In-Reply-To:Subject:Date:From; b=KtvgZA4Au+X1h/+P06ua5WqdLLIIBpLeploOVrfIwPLHT0qkTTiiRToBP3eGqb7n7 k3ou+SwP6jF3C+1WvNRfQycQc2nfigKR40JPSObVt1kJzP25K8EgrQaGhdIr+avnBA KUwWkmflcEefsUFZBqIviSKJ0PbeuFZDqMHJQI/4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,TVD_RCVD_SINGLE,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from SAYALIL (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sayalil@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C971A602FC; Fri, 8 Jun 2018 10:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528455352; bh=E9ALAvsCtWMZU9z3HM+b8JBaVy4mmQRgePINFT1+u2Y=; h=From:To:Cc:References:In-Reply-To:Subject:Date:From; b=nn+zqWH8QOo3yMCBK2spITZOwhpCUfBNVUywRXRbtmryPU4GHn1aKZ2ydGcIAUmNI pBWzza7yXF0vjVjoySkXJAtnT7zhIpDz6p0X76mzRiy7hYIzTMrcNZe4SeNbf+yQsL BrBoSwvln63Icfh+Fz2qENe5avPi0E9PO5/Ea4TU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C971A602FC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sayalil@codeaurora.org From: "sayali" To: "'Greg Kroah-Hartman'" , "'Stanislav Nijnikov'" , Cc: , , , , , , , , , "'Bart Van Assche'" , , "'Adrian Hunter'" , "'open list'" References: <1527849774-7623-1-git-send-email-sayalil@codeaurora.org> <1527849774-7623-4-git-send-email-sayalil@codeaurora.org> <20180605084200.GB8665@kroah.com> In-Reply-To: <20180605084200.GB8665@kroah.com> Subject: RE: [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision Date: Fri, 8 Jun 2018 16:25:45 +0530 Message-ID: <000401d3ff17$4496a390$cdc3eab0$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKGja9h2+sAa9B7VDYjBpPLWNjYigGinHYVAlfCZYgA8/Aan6LJmiqg Content-Language: en-us Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg / Stanislav, Thank you for your comments. Updated my comments inline. Please check. Thanks, Sayali -----Original Message----- From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org] Sent: Tuesday, June 05, 2018 2:12 PM To: Stanislav Nijnikov Cc: Sayali Lokhande ; subhashj@codeaurora.org; cang@codeaurora.org; vivek.gautam@codeaurora.org; rnayak@codeaurora.org; vinholikatti@gmail.com; jejb@linux.vnet.ibm.com; martin.petersen@oracle.com; asutoshd@codeaurora.org; evgreen@chromium.org; Bart Van Assche ; linux-scsi@vger.kernel.org; Adrian Hunter ; open list Subject: Re: [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision On Tue, Jun 05, 2018 at 08:16:50AM +0000, Stanislav Nijnikov wrote: > Hi Sayali, > > I think that passing an array of values in a string is not proper way > to work with a sysfs entry. There are binary attributes to do such > things. No, don't do that, sysfs is for "one value per file", and binary attributes are for "hardware value pass-through" type stuff. Unless this is "raw" data straight from the hardware, binary does not work, and neither does a normal sysfs file either. So this needs to be reworked please. [Sayali] As per Documentation/filesystems/sysfs.txt : "Attributes should be ASCII text files, preferably with only one value per file. It is noted that it may not be efficient to contain only one value per file, so it is socially acceptable to express an array of values of the same type." So it seems sysfs can be used to pass more than one value given that they are of same type (which is ensured as I am passing char string). Also I have noticed , in scsi_sysfs.c (store_scan() or scsi_scan()), we do pass char buffer (more than one value) via sysfs . As sysfs is already being used to read descriptors, I thought of using sysfs as write interface for configuration descriptor. Appreciate, if you could suggest me some other interfaces that can be used here (allow passing more than one value) or do you think I need to pass each configurable parameter one by one for provisioning ? thanks, greg k-h