lkml.org 
[lkml]   [2017]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] sctp: make array sctp_sched_ops static
On Wed, Oct 11, 2017 at 03:44:50AM -0700, Joe Perches wrote:
> On Wed, 2017-10-11 at 11:17 +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The array sctp_sched_ops is local to the source and
> > does not need to be in global scope, so make it static.
> >
> > Cleans up sparse warning:
> > symbol 'sctp_sched_ops' was not declared. Should it be static?
> >
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> > net/sctp/stream_sched.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/sctp/stream_sched.c b/net/sctp/stream_sched.c
> > index 03513a9fa110..0b83ec51e43b 100644
> > --- a/net/sctp/stream_sched.c
> > +++ b/net/sctp/stream_sched.c
> > @@ -124,7 +124,7 @@ static struct sctp_sched_ops sctp_sched_fcfs = {
> > extern struct sctp_sched_ops sctp_sched_prio;
> > extern struct sctp_sched_ops sctp_sched_rr;
> >
> > -struct sctp_sched_ops *sctp_sched_ops[] = {
> > +static struct sctp_sched_ops *sctp_sched_ops[] = {
> > &sctp_sched_fcfs,
> > &sctp_sched_prio,
> > &sctp_sched_rr,
>
> Perhaps these should also be const to move more data to text

Yes. There are no plans on supporting any sort of dynamic updates on
this, at least for now.

Marcelo

\
 
 \ /
  Last update: 2017-10-11 23:25    [W:0.065 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site