Re: [PATCH] libfs: fix implicitly cast in simple_attr_write_xsigned()

From: Al Viro
Date: Wed May 15 2024 - 12:01:05 EST


On Wed, May 15, 2024 at 03:17:25PM +0000, Jiasheng Jiang wrote:
> Return 0 to indicate failure and return "len" to indicate success.
> It was hard to distinguish success or failure if "len" equals the error
> code after the implicit cast.
> Moreover, eliminating implicit cast is a better practice.

According to whom?

Merits of your ex cathedra claims aside, you do realize that functions
have calling conventions because they are, well, called, right?
And changing the value returned in such and such case should be
accompanied with the corresponding change in the _callers_.

Al, wondering if somebody had decided to play with LLM...