Re: [PATCH 2/5] [RESEND] x86: avoid unneeded __div64_32 function definition

From: Maciej W. Rozycki
Date: Mon Aug 07 2023 - 17:58:32 EST


On Mon, 7 Aug 2023, Borislav Petkov wrote:

> On Mon, Aug 07, 2023 at 09:37:00PM +0100, Maciej W. Rozycki wrote:
> > Otherwise you risk `__div64_32(n, base)' getting expanded to `(n, base)',
>
> You mean in the very obscure case of a 32-bit kernel where they don't call
> do_div() but call this low level function?
>
> I'd say if they can't be bothered to even grep the tree for the right usage,
> they deserve both pieces... :)

Well, people do make mistakes and life is tough enough already, so why
make it tougher when we can have a free sanity check? I mean there's
hardly any cost from the extra characters added and it can save someone
hassle with debugging, which is always tough by definition.

I've suffered from silly mistakes myself on many occasions, possibly from
being distracted in the middle of doing something, and while I figured
things out eventually, it often cost me a day of effort or so wasted in
chasing them.

Maciej