From: Naman Jain <quic_namajain@quicinc.com>
To: Trilok Soni <quic_tsoni@quicinc.com>,
Bjorn Andersson <andersson@kernel.org>,
Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<quic_pkondeti@quicinc.com>
Subject: Re: [PATCH 1/2] soc: qcom: socinfo: Change socinfo variable name and scope
Date: Thu, 19 Jan 2023 15:03:05 +0530 [thread overview]
Message-ID: <725edcc6-250a-0cd3-4c32-300f48a8ad79@quicinc.com> (raw)
In-Reply-To: <2f1d92e7-08e0-13f3-2087-f0c55d83383c@quicinc.com>
Hi Trilok,
Thanks for reviewing the patches.
On 1/12/2023 3:07 AM, Trilok Soni wrote:
> On 1/11/2023 12:21 AM, Naman Jain wrote:
>> Change socinfo structure variable scope from function to file
>> to make it easy to support custom attributes for sysfs. Also,
>> change variable name to make it more descriptive.
>
> Did you mean debugfs?
No, I meant sysfs only. debugfs support is generally added with every
version update, in kernel. Since debugfs can't be used for these
purposes in production devices, we are proposing to extend current sysfs
interface.
>
> Can you one example of custom attribute in the commit text so that we
> understand the motivation better?
>
I'll add the examples in next patch. Thanks.
>>
>> Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
>> ---
>> drivers/soc/qcom/socinfo.c | 80 ++++++++++++++++++++------------------
>> 1 file changed, 42 insertions(+), 38 deletions(-)
>>
>> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
>> index 10efdbcfdf05..251c0fd94962 100644
>> --- a/drivers/soc/qcom/socinfo.c
>> +++ b/drivers/soc/qcom/socinfo.c
>> @@ -175,6 +175,7 @@ struct socinfo {
>> __le32 npartnamemap_offset;
>> __le32 nnum_partname_mapping;
>> };
>> +static struct socinfo *soc_info;
>
> Is there any better way to do it? Should not asume the just one object
> and dynamically allocate it? Let's wait for Bjorn to check as well.
So current sysfs attributes are added in probe function, where this
"info" variable is defined and used. For additions to current sysfs
interface, using a separate function, the need for having this variable
with file scope came. Now, I can keep the variable name, same, as "info"
and not change it to "soc_info" if the forum suggests that, just that we
thought it feels more descriptive to change it to "soc_info", when we
make it's scope to file. Also, in future, with this variable global, if
we decide to support kernel clients by exporting these fields through
APIs, we can easily make use of this and implement.
>
> ---Trilok Soni
Thanks,
Naman Jain
next prev parent reply other threads:[~2023-01-19 9:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 8:21 [PATCH 0/2] soc: qcom: socinfo: Add fields in sysfs custom attributes Naman Jain
2023-01-11 8:21 ` [PATCH 1/2] soc: qcom: socinfo: Change socinfo variable name and scope Naman Jain
2023-01-11 21:37 ` Trilok Soni
2023-01-19 9:33 ` Naman Jain [this message]
2023-01-11 8:21 ` [PATCH 2/2] soc: qcom: socinfo: Add sysfs attributes for fields in v2-v6 Naman Jain
2023-01-11 23:19 ` Dmitry Baryshkov
2023-01-11 23:58 ` Trilok Soni
2023-01-19 9:35 ` Naman Jain
2023-01-19 9:39 ` Naman Jain
2023-01-19 10:59 ` Dmitry Baryshkov
2023-01-20 10:15 ` Naman Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=725edcc6-250a-0cd3-4c32-300f48a8ad79@quicinc.com \
--to=quic_namajain@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_pkondeti@quicinc.com \
--cc=quic_tsoni@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®