R.W.
I have seen kids do things like have their hands in their pants, or their armpits and then smell them---this is obviously a problem habit.
However, if he just likes smelling things in general, and maybe his hands smell like plants, or dirt, or food and he likes that...then I would just make sure he has good enough hygiene for his health, and that he understands that others may see this habit as strange and gross.