From patchwork Tue Jan 10 13:40:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 90701 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1023315obz; Tue, 10 Jan 2017 05:40:50 -0800 (PST) X-Received: by 10.84.218.3 with SMTP id q3mr5041340pli.80.1484055650168; Tue, 10 Jan 2017 05:40:50 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x184si2164212pfx.299.2017.01.10.05.40.49; Tue, 10 Jan 2017 05:40:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968036AbdAJNkc (ORCPT + 25 others); Tue, 10 Jan 2017 08:40:32 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35638 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967809AbdAJNkW (ORCPT ); Tue, 10 Jan 2017 08:40:22 -0500 Received: by mail-oi0-f68.google.com with SMTP id x84so18214575oix.2 for ; Tue, 10 Jan 2017 05:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ENNdW41/C1h7fef4EnTeYbo/bi3mV1iheEARB+0lyyg=; b=FzrB/MJA153768xx7eEtlQcvAMRK+BXK3CC2RlawbzLOFIMVb7HoKVoReGMhe3AoSI oJxR4hHx16JcliGJA3VyWz2cPj/Z5mSVpOUZ3dZ2UEy3nUhP2/9bLBCHc6HyRJfyySZB /bCiR14rE3+vpEjSsy69IPfTPBAM1BSVH0zIXFyAKeQvBTXM55jYBlX4VZL+QWy9DO5w BUPQ6/vegFRNFA6zSfu3jkrmfzw2uKE7RADFYH+Pp7xdecg/TSjv3r3ar6DyUiN/+pY9 qQGSLJc+TUdKZHZw4uJR/BlrPbgel9JO+0bVvfJU55gDIMo6r0CZejDre4QB9yQePiXe BMQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ENNdW41/C1h7fef4EnTeYbo/bi3mV1iheEARB+0lyyg=; b=m3J8tbQtbhOMyHfrlQIh2tkZuko0iJY5PXNP2qo3YM+iX+MrzW4yzAvhmM6IWAOt7T t2qHf/nOiMD6L1ZXbO8fXE3rKWo4mmcmF6PCpPCKo5+Da2i6mnvLN6Dvy2XPjCHr4sax B9am63TA/ilfQ+9l+3LtyGMWBowVm08G/wHyFhph2GJQiue5nFK52Kj6QoJiRZtlsyT9 XdLNyVcNOS60nSVXgq611yy+N+uh5nk7225KEuxNX4Zd9AdSDbfAlOD4mglpNoXGwCV0 N6sNbac3MJDonjUPXTTg1aS7fy/ov5QRtRH7Z1sgrT05n9T1ZJ/S0JO71gSsndm8FR9S NU+g== X-Gm-Message-State: AIkVDXIe3cWMpuPXrELoDnwVbddA0PojE6kjTmpMQ0nZtVJRF5YV7d2LIg8ExpQizmJzYw== X-Received: by 10.157.18.182 with SMTP id g51mr1640221otg.273.1484055622117; Tue, 10 Jan 2017 05:40:22 -0800 (PST) Received: from serve.minyard.net ([47.184.183.230]) by smtp.gmail.com with ESMTPSA id s51sm831783otb.31.2017.01.10.05.40.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 05:40:19 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 3E07F1712; Tue, 10 Jan 2017 07:40:18 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id 70AEE300037; Tue, 10 Jan 2017 07:40:15 -0600 (CST) From: minyard@acm.org To: linux-kernel@vger.kernel.org, openipmi-developer@lists.sourceforge.net Cc: Corey Minyard Subject: [PATCH 1/2] ipmi: make ipmi_usr_hndl const Date: Tue, 10 Jan 2017 07:40:12 -0600 Message-Id: <1484055613-31286-2-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484055613-31286-1-git-send-email-minyard@acm.org> References: <1484055613-31286-1-git-send-email-minyard@acm.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Corey Minyard It's only function pointers. Signed-off-by: Corey Minyard --- drivers/char/ipmi/ipmi_devintf.c | 2 +- drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- drivers/char/ipmi/ipmi_watchdog.c | 2 +- include/linux/ipmi.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index a21407d..f45119c 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c @@ -108,7 +108,7 @@ static int ipmi_fasync(int fd, struct file *file, int on) return (result); } -static struct ipmi_user_hndl ipmi_hndlrs = +static const struct ipmi_user_hndl ipmi_hndlrs = { .ipmi_recv_hndl = file_receive_handler, }; diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 92e53ac..9f69995 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -102,7 +102,7 @@ struct ipmi_user { struct kref refcount; /* The upper layer that handles receive messages. */ - struct ipmi_user_hndl *handler; + const struct ipmi_user_hndl *handler; void *handler_data; /* The interface this user is bound to. */ @@ -919,7 +919,7 @@ static int intf_err_seq(ipmi_smi_t intf, int ipmi_create_user(unsigned int if_num, - struct ipmi_user_hndl *handler, + const struct ipmi_user_hndl *handler, void *handler_data, ipmi_user_t *user) { diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 4035495..30b9e83 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -985,7 +985,7 @@ static void ipmi_wdog_pretimeout_handler(void *handler_data) pretimeout_since_last_heartbeat = 1; } -static struct ipmi_user_hndl ipmi_hndlrs = { +static const struct ipmi_user_hndl ipmi_hndlrs = { .ipmi_recv_hndl = ipmi_wdog_msg_handler, .ipmi_watchdog_pretimeout = ipmi_wdog_pretimeout_handler }; diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 78c5d5a..f1045b2 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h @@ -100,7 +100,7 @@ struct ipmi_user_hndl { /* Create a new user of the IPMI layer on the given interface number. */ int ipmi_create_user(unsigned int if_num, - struct ipmi_user_hndl *handler, + const struct ipmi_user_hndl *handler, void *handler_data, ipmi_user_t *user);