lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/2] misc: Add iop driver for Sunplus SP7021
On Thu, Dec 09, 2021 at 04:58:09PM +0800, Tony Huang wrote:
> + while (1) {
> + if (p_iop_reg->iop_data7 == 0xaaaa)
> + break;
> + }

You can not create a loop that could never exit. Please fix.

Also, what prevents the compiler from optimizing this away into nothing?
This code does not look correct at all.

> +
> + writel(0xdd, &p_iop_reg->iop_data1);//8051 bin file call Ultra low function.
> + mdelay(10);
> +}
> +
> +static int sp_iop_get_normal_code(struct device *dev, struct sp_iop *iop)
> +{
> + const struct firmware *fw;
> + static const char file[] = "normal.bin";
> + unsigned int err, i;
> +
> + dev_info(dev, "normal code\n");

Please always delete your debugging code before submitting a patch.

Also, please run checkpatch.pl on your changes before submitting them.

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-12-09 11:12    [W:0.074 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site