Is smoking marijuana a misdemeanor or a felony?

Pending if your caught with possesion or intent to sell, if you just get caught with a little weed its a misdemeanor. If the 5-0 finds a lot of weed and perhaps a few baggies they might try to give you intent to sell which is a felony