Fix the edac local pci_write_bits32 to properly note the 'escape' mask if all ones in a 32-bit word. Currently no consumer of this function uses that mask, so there is no danger to existing code.
Unified · Split
| @@ -767,11 +767,19 @@ static inline void pci_write_bits16(struct pci_dev *pdev, int offset, · 766 unmodified lines | |||
| 767 | pci_write_config_word(pdev, offset, value); | 767 | pci_write_config_word(pdev, offset, value); |
| 768 | } | 768 | } |
| 769 | 769 | ||
| 770 | /* write all or some bits in a dword-register*/ | 770 | /* |
| 771 | * pci_write_bits32 | ||
| 772 | * | ||
| 773 | * edac local routine to do pci_write_config_dword, but adds | ||
| 774 | * a mask parameter. If mask is all ones, ignore the mask. | ||
| 775 | * Otherwise utilize the mask to isolate specified bits | ||
| 776 | * | ||
| 777 | * write all or some bits in a dword-register | ||
| 778 | */ | ||
| 771 | static inline void pci_write_bits32(struct pci_dev *pdev, int offset, | 779 | static inline void pci_write_bits32(struct pci_dev *pdev, int offset, |
| 772 | u32 value, u32 mask) | 780 | u32 value, u32 mask) |
| 773 | { | 781 | { |
| 774 | if (mask != 0xffff) { | 782 | if (mask != 0xffffffff) { |
| 775 | u32 buf; | 783 | u32 buf; |
| 776 | 784 | ||
| 777 | pci_read_config_dword(pdev, offset, &buf); | 785 | pci_read_config_dword(pdev, offset, &buf); |