From patchwork Thu Oct 12 12:29:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 824809 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AQdqQMrX"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yCVXX4Xjpz9t2V for ; Thu, 12 Oct 2017 23:29:32 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757169AbdJLM3T (ORCPT ); Thu, 12 Oct 2017 08:29:19 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55246 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdJLM3R (ORCPT ); Thu, 12 Oct 2017 08:29:17 -0400 Received: by mail-wm0-f68.google.com with SMTP id i124so12874578wmf.3; Thu, 12 Oct 2017 05:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=vVbcpGN/Hv6QQZNwKm63y9g+txtJbq/qa4fvL6KcvAo=; b=AQdqQMrXvpM/5eujHf3QRpY49Yabx9KqS/fpj4fE6jqkeIg/FZLLKw0Tr1cf+imXgN xM20BivCAzF1kK/nT9H/STCEc2+FzUyL+vyZS+n181Tds9eCXcTQJ/dgs1P7hLNEH2lw KXUlD/v1/8itmD8KKVkxrReFVSq8y7xpwx3dWuo/jaAVb7i5WXquvVgqbj+tH0XlCU85 LeQ+yPR+AUknpfiR6smRhPDLOxIsvdQxyOuDj6jkvlKDJAYPqpFAfSqvYBpbcM8ugOjb eCx1qIPY8m66xkBM+nMNBCRsVeFh0MOhRduy6ZwV2H+1gUNd51VLmn827xPtxqBXEgQ8 s0Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vVbcpGN/Hv6QQZNwKm63y9g+txtJbq/qa4fvL6KcvAo=; b=LV3lKEc5XYq+55LQbkYzafQf6LICvAwMleTGvYeP0lWalskwbQG8KWPFr9EUCJUaOG 0h95TsHE+Gc0UnD7FWkmcQcXnqi0onO0vfUe/L/7rMk9MX3opd5P4krbNJXM7YFmlOx3 D6uCyDPRBxKaICFP2k/ttHkmbIBD8g7lhZ11WwWfVYI3URzJYkXjb+mlOD+yEYU/alKE BAGMqDCvU7p6isBfKEhGttDzcyYG2hgOO4HfCHBK5LpkQpRNt5ugxoE1hXlHfRala1X/ 0K9Fp21ZZIlau2jQT502s4WUJWRJ4NUjMggJObX8yVMW66qw5ahQJCWdihQ5JuT8vILR IUuQ== X-Gm-Message-State: AMCzsaXwZZhjgaR3/pnRBS9SMRQGi7HiwXMkS2Ey6du79yTI8yPKKvnw xaDaDY4s7lkmhsLITMHCZns= X-Google-Smtp-Source: AOwi7QD+Y/ryZA0p9pzxsjdn+QRBTjPyC13R1y10J/lFokPjomVxI2h3T8bGjMckjgBkUCtCMpGc1Q== X-Received: by 10.28.230.216 with SMTP id e85mr2042342wmi.86.1507811356255; Thu, 12 Oct 2017 05:29:16 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id i76sm206635wmd.2.2017.10.12.05.29.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Oct 2017 05:29:15 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Thu, 12 Oct 2017 14:29:14 +0200 From: Bhumika Goyal To: julia.lawall@lip6.fr, davem@davemloft.net, akpm@linux-foundation.org, nab@linux-iscsi.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] netconsole: make config_item_type const Date: Thu, 12 Oct 2017 14:29:12 +0200 Message-Id: <1507811352-9962-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a followup patch for: https://lkml.org/lkml/2017/10/11/375 and https://patchwork.kernel.org/patch/9999649/ Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccienlle. Signed-off-by: Bhumika Goyal --- drivers/net/netconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 0e27920..be9aa36 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -616,7 +616,7 @@ static void netconsole_target_release(struct config_item *item) .release = netconsole_target_release, }; -static struct config_item_type netconsole_target_type = { +static const struct config_item_type netconsole_target_type = { .ct_attrs = netconsole_target_attrs, .ct_item_ops = &netconsole_target_item_ops, .ct_owner = THIS_MODULE, @@ -682,7 +682,7 @@ static void drop_netconsole_target(struct config_group *group, .drop_item = drop_netconsole_target, }; -static struct config_item_type netconsole_subsys_type = { +static const struct config_item_type netconsole_subsys_type = { .ct_group_ops = &netconsole_subsys_group_ops, .ct_owner = THIS_MODULE, };