History

mm: use __pfn_to_section() instead of open coding it

It is defined in the same file just a few lines above.

Rolf Eike Beer committed 5 years ago

Commit f1dc0db1 parent 78660761 file · +2 −2Browse files

Unified · Split

include/linux/mmzone.h+2−2
@@ -1481,7 +1481,7 @@ static inline int pfn_valid(unsigned long pfn) · 1480 unmodified lines
1481 1481
1482 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)1482 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
1483 return 0;1483 return 0;
1484 ms = __nr_to_section(pfn_to_section_nr(pfn));1484 ms = __pfn_to_section(pfn);
1485 if (!valid_section(ms))1485 if (!valid_section(ms))
1486 return 0;1486 return 0;
1487 /*1487 /*
@@ -1496,7 +1496,7 @@ static inline int pfn_in_present_section(unsigned long pfn) · 8 unmodified lines
1496{1496{
1497 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)1497 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
1498 return 0;1498 return 0;
1499 return present_section(__nr_to_section(pfn_to_section_nr(pfn)));1499 return present_section(__pfn_to_section(pfn));
1500}1500}
1501 1501
1502static inline unsigned long next_present_section_nr(unsigned long section_nr)1502static inline unsigned long next_present_section_nr(unsigned long section_nr)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t