Re: include/linux/major.h and drivers/char/sysrq.c

From: Jan Dvorak (johnydog@go.cz)
Date: Fri Aug 11 2000 - 07:57:21 EST


On Thu, Aug 10, 2000 at 05:30:05PM -0700, David Ford wrote:
> Andre Hedrick wrote:
>
> > if (scsi_blk_major(major) || ide_blk_major(major))
> > return 1;
> > else
> > return 0;
>
> how about:
>
> return (scsi_blk_major(major) || ide_blk_major(major));
>

i done this now as macro, and i came to other def. Could it be
useful for someone to have this in major.h?:

static __inline__ int disk_blk_major(int m) {
                return (SCSI_BLK_MAJOR(m)||IDE_BLK_MAJOR(m));
}

i personally think that not, coz i don't see such tests anywhere in the
code, but what if ...

However, i'll do some if-it-can-even-compile tests on my patches, and if
it'll works i'll post final patch against test6.

Jan Dvorak <johnydog@go.cz>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:24 EST