Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, Aug 12, 2017 at 01:51:21PM +0200, Julia Lawall wrote: > Another issue arises in the files drivers/infiniband/hw/hfi1/pcie.c and > drivers/infiniband/hw/qib/qib_pcie.c, where the pci_error_handlers > structure is defined in one file and used in another file. The structure > definition references various functions that are static in the same file. > Should I try to move those functions to the file containing the pci_driver > structure? Or leave the functions where they are and remove the static > annotation? I'd just leave them as-is and remove the static for now.
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, Aug 12, 2017 at 01:51:21PM +0200, Julia Lawall wrote: > Another issue arises in the files drivers/infiniband/hw/hfi1/pcie.c and > drivers/infiniband/hw/qib/qib_pcie.c, where the pci_error_handlers > structure is defined in one file and used in another file. The structure > definition references various functions that are static in the same file. > Should I try to move those functions to the file containing the pci_driver > structure? Or leave the functions where they are and remove the static > annotation? I'd just leave them as-is and remove the static for now.
Re: [PATCH 0/6] constify pci_error_handlers structures
Another issue arises in the files drivers/infiniband/hw/hfi1/pcie.c and drivers/infiniband/hw/qib/qib_pcie.c, where the pci_error_handlers structure is defined in one file and used in another file. The structure definition references various functions that are static in the same file. Should I try to move those functions to the file containing the pci_driver structure? Or leave the functions where they are and remove the static annotation? thanks, julia
Re: [PATCH 0/6] constify pci_error_handlers structures
Another issue arises in the files drivers/infiniband/hw/hfi1/pcie.c and drivers/infiniband/hw/qib/qib_pcie.c, where the pci_error_handlers structure is defined in one file and used in another file. The structure definition references various functions that are static in the same file. Should I try to move those functions to the file containing the pci_driver structure? Or leave the functions where they are and remove the static annotation? thanks, julia
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, 12 Aug 2017, Christoph Hellwig wrote: > On Sat, Aug 12, 2017 at 09:52:28AM +0200, Julia Lawall wrote: > > OK, sure. So to be precise, you want the fields error_detected, > > mmio_enabled, etc to be added as new fields to the pci_driver structure? > > Yes. > > > They both have a resume field, though. What should the pci_error_handlers > > resume function be renamed to? Would resume_after_error be too much? > > error_resume maybe? OK > > FYI, I already killed it for the PCIe port drivers a while ago: > > https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/aer=c5dc3c69f17a7e77359f10c342d1816390bc8846 Thanks for the pointer. julia
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, 12 Aug 2017, Christoph Hellwig wrote: > On Sat, Aug 12, 2017 at 09:52:28AM +0200, Julia Lawall wrote: > > OK, sure. So to be precise, you want the fields error_detected, > > mmio_enabled, etc to be added as new fields to the pci_driver structure? > > Yes. > > > They both have a resume field, though. What should the pci_error_handlers > > resume function be renamed to? Would resume_after_error be too much? > > error_resume maybe? OK > > FYI, I already killed it for the PCIe port drivers a while ago: > > https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/aer=c5dc3c69f17a7e77359f10c342d1816390bc8846 Thanks for the pointer. julia
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, Aug 12, 2017 at 09:52:28AM +0200, Julia Lawall wrote: > OK, sure. So to be precise, you want the fields error_detected, > mmio_enabled, etc to be added as new fields to the pci_driver structure? Yes. > They both have a resume field, though. What should the pci_error_handlers > resume function be renamed to? Would resume_after_error be too much? error_resume maybe? FYI, I already killed it for the PCIe port drivers a while ago: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/aer=c5dc3c69f17a7e77359f10c342d1816390bc8846
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, Aug 12, 2017 at 09:52:28AM +0200, Julia Lawall wrote: > OK, sure. So to be precise, you want the fields error_detected, > mmio_enabled, etc to be added as new fields to the pci_driver structure? Yes. > They both have a resume field, though. What should the pci_error_handlers > resume function be renamed to? Would resume_after_error be too much? error_resume maybe? FYI, I already killed it for the PCIe port drivers a while ago: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/aer=c5dc3c69f17a7e77359f10c342d1816390bc8846
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, 12 Aug 2017, Christoph Hellwig wrote: > On Sat, Aug 12, 2017 at 07:44:28AM +0200, Julia Lawall wrote: > > These pci_error_handlers structures are only stored in the err_handler > > field of a pci_driver structure, and this field is declared as const. Thus > > the pci_error_handlers structures can be const too. > > > > Done with the help of Coccinelle. > > If you're doing a scripted conversion of the pci_error_handlers > structured I'd much rather see that structure killed off and folded > into the pci_driver one. OK, sure. So to be precise, you want the fields error_detected, mmio_enabled, etc to be added as new fields to the pci_driver structure? They both have a resume field, though. What should the pci_error_handlers resume function be renamed to? Would resume_after_error be too much? julia
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, 12 Aug 2017, Christoph Hellwig wrote: > On Sat, Aug 12, 2017 at 07:44:28AM +0200, Julia Lawall wrote: > > These pci_error_handlers structures are only stored in the err_handler > > field of a pci_driver structure, and this field is declared as const. Thus > > the pci_error_handlers structures can be const too. > > > > Done with the help of Coccinelle. > > If you're doing a scripted conversion of the pci_error_handlers > structured I'd much rather see that structure killed off and folded > into the pci_driver one. OK, sure. So to be precise, you want the fields error_detected, mmio_enabled, etc to be added as new fields to the pci_driver structure? They both have a resume field, though. What should the pci_error_handlers resume function be renamed to? Would resume_after_error be too much? julia
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, Aug 12, 2017 at 07:44:28AM +0200, Julia Lawall wrote: > These pci_error_handlers structures are only stored in the err_handler > field of a pci_driver structure, and this field is declared as const. Thus > the pci_error_handlers structures can be const too. > > Done with the help of Coccinelle. If you're doing a scripted conversion of the pci_error_handlers structured I'd much rather see that structure killed off and folded into the pci_driver one.
Re: [PATCH 0/6] constify pci_error_handlers structures
On Sat, Aug 12, 2017 at 07:44:28AM +0200, Julia Lawall wrote: > These pci_error_handlers structures are only stored in the err_handler > field of a pci_driver structure, and this field is declared as const. Thus > the pci_error_handlers structures can be const too. > > Done with the help of Coccinelle. If you're doing a scripted conversion of the pci_error_handlers structured I'd much rather see that structure killed off and folded into the pci_driver one.
[PATCH 0/6] constify pci_error_handlers structures
These pci_error_handlers structures are only stored in the err_handler field of a pci_driver structure, and this field is declared as const. Thus the pci_error_handlers structures can be const too. Done with the help of Coccinelle. --- drivers/misc/genwqe/card_base.c |2 +- drivers/scsi/aacraid/linit.c |2 +- drivers/scsi/be2iscsi/be_main.c |2 +- drivers/scsi/bfa/bfad.c |2 +- drivers/scsi/csiostor/csio_init.c|2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c |2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
[PATCH 0/6] constify pci_error_handlers structures
These pci_error_handlers structures are only stored in the err_handler field of a pci_driver structure, and this field is declared as const. Thus the pci_error_handlers structures can be const too. Done with the help of Coccinelle. --- drivers/misc/genwqe/card_base.c |2 +- drivers/scsi/aacraid/linit.c |2 +- drivers/scsi/be2iscsi/be_main.c |2 +- drivers/scsi/bfa/bfad.c |2 +- drivers/scsi/csiostor/csio_init.c|2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c |2 +- 6 files changed, 6 insertions(+), 6 deletions(-)