[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130417124734.GB5149@hmsreliant.think-freely.org>
Date: Wed, 17 Apr 2013 08:47:34 -0400
From: Neil Horman <nhorman@...driver.com>
To: Daniel Borkmann <dborkman@...hat.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-sctp@...r.kernel.org
Subject: Re: [PATCH net-next 2/9] net: sctp: sctp_inq: remove dead code
On Tue, Apr 16, 2013 at 11:07:11PM +0200, Daniel Borkmann wrote:
> sctp_inq is never kmalloced, since it's integrated into sctp_ep_common
> and only initialized from eps and assocs. Therefore, remove the dead
> code from there.
>
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
> ---
> include/net/sctp/structs.h | 2 --
> net/sctp/inqueue.c | 7 -------
> 2 files changed, 9 deletions(-)
>
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index 3c1bb8d..125a19c 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -991,8 +991,6 @@ struct sctp_inq {
> * messages.
> */
> struct work_struct immediate;
> -
> - int malloced; /* Is this structure kfree()able? */
> };
>
> void sctp_inq_init(struct sctp_inq *);
> diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
> index 2d5ad28..3221d07 100644
> --- a/net/sctp/inqueue.c
> +++ b/net/sctp/inqueue.c
> @@ -58,8 +58,6 @@ void sctp_inq_init(struct sctp_inq *queue)
>
> /* Create a task for delivering data. */
> INIT_WORK(&queue->immediate, NULL);
> -
> - queue->malloced = 0;
> }
>
> /* Release the memory associated with an SCTP inqueue. */
> @@ -80,11 +78,6 @@ void sctp_inq_free(struct sctp_inq *queue)
> sctp_chunk_free(queue->in_progress);
> queue->in_progress = NULL;
> }
> -
> - if (queue->malloced) {
> - /* Dump the master memory segment. */
> - kfree(queue);
> - }
> }
>
Acked-by: Neil Horman <nhorman@...driver.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists