devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tony Huang <tonyhuang.sunplus@gmail.com>
Cc: robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, derek.kiernan@xilinx.com,
	dragan.cvetic@xilinx.com, arnd@arndb.de, wells.lu@sunplus.com,
	tony.huang@sunplus.com
Subject: Re: [PATCH v3 2/2] misc: Add iop driver for Sunplus SP7021
Date: Thu, 9 Dec 2021 11:10:51 +0100	[thread overview]
Message-ID: <YbHWKx6AU4z/TJS1@kroah.com> (raw)
In-Reply-To: <bc15d5e8d7a5ec96582799fe513de4ace6fd4b8b.1639039163.git.tonyhuang.sunplus@gmail.com>

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

  parent reply	other threads:[~2021-12-09 10:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  8:58 [PATCH v3 0/2] Add iop driver for Sunplus SP7021 Tony Huang
2021-12-09  8:58 ` [PATCH v3 1/2] dt-binding: misc: Add iop yaml file " Tony Huang
2021-12-14 19:32   ` Rob Herring
2021-12-09  8:58 ` [PATCH v3 2/2] misc: Add iop driver " Tony Huang
2021-12-09  9:50   ` Arnd Bergmann
2021-12-10  1:30     ` Tony Huang 黃懷厚
2021-12-17 15:16     ` Tony Huang 黃懷厚
2021-12-17 15:31       ` gregkh
2021-12-18 12:53         ` Tony Huang 黃懷厚
2021-12-18 13:05           ` gregkh
2021-12-18 17:30             ` Tony Huang 黃懷厚
2021-12-17 16:09       ` Arnd Bergmann
2021-12-09 10:10   ` Greg KH [this message]
2021-12-10  1:19     ` Tony Huang 黃懷厚

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbHWKx6AU4z/TJS1@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=derek.kiernan@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@xilinx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tony.huang@sunplus.com \
    --cc=tonyhuang.sunplus@gmail.com \
    --cc=wells.lu@sunplus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).