Linux wireless drivers development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Solomon Peachy <pizza@shaftnet.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 01/14] cw1200: v4: low-level hardware I/O functions
Date: Fri, 08 Feb 2013 17:15:59 -0800	[thread overview]
Message-ID: <1360372559.13487.14.camel@joe-AO722> (raw)
In-Reply-To: <1360355527-12159-2-git-send-email-pizza@shaftnet.org>

On Fri, 2013-02-08 at 15:31 -0500, Solomon Peachy wrote:
> Signed-off-by: Solomon Peachy <pizza@shaftnet.org>

Could you please run your patches through
scripts/checkpatch.pl --strict

> diff --git a/drivers/net/wireless/cw1200/hwio.c b/drivers/net/wireless/cw1200/hwio.c

> +static int __cw1200_reg_write(struct cw1200_common *priv, u16 addr,
> +				const void *buf, size_t buf_len, int buf_id)
> +{
> +	u16 addr_sdio;
> +	u32 sdio_reg_addr_17bit ;

Odd layout with space before semi

[]

> +int cw1200_data_read(struct cw1200_common *priv, void *buf, size_t buf_len)
> +{
> +	int ret, retry = 1;
> +	priv->sbus_ops->lock(priv->sbus_priv);
> +	{

> +		int buf_id_rx = priv->buf_id_rx;

declare buf_id_rx at the top of the function please
and avoid the extra indentation level.

> +		while (retry <= MAX_RETRY) {
> +			ret = __cw1200_reg_read(priv,
> +					ST90TDS_IN_OUT_QUEUE_REG_ID, buf,
> +					buf_len, buf_id_rx + 1);
> +			if (!ret) {
> +				buf_id_rx = (buf_id_rx + 1) & 3;
> +				priv->buf_id_rx = buf_id_rx;
> +				break;
> +			} else {
> +				retry++;
> +				mdelay(1);
> +				pr_err("%s,error :[%d]\n",
> +						__func__, ret);

This would fit on a single line if indented correctly.

If you are always going to use "%s", __func__
you should probably instead add

#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__

before any include and remove all the "%s"/__func__
uses from the logging messages.

[]

> +int cw1200_apb_write(struct cw1200_common *priv, u32 addr, const void *buf,
> +			size_t buf_len)
> +{
> +	int ret;
> +
> +	if ((buf_len / 2) >= 0x1000) {
> +		pr_err("%s: Can't wrire more than 0xfff words.\n",
> +		       __func__);

write

Consider using netdev_err instead of pr_err

etc.



  reply	other threads:[~2013-02-09  1:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 20:31 RFCv4: ST-E CW1100/1200 WLAN driver Solomon Peachy
2013-02-08 20:31 ` [PATCH 01/14] cw1200: v4: low-level hardware I/O functions Solomon Peachy
2013-02-09  1:15   ` Joe Perches [this message]
2013-02-11 18:53     ` Solomon Peachy
2013-02-11 19:01       ` Joe Perches
2013-02-11 19:25         ` Solomon Peachy
2013-02-12 13:35         ` Kalle Valo
2013-02-12 14:40           ` Joe Perches
2013-02-11 19:07     ` Solomon Peachy
2013-02-11 19:29       ` [PATCH] scripts: Remove Lindent and suggestions to use it Joe Perches
2013-02-08 20:31 ` [PATCH 02/14] cw1200: v4: Internal TX queue handling and tracking Solomon Peachy
2013-02-08 20:31 ` [PATCH 03/14] cw1200: v4: Scanning implementation Solomon Peachy
2013-02-08 20:31 ` [PATCH 04/14] cw1200: v4: Power Management (WoWLAN) Solomon Peachy
2013-02-08 20:31 ` [PATCH 05/14] cw1200: v4: Firmware loading Solomon Peachy
2013-02-08 20:31 ` [PATCH 06/14] cw1200: v4: Debugging hooks and test tool support Solomon Peachy
2013-02-08 20:32 ` [PATCH 07/14] cw1200: v4: mac80211 API implementation Solomon Peachy
2013-02-08 20:32 ` [PATCH 08/14] cw1200: v4: Packet TX/RX Solomon Peachy
2013-02-08 20:32 ` [PATCH 09/14] cw1200: v4: WSM (host-firmware) interface Solomon Peachy
2013-02-08 20:32 ` [PATCH 10/14] cw1200: v4: Main processing loop Solomon Peachy
2013-02-08 20:32 ` [PATCH 11/14] cw1200: v4: common state, definitions, and registration handling Solomon Peachy
2013-02-08 20:32 ` [PATCH 12/14] cw1200: v4: SDIO and SPI glue code and platform definitions Solomon Peachy
2013-02-08 20:32 ` [PATCH 13/14] cw1200: v4: Kbuild integration Solomon Peachy
2013-02-08 20:32 ` [PATCH 14/14] cw1200: v4: Add to drivers/net/wireless kbuild, plus MAINTAINERS entry Solomon Peachy
2013-02-08 20:36 ` RFCv4: ST-E CW1100/1200 WLAN driver Johannes Berg
2013-02-14 15:58   ` Solomon Peachy
2013-03-20  8:10     ` Bartosz Markowski
2013-03-20 11:53       ` Solomon Peachy

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=1360372559.13487.14.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pizza@shaftnet.org \
    /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