Re: [PATCH ] scsi-misc-2.6: File System going into read-only mode

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

 



James Bottomley wrote:
> On Tue, 2009-11-03 at 15:47 +0530, Penchala Narasimha Reddy Chilakala,
> TLS-Chennai wrote:
>> This is all spurious bracket addition; it doesn't really have any place
>> in a code fix.
>>
>> <Narasimha Reddy>: As we know that if we do not keep bracket
>> appropriately, some times compilers will behave differently and it may
>> use different instructions and evaluate differently. So to avoid those
>> kinds of issues, we added those brackets. It is not a code fix, but it
>> is compiler fix (compilers should not interpret differently). If
>> compiler interprets differently then the logic may behave differently
>> as against to your intentional behavior.  I hope you agree with me.
> 
> Not really ... in principle we try to fix the compilers rather than work
> around their bugs.  Which compilers are exhibiting the problem? ...
> because they'll affect more than just aacraid.

Huh?

Expression before the patch:	a > (b & c) ? d : e
Expression after the patch:	a > ((b & c) ? d : e)

That's clearly different; a C compiler would have to be extremely buggy
to get such expressions wrong.  So which is really the right one; before
or after?

Before:

if (upsg->sg[i].count > (dev->adapter_info.options & AAC_OPT_NEW_COMM)
        ? (dev->scsi_host_ptr->max_sectors << 9) : 65536) {

After:

if (upsg->sg[i].count > (
          (dev->adapter_info.options & AAC_OPT_NEW_COMM)
                 ? (dev->scsi_host_ptr->max_sectors << 9) : 65536
    )) {
-- 
Stefan Richter
-=====-==--= =-== --=--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux