Re: [RFC V2 3/6] sh/mm: Stop using pte_ERROR()

"David Hildenbrand (Arm)" <[email protected]>
Newsgroups org.kernel.vger.linux-hexagon,dev.linux.lists.loongarch,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.infradead.lists.linux-snps-arc,org.infradead.lists.linux-um,org.kernel.vger.linux-alpha,org.kernel.vger.linux-arch,org.kernel.vger.linux-csky,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k,org.kernel.vger.linux-mips,org.kernel.vger.linux-openrisc,org.kernel.vger.linux-parisc,org.kernel.vger.linux-s390,org.kernel.vger.linux-sh,org.kernel.vger.sparclinux,org.kvack.linux-mm,org.ozlabs.lists.linuxppc-dev
Message-ID <[email protected]>
>>> +}
>>> +
>>>  static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
>>>  {
>>>  	pte_t *pte;
>>>  
>>>  	pte = __get_pte_phys(addr);
>>>  	if (!pte_none(*pte)) {
>>> -		pte_ERROR(*pte);
>>> +		print_bad_pte(*pte);
>>
>> Maybe similar to my reply to patch #1, actually print something more useful than
>> just "bad pte" ? And possibly also just use ptval_to_str().
> 
> Probably #ifdef could be dropped here as ptval_to_str() should be able to
> handle pte with two unsiged long elements in there i.e pte_high, pte_low
> along with standard single unsiged long pte_low format.

Yes, that should just work and clean this up!

-- 
Cheers,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.