What should I do with misdelivered mail?

If it was just put in my box by mistake (not addressed to my house) I put it back, and put the flag up, and it goes away the next day. If the address is mine, but the name isn’t, I’ll write “wrong address” on it and put it back in the box.