From: Guenter Roeck <linux@roeck-us.net>
To: babu.moger@amd.com, clemens@ladisch.de, jdelvare@suse.com
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hwmon: (k10temp) Move the CCD limit info inside k10temp_data structure
Date: Tue, 23 Nov 2021 14:07:05 -0800 [thread overview]
Message-ID: <b5741cbd-f94b-a405-72c3-699338d6a232@roeck-us.net> (raw)
In-Reply-To: <6e22cf38-39b6-6cd4-1435-c9a9f2e50230@amd.com>
On 11/23/21 1:52 PM, Moger, Babu wrote:
>
>
> On 11/23/2021 3:40 PM, Guenter Roeck wrote:
>> On 11/23/21 1:16 PM, Babu Moger wrote:
>>> It seems appropriate to move the CCD specific information inside the
>>> k10temp_data structure.
>>>
>>
>> Why ? I don't see it used outside k10temp_get_ccd_support().
>
> Thought it will be cleaner to have it all together at one structure. If
> you feel otherwise I can remove it.
I don't see the point of having a value in a data structure that isn't
used anywhere outside probing but nevertheless lives forever.
I also don't see how it is "cleaner" to assign a value to a variable
in a data structure only to dereference it in a single called function,
when it can be just as easily be passed as argument to that function.
I would call that just the opposite, since it creates the impression
that the variable is needed outside probing when that is not the case.
Guenter
next prev parent reply other threads:[~2021-11-23 22:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 21:16 [PATCH 1/2] hwmon: (k10temp) Move the CCD limit info inside k10temp_data structure Babu Moger
2021-11-23 21:16 ` [PATCH 2/2] hwmon: (k10temp) Support up to 12 CCDs on AMD Family of processors Babu Moger
2021-11-23 21:40 ` [PATCH 1/2] hwmon: (k10temp) Move the CCD limit info inside k10temp_data structure Guenter Roeck
2021-11-23 21:52 ` Moger, Babu
2021-11-23 22:07 ` Guenter Roeck [this message]
2021-11-23 22:15 ` Babu Moger
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=b5741cbd-f94b-a405-72c3-699338d6a232@roeck-us.net \
--to=linux@roeck-us.net \
--cc=babu.moger@amd.com \
--cc=clemens@ladisch.de \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).