All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>, <helgaas@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <stuart.w.hayes@gmail.com>,
	<dan.j.williams@intel.com>
Subject: RE: [PATCH 3/3] misc: enclosure: update sysfs api
Date: Thu, 4 May 2023 17:11:04 -0700	[thread overview]
Message-ID: <64544998badde_2ec5d294cc@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20221117163407.28472-4-mariusz.tkaczyk@linux.intel.com>

Mariusz Tkaczyk wrote:
> Use DEVICE_ATTR RW, RO and WO macros. Update function names
> accordingly.
> No functional changes intended.

This looks like a nice cleanup to me, but I think you missed that
ses_set_active() updates ecomp->active. So even though
ses_enclosure_callbacks() does not publish get_active() it is still the
case that active needs to be DEVICE_ATTR_RW(). In fact with your change
in patch2 it now *requires* that ses_enclosure_callbacks() adds a
"get_active()" implementation. In that case it's going to need to cache
the last active setting which basically means dropping patch2 because it
seems more awkward to require "get" callbacks when cached value from the
last "set" is sufficient.

  reply	other threads:[~2023-05-05  0:11 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
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 [this message]
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=64544998badde_2ec5d294cc@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mariusz.tkaczyk@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.