Jeff Garzik wrote: > Aubin LaBrosse wrote: >> Replace assert() with WARN_ON in drivers/scsi/libata-core.c >> >> This is my first patch to the kernel - this work was suggested by >> Jeff Garzik as a janitorial task for libata. If I could get some >> feedback letting me know that this is the correct format and my tools >> are setup right, I'll do the rest of these. >> >> Signed-off-by: Aubin LaBrosse >> --- >> >> drivers/scsi/libata-core.c | 46 >> ++++++++++++++++++++++---------------------- >> 1 files changed, 23 insertions(+), 23 deletions(-) > > Someone already beat you to it :) > > I looked over your patch anyway. It looks acceptable, except we avoid > the '~' style in such tests: > > + WARN_ON(qc == NULL); /* ata_qc_from_tag _might_ return NULL */ > + WARN_ON(~qc->flags & ATA_QCFLAG_ACTIVE); > > Jeff > So what would be the proper way to invert that type of test? (!(field & flag)) will do the same, right? is that preferred for anything other than aesthetic reasons? (which is a fine reason to prefer something, of course, I'm just wondering if there's any other reasons, performance or otherwise -aubin