From: Joe Perches <joe@perches.com>
To: "Rustad, Mark D" <mark.d.rustad@intel.com>
Cc: Samuel Ortiz <samuel@sortiz.org>,
"David S. Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] irda: Convert function pointer arrays and uses to const
Date: Wed, 10 Dec 2014 11:38:03 -0800 [thread overview]
Message-ID: <1418240283.18092.15.camel@perches.com> (raw)
In-Reply-To: <3333024A-D21C-41E2-80ED-7590CE6E9BD1@intel.com>
On Wed, 2014-12-10 at 19:32 +0000, Rustad, Mark D wrote:
> On Dec 10, 2014, at 10:28 AM, Joe Perches <joe@perches.com> wrote:
[]
> > diff --git a/include/net/irda/parameters.h b/include/net/irda/parameters.h
[]
> > typedef struct {
> > - pi_minor_info_t *pi_minor_call_table;
> > + const pi_minor_info_t *pi_minor_call_table;
>
> Might you want to go a little further and make it:
> const pi_minor_into_t * const pi_minor_call_table;
> so that the pointer itself is also constant? That could apply to some others below as well.
>
> > int len;
> > } pi_major_info_t;
I don't think that's necessary as all the pi_major_info_t uses
become const and this is a typedef, but if you want to, go ahead.
next prev parent reply other threads:[~2014-12-10 19:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 18:28 [PATCH] irda: Convert function pointer arrays and uses to const Joe Perches
2014-12-10 19:32 ` Rustad, Mark D
2014-12-10 19:38 ` Joe Perches [this message]
2014-12-10 20:33 ` David Miller
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=1418240283.18092.15.camel@perches.com \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.d.rustad@intel.com \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.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