I know there exists already "suppressing a smile" or "stifling a smile", but I feel that those phrases imply a lack of a smile. In this situation, something is funny, but the character is trying to pretend that it is not in an almost sarcastic/playful manner. A more visual description: pursed lips in a smile, with a scrunched nose.
Concision sacrifices clarity.
Or, to be more clear, using an obscure phrase or adjective is likely to leave the reader unsure of your intent, trying to parse what you mean. You are better off being clear with more words.
People that read for fun don't mind reading.
So this might work:
Trying unsuccessfully to stifle a smile, with tightly compressed lips and a sparkle of laughter in his eyes.
Readers are not trying to get through your story as quickly as possible. As a writer, your job is to assist your reader's imagination, so they see the details you see. As Einstein said about scientific explanations, they should be made as simple as possible, but not simpler.
This applies here. Avoid redundancy, find the most economical and poetic way to convey the most important defining details of the image in your mind, but not at the expense of failing to convey those details.
Write it long, and then find ways to trim it, excise redundancy, and rearrange it to give it more power. Make different word choices, or sentence structures. But don't sacrifice the imagery. Readers don't mind reading.
If you want something like "suppressing a smile" but making it clear that the smile is still evident, you could use "half-suppressing a smile", "attempting to suppress a smile" or even "failing to suppress a smile". You could even follow the example of Conan Doyle and have your character "fail to entirely suppress a smile".
Depending on what you really intend here, you could also describe it more visually. How would this mock-seriousness appear to the other characters? Perhaps some vestige or secondary expression gives the game away? For example,
"She kept her tone serious, but she couldn't stop the corners of her mouth turning up"
"His face was impassive, but his eyes twinkled with amusement"
Deadpan, dry humour, or dry-wit humour is the deliberate display of emotional neutrality or no emotion, commonly as a form of comedic delivery to contrast with the ridiculousness or absurdity of the subject matter. The delivery is meant to be blunt, ironic, laconic, or apparently unintentional.
The idiom is "keeping a straight face". Variants are common such as "kept a straight face" or "with a straight face". A dictionary link: to manage to stop yourself from smiling or laughing
It's not simply "not smiling". It's about visibly trying not to smile. This page about keeping a straight face has common stuff: slowly taking a deep breath, pursing lips, jaw clenching, check biting, a hand over the mouth, faking a cough, or looking at the floor. "Brick struggled to keep a straight face" lets us know we can see him doing that sort of thing.
"Straight" can be a problem word, meaning not gay. But I think we're safe here: the "straight" part is probably about managing to keep one's mouth in a straight line.
It comes from theatre and stage when the worst thing that could happen in the middle of a serious scene was that the corpse got a fit of the giggles. It implies ultimate failure to suppress the giggles rather than actual success.
For example, the guards in the Biggus Dickus scene are corpsing.
It's also probably not the word you want.
On Saturday Night Live it’s called “breaking”, as in “breaking character.”