From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: <helgaas@kernel.org>, <linux-pci@vger.kernel.org>,
<stuart.w.hayes@gmail.com>
Subject: Re: [PATCH 2/3] misc: enclosure, ses: simplify some get callbacks
Date: Fri, 5 May 2023 13:45:34 +0200 [thread overview]
Message-ID: <20230505134534.000066b9@linux.intel.com> (raw)
In-Reply-To: <645446ab23922_2ec5d2945c@dwillia2-xfh.jf.intel.com.notmuch>
On Thu, 4 May 2023 16:58:35 -0700
Dan Williams <dan.j.williams@intel.com> wrote:
> Mariusz Tkaczyk wrote:
> > Remove active, status, fault and locate variables from
> > enclosure_component struct. Return then directly.
> > No functional changes intended.
>
> This looks ok although it's not a clear win on the diffstat. Does this
> make the NPEM implementation easier to remove the indirection through
> "struct enclosure_component" for reading fresh values? That would help
> make the case.
I did that to familiarize better with this API. I determined that those values
can be just returned. They are refreshed every time on read in get_*led*(). I
believed that it makes implementation simpler for reader.
It could save me from some questions, "why not to reuse existing active,
fault, status variables" but it is no clear benefit.
It saves some memory because those variable probably won't be used in
NPEM/_DSM implementation (at least draft I left doesn't not use them).
If you don't see this valuable let me know, I can drop it.
Thanks,
Mariusz
next prev parent reply other threads:[~2023-05-05 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 16:34 [PATCH 0/3] Enclosure sysfs refactor Mariusz Tkaczyk
2022-11-17 16:34 ` [PATCH 1/3] misc: enclosure: remove get_active() callback Mariusz Tkaczyk
2023-05-04 17:22 ` Dan Williams
2022-11-17 16:34 ` [PATCH 2/3] misc: enclosure, ses: simplify some get callbacks Mariusz Tkaczyk
2023-05-04 23:58 ` Dan Williams
2023-05-05 11:45 ` Mariusz Tkaczyk [this message]
2023-05-05 17:33 ` Dan Williams
2022-11-17 16:34 ` [PATCH 3/3] misc: enclosure: update sysfs api Mariusz Tkaczyk
2023-05-05 0:11 ` Dan Williams
2023-05-04 12:10 ` [PATCH 0/3] Enclosure sysfs refactor Mariusz Tkaczyk
2023-05-04 17:16 ` Dan Williams
2023-05-05 9:12 ` Mariusz Tkaczyk
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=20230505134534.000066b9@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=stuart.w.hayes@gmail.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;
as well as URLs for NNTP newsgroup(s).