First of all, you're not bursting into someone's office. Second of all, if you burst into my office while I'm working and start making smalltalk, I will, depending on my mood and whether or not I've previously judged you to be a useless person, either immediately ask you to get to the point, or throw you out.
Stop wasting my time. If sending "Hi" makes you feel better, fine, but the substance had better be on my screen by the time I look at the window, or you've wasted my time.
The same way you know he's not at his desk when you type that useless "Hi": you don't get a reply. How long do you wait after typing a useless "Hi"? Wait that same amount of time after typing your relevant question.
Stop wasting my time. If sending "Hi" makes you feel better, fine, but the substance had better be on my screen by the time I look at the window, or you've wasted my time.