[KJ] [PATCH] MIN/MAX cleanup

Alexey Dobriyan adobriyan at gmail.com
Fri Sep 8 10:08:10 PDT 2006


On Fri, Sep 08, 2006 at 09:49:01AM +0200, Henk Vergonet wrote:
> On Thu, Sep 07, 2006 at 05:52:21PM +0530, Amol Lad wrote:
> > Cleanups done to use min/max macros from kernel.h. Handcrafted MIN/MAX
> > macros in some drivers are changed to use macros from kernel.h
> >
> > +      clength = MIN((word)(270-length),(word) (X[i].PLength-this->XOffset));
>
> What is the rationale behind all those type casts?

The rationale is to shut up warning so potential integer overflow won't
disturb developer's sleep.




More information about the Kernel-janitors mailing list