Re: [PATCH 1/3] mfd: Add realtek USB card reader driver

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

 



On Tue, Jan 14, 2014 at 04:46:34PM +0300, Dan Carpenter wrote:
> [ Sorry, I am coming down with the flu today so I'm doing dorky things
>   like reviewing review comments.  I'm not sure how coherent I am.  ]
> 
> On Tue, Jan 14, 2014 at 01:04:09PM +0000, Lee Jones wrote:
>  
> > > +static void rtsx_usb_sg_timed_out(unsigned long data)
> > > +{
> > > +	struct rtsx_ucr *ucr = (struct rtsx_ucr *)data;
> > 
> > What's going to happen when your device runs 64bit?
> > 
> 
> I'm not sure I understand what you mean here.  On linux sizeof(long) is
> always the same as sizeof(void *).
> 
> 
> > > +	if (cmd_len > IOBUF_SIZE)
> > > +		return -EINVAL;
> > > +
> > > +	if (cmd_len % 4)
> > > +		cmd_len += (4 - cmd_len % 4);
> > 
> > Please document in a comment.
> 
> There is a kernel macro for this:
> 
> 	cmd_len = ALIGN(cmd_len, 4);
> 

Btw, what's the difference between ALIGN(cmd_len, 4) and
round_up(cmd_len, 4)?  Maybe round_up() is better.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux