Re: [RESEND PATCH] PCI: cpci: remove unused fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bjorn Helgaas <helgaas@xxxxxxxxxx> 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@xxxxxxxxxx> 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




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux