«كان يزور الأنصار ويسلم على صبيانهم ويمسح رءوسهم»
It was the practice of the Prophet (peace and blessings be upon him):
"He (peace and blessings be upon him) would visit the Ansar, greet their children with salam, and pass his hand over their heads."