mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: minyard@acm.org
To: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>,
	Andy Lutomirski <luto@kernel.org>,
	Corey Minyard <cminyard@mvista.com>
Subject: [PATCH 1/4] dmi: remove const from return of dmi_find_device
Date: Fri, 29 Jan 2016 16:43:11 -0600	[thread overview]
Message-ID: <1454107394-8914-2-git-send-email-minyard@acm.org> (raw)
In-Reply-To: <1454107394-8914-1-git-send-email-minyard@acm.org>

From: Corey Minyard <cminyard@mvista.com>

A fwnode_handle is being added to dmi_device, and that will need to
be updated.  So remove the const.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
---
 drivers/firmware/dmi_scan.c | 11 +++++------
 include/linux/dmi.h         | 10 +++++-----
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 88bebe1..da471b2 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -896,14 +896,13 @@ EXPORT_SYMBOL(dmi_name_in_vendors);
  *	A new search is initiated by passing %NULL as the @from argument.
  *	If @from is not %NULL, searches continue from next device.
  */
-const struct dmi_device *dmi_find_device(int type, const char *name,
-				    const struct dmi_device *from)
+struct dmi_device *dmi_find_device(int type, const char *name,
+				   const struct dmi_device *from)
 {
-	const struct list_head *head = from ? &from->list : &dmi_devices;
-	struct list_head *d;
+	struct list_head *d = from ? from->list.next : dmi_devices.next;
 
-	for (d = head->next; d != &dmi_devices; d = d->next) {
-		const struct dmi_device *dev =
+	for (; d != &dmi_devices; d = d->next) {
+		struct dmi_device *dev =
 			list_entry(d, struct dmi_device, list);
 
 		if (((type == DMI_DEV_TYPE_ANY) || (dev->type == type)) &&
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 5e9c74c..a930a4d 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -98,9 +98,9 @@ struct dmi_dev_onboard {
 extern struct kobject *dmi_kobj;
 extern int dmi_check_system(const struct dmi_system_id *list);
 const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
-extern const char * dmi_get_system_info(int field);
-extern const struct dmi_device * dmi_find_device(int type, const char *name,
-	const struct dmi_device *from);
+extern const char *dmi_get_system_info(int field);
+extern struct dmi_device *dmi_find_device(int type, const char *name,
+	 const struct dmi_device *from);
 extern void dmi_scan_machine(void);
 extern void dmi_memdev_walk(void);
 extern void dmi_set_dump_stack_arch_desc(void);
@@ -116,8 +116,8 @@ extern void dmi_memdev_name(u16 handle, const char **bank, const char **device);
 #else
 
 static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; }
-static inline const char * dmi_get_system_info(int field) { return NULL; }
-static inline const struct dmi_device * dmi_find_device(int type, const char *name,
+static inline const char *dmi_get_system_info(int field) { return NULL; }
+static inline struct dmi_device *dmi_find_device(int type, const char *name,
 	const struct dmi_device *from) { return NULL; }
 static inline void dmi_scan_machine(void) { return; }
 static inline void dmi_memdev_walk(void) { }
-- 
2.5.0

  reply	other threads:[~2016-01-29 23:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 22:43 [PATCH 0/4] dmi: Rework to get IPMI autoloading from DMI tables minyard
2016-01-29 22:43 ` minyard [this message]
2016-01-29 22:43 ` [PATCH 2/4] dmi: Add a DMI firmware node and handling minyard
2016-01-29 23:59   ` kbuild test robot
2016-01-30  0:35     ` Corey Minyard
2016-01-30  0:41   ` kbuild test robot
2016-01-31 22:46   ` Andy Lutomirski
2016-02-01  0:36     ` Corey Minyard
2016-02-01  9:25   ` Jean Delvare
2016-02-02 13:37     ` Corey Minyard
2016-02-02 18:25       ` Andy Lutomirski
2016-02-03 16:51         ` Corey Minyard
2016-01-29 22:43 ` [PATCH 3/4] dmi: Move IPMI DMI scanning to the DMI code minyard
2016-01-29 22:43 ` [PATCH 4/4] dmi/ipmi: Add IPMI DMI devices as platform devices minyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454107394-8914-2-git-send-email-minyard@acm.org \
    --to=minyard@acm.org \
    --cc=cminyard@mvista.com \
    --cc=jdelvare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome