On Mon, Jun 12, 2000 at 11:50:49AM -0700, Peter Blomgren wrote:
> Alan,
>
> 2.4.0-test1-ac16 does not compile since the definition of CDROM_CAN
> was removed... The following patch puts it back in:
>
> --- linux/drivers/cdrom/cdrom.c.2.4.0-test1-ac16 Mon Jun 12 11:30:10 2000
> +++ linux/drivers/cdrom/cdrom.c Mon Jun 12 11:30:53 2000
> @@ -297,6 +297,10 @@
> #define IOCTL_OUT(arg, type, out) \
> copy_to_user_ret((type *) arg, &out, sizeof out, -EFAULT)
>
> +/* The (cdo->capability & ~cdi->mask & CDC_XXX) construct was used in
> + a lot of places. This macro makes the code more clear. */
> +#define CDROM_CAN(type) (cdi->ops->capability & ~cdi->mask & type)
> +
> /* used in the audio ioctls */
> #define CHECKAUDIO if ((ret=check_for_audio_disc(cdi, cdo))) return ret
Actually to fix compiler warnings (and make it more correct, IMO), it
should be:
#define CDROM_CAN(type) (cdi->ops->capability & ~cdi->mask & (type))
^ ^
There is atleat one call to CDROM_CAN that |'s together some types, which
need to remain grouped in the macro.
Ben
-- -----------=======-=-======-=========-----------=====------------=-=------ / Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \ ` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com ' `---=========------=======-------------=-=-----=-===-======-------=--=---'- 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 : Thu Jun 15 2000 - 21:00:26 EST