From: Joe Perches <joe@perches.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
b43-dev@lists.infradead.org, "Michael Büsch" <mb@bu3sch.de>,
"Larry Finger" <Larry.Finger@lwfinger.net>,
"George Kashperko" <george@znau.edu.ua>,
"Arend van Spriel" <arend@broadcom.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Russell King" <rmk@arm.linux.org.uk>,
"Arnd Bergmann" <arnd@arndb.de>,
"Andy Botting" <andy@andybotting.com>,
linuxdriverproject <devel@linuxdriverproject.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH V3] axi: add AXI bus driver
Date: Mon, 11 Apr 2011 16:44:32 -0700 [thread overview]
Message-ID: <1302565473.2163.28.camel@Joe-Laptop> (raw)
In-Reply-To: <1302557114-7880-1-git-send-email-zajec5@gmail.com>
On Mon, 2011-04-11 at 23:25 +0200, Rafał Miłecki wrote:
> Proper pr_* usage
Just trivia...
> diff --git a/drivers/axi/axi_private.h b/drivers/axi/axi_private.h
> new file mode 100644
> index 0000000..1c995f5
> --- /dev/null
> +++ b/drivers/axi/axi_private.h
> @@ -0,0 +1,45 @@
> +#ifndef LINUX_AXI_PRIVATE_H_
> +#define LINUX_AXI_PRIVATE_H_
> +
> +#include <linux/axi/axi.h>
> +#include <linux/device.h>
> +#include <linux/list.h>
> +#include <linux/types.h>
> +#include <linux/spinlock.h>
> +#include <linux/pci.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/types.h>
Duplicate include of linux/types.h
> +
> +#ifndef pr_fmt
> +#define pr_fmt(fmt) "axi: " fmt
> +#endif
This needs to be before any include that includes kernel.h
and I believe
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
is the same output and more normally used style.
Right now, you've got no prefix for any format string.
Try '$ strings built-in.o | grep "^<.>"' and see.
> +void axi_pmu_workarounds(struct axi_drv_cc *cc)
> +{
> + struct axi_bus *bus = cc->core->bus;
> +
> + switch (bus->chipinfo.id) {
> + case 0x4313:
Probably better to use defines.
> + axi_chipco_chipctl_maskset(cc, 0, ~0, 0x7);
> + break;
> + case 0x4331:
> + axi_err("Enabling Ext PA lines not implemented\n");
You should still remove axi_err/info/debug and
just use pr_<level>.
> + break;
> + case 43224:
> + if (bus->chipinfo.rev == 0) {
> + axi_err("Workarounds for 43224 rev 0 not fully "
> + "implemented\n");
I suggest you don't bother splitting and wrapping
format strings > 80 chars. Splitting makes grep
a bit harder.
pr_err("Workarounds for 43224 rev 0 not fully implemented\n");
Some hex and some decimal cases?
Maybe some comments for that?
WARNING: multiple messages have this Message-ID (diff)
From: joe@perches.com (Joe Perches)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH V3] axi: add AXI bus driver
Date: Mon, 11 Apr 2011 16:44:32 -0700 [thread overview]
Message-ID: <1302565473.2163.28.camel@Joe-Laptop> (raw)
In-Reply-To: <1302557114-7880-1-git-send-email-zajec5@gmail.com>
On Mon, 2011-04-11 at 23:25 +0200, Rafa? Mi?ecki wrote:
> Proper pr_* usage
Just trivia...
> diff --git a/drivers/axi/axi_private.h b/drivers/axi/axi_private.h
> new file mode 100644
> index 0000000..1c995f5
> --- /dev/null
> +++ b/drivers/axi/axi_private.h
> @@ -0,0 +1,45 @@
> +#ifndef LINUX_AXI_PRIVATE_H_
> +#define LINUX_AXI_PRIVATE_H_
> +
> +#include <linux/axi/axi.h>
> +#include <linux/device.h>
> +#include <linux/list.h>
> +#include <linux/types.h>
> +#include <linux/spinlock.h>
> +#include <linux/pci.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/types.h>
Duplicate include of linux/types.h
> +
> +#ifndef pr_fmt
> +#define pr_fmt(fmt) "axi: " fmt
> +#endif
This needs to be before any include that includes kernel.h
and I believe
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
is the same output and more normally used style.
Right now, you've got no prefix for any format string.
Try '$ strings built-in.o | grep "^<.>"' and see.
> +void axi_pmu_workarounds(struct axi_drv_cc *cc)
> +{
> + struct axi_bus *bus = cc->core->bus;
> +
> + switch (bus->chipinfo.id) {
> + case 0x4313:
Probably better to use defines.
> + axi_chipco_chipctl_maskset(cc, 0, ~0, 0x7);
> + break;
> + case 0x4331:
> + axi_err("Enabling Ext PA lines not implemented\n");
You should still remove axi_err/info/debug and
just use pr_<level>.
> + break;
> + case 43224:
> + if (bus->chipinfo.rev == 0) {
> + axi_err("Workarounds for 43224 rev 0 not fully "
> + "implemented\n");
I suggest you don't bother splitting and wrapping
format strings > 80 chars. Splitting makes grep
a bit harder.
pr_err("Workarounds for 43224 rev 0 not fully implemented\n");
Some hex and some decimal cases?
Maybe some comments for that?
next prev parent reply other threads:[~2011-04-11 23:44 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 21:25 [RFC][PATCH V3] axi: add AXI bus driver Rafał Miłecki
2011-07-08 18:29 ` Rafał Miłecki
2011-04-11 21:25 ` Rafał Miłecki
2011-04-11 21:06 ` Greg KH
2011-04-11 21:06 ` Greg KH
2011-04-11 21:19 ` Rafał Miłecki
2011-04-11 21:19 ` Rafał Miłecki
2011-04-11 21:19 ` Rafał Miłecki
2011-04-11 21:25 ` Greg KH
2011-04-11 21:25 ` Greg KH
2011-04-11 21:36 ` Rafał Miłecki
2011-04-11 21:36 ` Rafał Miłecki
2011-04-11 21:36 ` Rafał Miłecki
2011-04-11 21:56 ` Greg KH
2011-04-11 21:56 ` Greg KH
2011-04-11 22:12 ` Rafał Miłecki
2011-04-11 22:12 ` Rafał Miłecki
2011-04-11 22:12 ` Rafał Miłecki
2011-04-11 22:36 ` Greg KH
2011-04-11 22:36 ` Greg KH
2011-04-11 22:45 ` Rafał Miłecki
2011-04-11 22:45 ` Rafał Miłecki
2011-04-11 22:45 ` Rafał Miłecki
2011-04-11 23:35 ` Greg KH
2011-04-11 23:35 ` Greg KH
2011-04-12 5:41 ` Rafał Miłecki
2011-04-12 5:41 ` Rafał Miłecki
2011-04-12 5:41 ` Rafał Miłecki
2011-04-12 11:40 ` Rafał Miłecki
2011-04-12 11:40 ` Rafał Miłecki
2011-04-12 11:40 ` Rafał Miłecki
2011-04-12 15:16 ` Greg KH
2011-04-12 15:16 ` Greg KH
2011-04-12 15:14 ` Greg KH
2011-04-12 15:14 ` Greg KH
2011-04-12 15:25 ` Rafał Miłecki
2011-04-12 15:25 ` Rafał Miłecki
2011-04-12 15:25 ` Rafał Miłecki
2011-04-11 21:07 ` Greg KH
2011-04-11 21:07 ` Greg KH
2011-04-11 23:44 ` Joe Perches [this message]
2011-04-11 23:44 ` Joe Perches
2011-04-12 5:52 ` Rafał Miłecki
2011-04-12 5:52 ` Rafał Miłecki
2011-04-12 5:52 ` Rafał Miłecki
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=1302565473.2163.28.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=Larry.Finger@lwfinger.net \
--cc=andy@andybotting.com \
--cc=arend@broadcom.com \
--cc=arnd@arndb.de \
--cc=b43-dev@lists.infradead.org \
--cc=devel@linuxdriverproject.org \
--cc=george@znau.edu.ua \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=rmk@arm.linux.org.uk \
--cc=zajec5@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.