From patchwork Tue Oct 19 05:24:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changli Gao X-Patchwork-Id: 68271 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id ABED3B70D5 for ; Tue, 19 Oct 2010 16:24:25 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932070Ab0JSFYV (ORCPT ); Tue, 19 Oct 2010 01:24:21 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:55252 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388Ab0JSFYU (ORCPT ); Tue, 19 Oct 2010 01:24:20 -0400 Received: by gxk21 with SMTP id 21so513583gxk.19 for ; Mon, 18 Oct 2010 22:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=8vJT3WgyPOHZz197RS0moCcGWhl9JanFyarritvPm2k=; b=gpDM5X8HvzRYFV1bWivNZdP7V9jnlbBKvawq/IeDgqKfuMA+9xLYxQZ6SFpcGrj13C BNVeU3JpnKCq0dcXUEEI35VfweqBnQoG1krAO23NjtEsJMNnXoblThncxwcxyQtRR/yG JMF2XCOkSWHtoF7RKlXASTg2k6uFJUjPaM4ok= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=uinzmQii4Me9vXFy78jfgkOqxtVoWMn+xz4vEib5YPuCOn3gx4Xw5R4wWHjih9uOnI n4xMZ+5Dfb1ngQDz7faS6hPJOz2uxHX29Fa51pjmkJezvJ38yutVTOA76ysGj7jfOOtk CX3wcPK2M67VPYgMuBgNYxdQHClwiuofb33M8= Received: by 10.90.96.12 with SMTP id t12mr1875796agb.203.1287465859980; Mon, 18 Oct 2010 22:24:19 -0700 (PDT) Received: from localhost.localdomain ([221.239.34.230]) by mx.google.com with ESMTPS id x42sm11206679yhc.1.2010.10.18.22.24.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Oct 2010 22:24:18 -0700 (PDT) From: Changli Gao To: "David S. Miller" Cc: netdev@vger.kernel.org, Changli Gao Subject: [PATCH] net: unix: make some variables constant Date: Tue, 19 Oct 2010 13:24:02 +0800 Message-Id: <1287465842-2958-1-git-send-email-xiaosuo@gmail.com> X-Mailer: git-send-email 1.7.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org And since ctl_table.data is initialized later, we don't need to initialize the data member of the template variable unix_table. Signed-off-by: Changli Gao --- net/unix/sysctl_net_unix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c index 397cffe..1114ccc 100644 --- a/net/unix/sysctl_net_unix.c +++ b/net/unix/sysctl_net_unix.c @@ -15,10 +15,9 @@ #include -static ctl_table unix_table[] = { +const static ctl_table unix_table[] = { { .procname = "max_dgram_qlen", - .data = &init_net.unx.sysctl_max_dgram_qlen, .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec @@ -26,7 +25,7 @@ static ctl_table unix_table[] = { { } }; -static struct ctl_path unix_path[] = { +const static struct ctl_path unix_path[] = { { .procname = "net", }, { .procname = "unix", }, { },