Re: [patch 2/2] pata_amd: fix sparse warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 29, 2008 at 9:17 AM, Jeff Garzik <jeff@xxxxxxxxxx> wrote:
...
>  > +     UT = T;
>  > +     if (clock >= 2)
>  > +             UT = T / 2;
>
>  Why assign UT twice, potentially?

This construct used in many places in the kernel because it
makes the code more readable.

"UT" is a regular "int" type and assigning it twice is ok.

e.g. from tg3_writephy():
...
        ret = -EBUSY;
        if (loops != 0)
                ret = 0;

hth,
grant
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux