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
14811481
14821482 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
14831483 return 0;
1484− ms = __nr_to_section(pfn_to_section_nr(pfn));
1484+ ms = __pfn_to_section(pfn);
14851485 if (!valid_section(ms))
14861486 return 0;
14871487 /*
@@ -1496,7 +1496,7 @@ static inline int pfn_in_present_section(unsigned long pfn) · 8 unmodified lines
14961496 {
14971497 if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
14981498 return 0;
1499− return present_section(__nr_to_section(pfn_to_section_nr(pfn)));
1499+ return present_section(__pfn_to_section(pfn));
15001500 }
15011501
15021502 static 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