* Re: [PATCH 0/6] constify pci_error_handlers structures [not found] <1502516674-8918-1-git-send-email-Julia.Lawall@lip6.fr> @ 2017-08-12 7:44 ` Christoph Hellwig 2017-08-12 7:52 ` Julia Lawall 0 siblings, 1 reply; 6+ messages in thread From: Christoph Hellwig @ 2017-08-12 7:44 UTC (permalink / raw) To: Julia Lawall Cc: linux-scsi, bhumirks, kernel-janitors, MPT-FusionLinux.pdl, linux-kernel, linux-pci 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/6] constify pci_error_handlers structures 2017-08-12 7:44 ` [PATCH 0/6] constify pci_error_handlers structures Christoph Hellwig @ 2017-08-12 7:52 ` Julia Lawall 2017-08-12 7:56 ` Christoph Hellwig 0 siblings, 1 reply; 6+ messages in thread From: Julia Lawall @ 2017-08-12 7:52 UTC (permalink / raw) To: Christoph Hellwig Cc: linux-scsi, bhumirks, kernel-janitors, MPT-FusionLinux.pdl, linux-kernel, linux-pci 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/6] constify pci_error_handlers structures 2017-08-12 7:52 ` Julia Lawall @ 2017-08-12 7:56 ` Christoph Hellwig 2017-08-12 8:00 ` Julia Lawall 2017-08-12 11:51 ` Julia Lawall 0 siblings, 2 replies; 6+ messages in thread From: Christoph Hellwig @ 2017-08-12 7:56 UTC (permalink / raw) To: Julia Lawall Cc: Christoph Hellwig, linux-scsi, bhumirks, kernel-janitors, MPT-FusionLinux.pdl, linux-kernel, linux-pci 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&id=c5dc3c69f17a7e77359f10c342d1816390bc8846 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/6] constify pci_error_handlers structures 2017-08-12 7:56 ` Christoph Hellwig @ 2017-08-12 8:00 ` Julia Lawall 2017-08-12 11:51 ` Julia Lawall 1 sibling, 0 replies; 6+ messages in thread From: Julia Lawall @ 2017-08-12 8:00 UTC (permalink / raw) To: Christoph Hellwig Cc: linux-scsi, bhumirks, kernel-janitors, MPT-FusionLinux.pdl, linux-kernel, linux-pci 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&id=c5dc3c69f17a7e77359f10c342d1816390bc8846 Thanks for the pointer. julia ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/6] constify pci_error_handlers structures 2017-08-12 7:56 ` Christoph Hellwig 2017-08-12 8:00 ` Julia Lawall @ 2017-08-12 11:51 ` Julia Lawall 2017-08-13 14:37 ` Christoph Hellwig 1 sibling, 1 reply; 6+ messages in thread From: Julia Lawall @ 2017-08-12 11:51 UTC (permalink / raw) To: Christoph Hellwig Cc: linux-scsi, bhumirks, kernel-janitors, MPT-FusionLinux.pdl, linux-kernel, linux-pci 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/6] constify pci_error_handlers structures 2017-08-12 11:51 ` Julia Lawall @ 2017-08-13 14:37 ` Christoph Hellwig 0 siblings, 0 replies; 6+ messages in thread From: Christoph Hellwig @ 2017-08-13 14:37 UTC (permalink / raw) To: Julia Lawall Cc: Christoph Hellwig, linux-scsi, bhumirks, kernel-janitors, MPT-FusionLinux.pdl, linux-kernel, linux-pci 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-13 14:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1502516674-8918-1-git-send-email-Julia.Lawall@lip6.fr>
2017-08-12 7:44 ` [PATCH 0/6] constify pci_error_handlers structures Christoph Hellwig
2017-08-12 7:52 ` Julia Lawall
2017-08-12 7:56 ` Christoph Hellwig
2017-08-12 8:00 ` Julia Lawall
2017-08-12 11:51 ` Julia Lawall
2017-08-13 14:37 ` Christoph Hellwig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).