All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: [PATCH] i2c driver fixes for 2.6.4
Date: Thu, 19 May 2005 06:24:48 +0000	[thread overview]
Message-ID: <10793913931477@kroah.com> (raw)
In-Reply-To: <10793913931516@kroah.com>
In-Reply-To: <10793913903814@kroah.com>

ChangeSet 1.1608.74.2, 2004/03/09 14:57:49-08:00, khali@linux-fr.org

[PATCH] I2C: Prevent i2c-dev oops with debug

Looks like i2c-dev suffers the same problem with dev_dbg as i2c-core did
twice. Here is a patch that fixed a oops I and another user were
experiencing when running sensors-detect.


 drivers/i2c/i2c-dev.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
--- a/drivers/i2c/i2c-dev.c	Mon Mar 15 14:35:13 2004
+++ b/drivers/i2c/i2c-dev.c	Mon Mar 15 14:35:13 2004
@@ -189,7 +189,7 @@
 	int i,datasize,res;
 	unsigned long funcs;
 
-	dev_dbg(&client->dev, "i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n",
+	dev_dbg(&client->adapter->dev, "i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n",
 		iminor(inode),cmd, arg);
 
 	switch ( cmd ) {
@@ -310,7 +310,7 @@
 		    (data_arg.size != I2C_SMBUS_BLOCK_DATA) &&
 		    (data_arg.size != I2C_SMBUS_I2C_BLOCK_DATA) &&
 		    (data_arg.size != I2C_SMBUS_BLOCK_PROC_CALL)) {
-			dev_dbg(&client->dev,
+			dev_dbg(&client->adapter->dev,
 				"size out of range (%x) in ioctl I2C_SMBUS.\n",
 				data_arg.size);
 			return -EINVAL;
@@ -319,7 +319,7 @@
 		   so the check is valid if size=I2C_SMBUS_QUICK too. */
 		if ((data_arg.read_write != I2C_SMBUS_READ) && 
 		    (data_arg.read_write != I2C_SMBUS_WRITE)) {
-			dev_dbg(&client->dev, 
+			dev_dbg(&client->adapter->dev, 
 				"read_write out of range (%x) in ioctl I2C_SMBUS.\n",
 				data_arg.read_write);
 			return -EINVAL;
@@ -338,7 +338,7 @@
 					      data_arg.size, NULL);
 
 		if (data_arg.data = NULL) {
-			dev_dbg(&client->dev,
+			dev_dbg(&client->adapter->dev,
 				"data is NULL pointer in ioctl I2C_SMBUS.\n");
 			return -EINVAL;
 		}


WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver fixes for 2.6.4
Date: Mon, 15 Mar 2004 14:56:33 -0800	[thread overview]
Message-ID: <10793913931477@kroah.com> (raw)
In-Reply-To: <10793913931516@kroah.com>

ChangeSet 1.1608.74.2, 2004/03/09 14:57:49-08:00, khali@linux-fr.org

[PATCH] I2C: Prevent i2c-dev oops with debug

Looks like i2c-dev suffers the same problem with dev_dbg as i2c-core did
twice. Here is a patch that fixed a oops I and another user were
experiencing when running sensors-detect.


 drivers/i2c/i2c-dev.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
--- a/drivers/i2c/i2c-dev.c	Mon Mar 15 14:35:13 2004
+++ b/drivers/i2c/i2c-dev.c	Mon Mar 15 14:35:13 2004
@@ -189,7 +189,7 @@
 	int i,datasize,res;
 	unsigned long funcs;
 
-	dev_dbg(&client->dev, "i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n",
+	dev_dbg(&client->adapter->dev, "i2c-%d ioctl, cmd: 0x%x, arg: %lx.\n",
 		iminor(inode),cmd, arg);
 
 	switch ( cmd ) {
@@ -310,7 +310,7 @@
 		    (data_arg.size != I2C_SMBUS_BLOCK_DATA) &&
 		    (data_arg.size != I2C_SMBUS_I2C_BLOCK_DATA) &&
 		    (data_arg.size != I2C_SMBUS_BLOCK_PROC_CALL)) {
-			dev_dbg(&client->dev,
+			dev_dbg(&client->adapter->dev,
 				"size out of range (%x) in ioctl I2C_SMBUS.\n",
 				data_arg.size);
 			return -EINVAL;
@@ -319,7 +319,7 @@
 		   so the check is valid if size==I2C_SMBUS_QUICK too. */
 		if ((data_arg.read_write != I2C_SMBUS_READ) && 
 		    (data_arg.read_write != I2C_SMBUS_WRITE)) {
-			dev_dbg(&client->dev, 
+			dev_dbg(&client->adapter->dev, 
 				"read_write out of range (%x) in ioctl I2C_SMBUS.\n",
 				data_arg.read_write);
 			return -EINVAL;
@@ -338,7 +338,7 @@
 					      data_arg.size, NULL);
 
 		if (data_arg.data == NULL) {
-			dev_dbg(&client->dev,
+			dev_dbg(&client->adapter->dev,
 				"data is NULL pointer in ioctl I2C_SMBUS.\n");
 			return -EINVAL;
 		}


  parent reply	other threads:[~2005-05-19  6:24 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 22:48 [BK PATCH] i2c driver fixes for 2.6.4 Greg KH
2005-05-19  6:24 ` Greg KH
2004-03-15 22:56 ` [PATCH] " Greg KH
2005-05-19  6:24   ` Greg KH
2004-03-15 22:56   ` Greg KH
2005-05-19  6:24     ` Greg KH
2004-03-15 22:56     ` Greg KH
2005-05-19  6:24       ` Greg KH
2004-03-15 22:56       ` Greg KH
2004-03-15 22:56         ` Greg KH
2005-05-19  6:24           ` Greg KH
2004-03-15 22:56           ` Greg KH
2004-03-15 22:56             ` Greg KH
2005-05-19  6:24               ` Greg KH
2004-03-15 22:56               ` Greg KH
2005-05-19  6:24                 ` Greg KH
2004-03-15 22:56                 ` Greg KH
2005-05-19  6:24                   ` Greg KH
2004-03-15 22:56                   ` Greg KH
2004-03-15 22:56                     ` Greg KH
2005-05-19  6:24                       ` Greg KH
2004-03-15 22:56                       ` Greg KH
2005-05-19  6:24                         ` Greg KH
2004-03-15 22:56                         ` Greg KH
2005-05-19  6:24                           ` Greg KH
2004-03-15 22:56                           ` Greg KH
2005-05-19  6:24                             ` Greg KH
2004-03-15 22:56                             ` Greg KH
2005-05-19  6:24                               ` Greg KH
2004-03-15 22:56                               ` Greg KH
2005-05-19  6:24                                 ` Greg KH
2004-03-15 22:56                                 ` Greg KH
2005-05-19  6:24                                   ` Greg KH
2004-03-15 22:56                                   ` Greg KH
2005-05-19  6:24                                     ` Greg KH
2004-03-15 22:56                                     ` Greg KH
2005-05-19  6:24                                       ` Greg KH
2004-03-15 22:56                                       ` Greg KH
2005-05-19  6:24                                         ` Greg KH
2004-03-15 22:56                                         ` Greg KH
2005-05-19  6:24                                           ` Greg KH
2004-03-15 22:56                                           ` Greg KH
2005-05-19  6:24                                             ` Greg KH
2004-03-15 22:56                                             ` Greg KH
2005-05-19  6:24                                               ` Greg KH
2004-03-15 22:56                                               ` Greg KH
2005-05-19  6:24                                                 ` Greg KH
2004-03-15 22:56                                                 ` Greg KH [this message]
2005-05-19  6:24                                                   ` Greg KH
2004-03-15 22:56                                                   ` Greg KH
2005-05-19  6:24                                                     ` Greg KH
2004-03-15 22:56                                                     ` Greg KH
2005-05-19  6:24                                                       ` Greg KH
2004-03-15 22:56                                                       ` Greg KH
2005-05-19  6:24                                                         ` Greg KH
2004-03-15 22:56                                                         ` Greg KH
2005-05-19  6:24                                                           ` Greg KH
2004-03-15 22:56                                                           ` Greg KH
2005-05-19  6:24                                                             ` Greg KH
2004-03-15 22:56                                                             ` Greg KH
2005-05-19  6:24                                                               ` Greg KH
2004-03-15 22:56                                                               ` Greg KH
2005-05-19  6:24                                                                 ` Greg KH
2004-03-15 22:56                                                                 ` Greg KH
2005-05-19  6:24                                                                   ` Greg KH
2004-03-15 22:56                                                                   ` Greg KH
2005-05-19  6:24                                                                     ` Greg KH
2004-03-15 22:56                                                                     ` Greg KH
2005-05-19  6:24                                                                       ` Greg KH
2004-03-15 22:56                                                                       ` Greg KH
2005-05-19  6:24                                                                         ` Greg KH
2004-03-15 22:56                                                                         ` Greg KH
2005-05-19  6:24                                                                           ` Greg KH
2004-03-15 22:56                                                                           ` Greg KH
2005-05-19  6:24                                                                             ` Greg KH
2004-03-15 22:56                                                                             ` Greg KH
2005-05-19  6:24                                                                               ` Greg KH
2004-03-15 22:56                                                                               ` Greg KH
2004-03-15 22:56                                                                                 ` Greg KH
2004-03-15 22:56                                                                                   ` Greg KH

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=10793913931477@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.