On 5/24/19 11:47 AM, Douglas Gilbert wrote: > static int > sg_open(struct inode *inode, struct file *filp) > { > - int dev = iminor(inode); > - int flags = filp->f_flags; > + bool o_excl; > + int min_dev = iminor(inode); > + int op_flags = filp->f_flags; > struct request_queue *q; > - Sg_device *sdp; > - Sg_fd *sfp; > + struct sg_device *sdp; > + struct sg_fd *sfp; > int retval; > > nonseekable_open(inode, filp); > - if ((flags & O_EXCL) && (O_RDONLY == (flags & O_ACCMODE))) > + o_excl = !!(op_flags & O_EXCL); > + if (o_excl && ((op_flags & O_ACCMODE) == O_RDONLY)) > return -EPERM; /* Can't lock it with read only access */ One change per patch please. The introduction of the o_excl variable is not related to the removal of the typedefs. I think this patch should be split. Thanks, Bart.