All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
To: helgaas@kernel.org
Cc: bhelgaas@google.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, scott@spiteful.org,
	trintaeoitogc@gmail.com
Subject: Re: [RESEND PATCH] PCI: cpci: remove unused fields
Date: Fri, 14 Feb 2025 23:06:37 -0300	[thread overview]
Message-ID: <20250215020637.217456-1-trintaeoitogc@gmail.com> (raw)
In-Reply-To: <20250213212627.GA129476@bhelgaas>

Bjorn Helgaas <helgaas@kernel.org> wrote:
> There are no implementations of ->set_power() or ->get_power(), are
> there?  If not, we can just remove them and the calls to them.
> 
> I don't see why we should add SLOT_ENABLED.
Are not implementations of set_power() and get_power(). 
I removed this funcions and in enable_slot(), disable_slot() and
cpci_get_power_status() I use a `flags` field that I create in
cpci_hp_controller_ops struct. I created this `flags` for store a power_status
and use this in enable_slot(), disable_slot() and cpci_get_power_status() that
before uses a set_power() and get_power(). I do this way, because I seeing this
patter in another pci subsystems. In adittion on this, the flags can be used
for store anothers values.

But the Christophe JAILLET <christophe.jaillet@wanadoo.fr> say:
"If neither get_power nor set_power where defined in any driver, then 
cpci_get_power_status() was always returning 1.
IIUC, now it may return 1 or 0 depending of if enable_slot() or 
disable_slot() have been called."

Do you think that is better we only return 1 in pci_get_power_status() and
remove SLOT_ENABLED and `flags` field?

Thanks,
Guilherme

  reply	other threads:[~2025-02-15  2:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 17:39 [RESEND PATCH] PCI: cpci: remove unused fields Guilherme Giacomo Simoes
2025-02-13 20:44 ` Christophe JAILLET
2025-02-15  2:10   ` Guilherme Giacomo Simoes
2025-02-15  8:56     ` Christophe JAILLET
2025-02-15 14:05       ` Guilherme Giacomo Simoes
2025-02-13 21:26 ` Bjorn Helgaas
2025-02-15  2:06   ` Guilherme Giacomo Simoes [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-30 14:01 Guilherme Giacomo Simoes
2025-01-16 15:55 Guilherme Giacomo Simoes
2025-01-02 15:26 Guilherme Giacomo Simoes

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=20250215020637.217456-1-trintaeoitogc@gmail.com \
    --to=trintaeoitogc@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=scott@spiteful.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 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.