[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250215020637.217456-1-trintaeoitogc@gmail.com>
Date: Fri, 14 Feb 2025 23:06:37 -0300
From: Guilherme Giacomo Simoes <trintaeoitogc@...il.com>
To: helgaas@...nel.org
Cc: bhelgaas@...gle.com,
linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org,
scott@...teful.org,
trintaeoitogc@...il.com
Subject: Re: [RESEND PATCH] PCI: cpci: remove unused fields
Bjorn Helgaas <helgaas@...nel.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@...adoo.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
Powered by blists - more mailing lists