From: Frank Seidel <fseidel@suse.de>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
jirislaby@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nozomi: constify driver
Date: Fri, 1 Feb 2008 07:25:05 +0100 [thread overview]
Message-ID: <200802010725.05421.fseidel@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0801312238170.4864@fbirervta.pbzchgretzou.qr>
On Thursday 31 January 2008 22:39, Jan Engelhardt wrote:
> On Jan 31 2008 22:10, Frank Seidel wrote:
> >(Re: [PATCH 012/196 ver2] nozomi driver) and is a rework
> >of the nozomi constify patch from Jan Engelhardt.
>
> It's hard to find what you actually reworked...
No, just use interdiff and its easy :-) .. and btw
I didn't say i did a full rewrite ;-)
> >-static struct pci_device_id nozomi_pci_tbl[] = {
> >+static const struct pci_device_id nozomi_pci_tbl[] __devinitdata = {
>
> This is bogus.
In what way? First i tested this patch well (compiling and
usage doesn't break a single thing) and second this (static
const struct pci_device_id .. __devinitdata) can be found in many
drivers.
So, please explain why you think so.
Thanks,
Frank
P.S.: btw this is the interdiff. Yes, its not big, but even
then why not combine it with yours ;-)
---
diff -u b/drivers/char/nozomi.c b/drivers/char/nozomi.c
--- b/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -395,7 +395,7 @@
} __attribute__ ((packed));
/* Global variables */
-static struct pci_device_id nozomi_pci_tbl[] __devinitdata = {
+static const struct pci_device_id nozomi_pci_tbl[] __devinitdata = {
{PCI_DEVICE(VENDOR1, DEVICE1)},
{},
};
@@ -778,13 +778,13 @@
* Return 1 - send buffer to card and ack.
* Return 0 - don't ack, don't send buffer to card.
*/
-static int send_data(enum port_type index, struct nozomi *dc)
+static int send_data(enum port_type index, const struct nozomi *dc)
{
u32 size = 0;
const struct port *port = &dc->port[index];
- u8 toggle = port->toggle_ul;
+ const u8 toggle = port->toggle_ul;
void __iomem *addr = port->ul_addr[toggle];
- u32 ul_size = port->ul_size[toggle];
+ const u32 ul_size = port->ul_size[toggle];
struct tty_struct *tty = port->tty;
/* Get data from tty and place in buf for now */
@@ -1732,7 +1732,7 @@
static int ntty_cflags_changed(struct port *port, unsigned long flags,
struct async_icount *cprev)
{
- struct async_icount cnow = port->tty_icount;
+ const struct async_icount cnow = port->tty_icount;
int ret;
ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) ||
@@ -1747,7 +1747,7 @@
static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp)
{
- struct async_icount cnow = port->tty_icount;
+ const struct async_icount cnow = port->tty_icount;
struct serial_icounter_struct icount;
icount.cts = cnow.cts;
@@ -1858,7 +1858,7 @@
return rval;
}
-static struct tty_operations tty_ops = {
+static const struct tty_operations tty_ops = {
.ioctl = ntty_ioctl,
.open = ntty_open,
.close = ntty_close,
next prev parent reply other threads:[~2008-02-01 6:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 21:10 [PATCH] nozomi: constify driver Frank Seidel
2008-01-31 21:39 ` Jan Engelhardt
2008-02-01 6:25 ` Frank Seidel [this message]
2008-02-01 7:28 ` Sam Ravnborg
2008-02-01 7:59 ` Frank Seidel
2008-02-01 8:09 ` [PATCH v2 0/3] nozomi: driver updates to current git tree Frank Seidel
2008-02-01 8:13 ` [PATCH v2 1/3] nozomi: minor cleanups (already in gregkh-2.6) Frank Seidel
2008-02-01 8:13 ` [PATCH v2 2/3] nozomi: constify driver Frank Seidel
2008-02-01 8:14 ` [PATCH v2 3/3] nozomi: finish constification Frank Seidel
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=200802010725.05421.fseidel@suse.de \
--to=fseidel@suse.de \
--cc=gregkh@suse.de \
--cc=jengelh@computergmbh.de \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.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 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.