Lady Aisha (may Allah be pleased with her) narrates: A woman came to the Messenger of Allah (peace and blessings be upon him) and said: A child was born to me, I named him Muhammad and gave him the kunyah (patronymic) Abu al-Qasim. Then I found out that you dislike this. So the Prophet (peace and blessings be upon him) said: "Who has made my name lawful and my kunyah unlawful?" Or he said: "Who has made my kunyah unlawful and my name lawful?"
Related hadith on this topic