Re: [PATCH 08/14] HID: i2c-hid: fix error messages
On Wed, 5 Dec 2012, Jean Delvare wrote: > > Signed-off-by: Benjamin Tissoires > > --- > > drivers/hid/i2c-hid/i2c-hid.c | 11 ++- > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c > > index d6fdb3e..da04948 100644 > > --- a/drivers/hid/i2c-hid/i2c-hid.c > > +++ b/drivers/hid/i2c-hid/i2c-hid.c > > @@ -741,10 +741,10 @@ static int __devinit i2c_hid_init_irq(struct > > i2c_client *client) > > IRQF_TRIGGER_FALLING | IRQF_ONESHOT, > > client->name, ihid); > > if (ret < 0) { > > - dev_dbg(>dev, > > + dev_warn(>dev, > > "Could not register for %s interrupt, irq = %d," > > " ret = %d\n", > > - client->name, client->irq, ret); > > + client->name, client->irq, ret); > > > > return ret; > > } > > @@ -770,7 +770,8 @@ static int __devinit > > i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) > > __func__, 4, ihid->hdesc_buffer); > > > > if (ret) { > > - dev_err(>dev, "HID_DESCR_LENGTH_CMD Fail (ret=%d)\n", > > + dev_err(>dev, > > + "unable to fetch the size of HID descriptor (ret=%d)\n", > > ret); > > return -ENODEV; > > } > > @@ -785,7 +786,7 @@ static int __devinit > > i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) > > /* check bcdVersion == 1.0 */ > > if (le16_to_cpu(hdesc->bcdVersion) != 0x0100) { > > dev_err(>dev, > > - "unexpected HID descriptor bcdVersion (0x%04x)\n", > > + "unexpected HID descriptor bcdVersion (0x%04hx)\n", > > le16_to_cpu(hdesc->bcdVersion)); > > return -ENODEV; > > } > > @@ -871,7 +872,7 @@ static int __devinit i2c_hid_probe(struct i2c_client > > *client, > > hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID); > > hid->product = le16_to_cpu(ihid->hdesc.wProductID); > > > > - snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", > > + snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX", > > client->name, hid->vendor, hid->product); > > > > ret = hid_add_device(hid); > > Reviewed-by: Jean Delvare Applied. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 08/14] HID: i2c-hid: fix error messages
On Tue, 4 Dec 2012 16:27:49 +0100, Benjamin Tissoires wrote: > Signed-off-by: Benjamin Tissoires > --- > drivers/hid/i2c-hid/i2c-hid.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c > index d6fdb3e..da04948 100644 > --- a/drivers/hid/i2c-hid/i2c-hid.c > +++ b/drivers/hid/i2c-hid/i2c-hid.c > @@ -741,10 +741,10 @@ static int __devinit i2c_hid_init_irq(struct i2c_client > *client) > IRQF_TRIGGER_FALLING | IRQF_ONESHOT, > client->name, ihid); > if (ret < 0) { > - dev_dbg(>dev, > + dev_warn(>dev, > "Could not register for %s interrupt, irq = %d," > " ret = %d\n", > - client->name, client->irq, ret); > + client->name, client->irq, ret); > > return ret; > } > @@ -770,7 +770,8 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct > i2c_hid *ihid) > __func__, 4, ihid->hdesc_buffer); > > if (ret) { > - dev_err(>dev, "HID_DESCR_LENGTH_CMD Fail (ret=%d)\n", > + dev_err(>dev, > + "unable to fetch the size of HID descriptor (ret=%d)\n", > ret); > return -ENODEV; > } > @@ -785,7 +786,7 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct > i2c_hid *ihid) > /* check bcdVersion == 1.0 */ > if (le16_to_cpu(hdesc->bcdVersion) != 0x0100) { > dev_err(>dev, > - "unexpected HID descriptor bcdVersion (0x%04x)\n", > + "unexpected HID descriptor bcdVersion (0x%04hx)\n", > le16_to_cpu(hdesc->bcdVersion)); > return -ENODEV; > } > @@ -871,7 +872,7 @@ static int __devinit i2c_hid_probe(struct i2c_client > *client, > hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID); > hid->product = le16_to_cpu(ihid->hdesc.wProductID); > > - snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", > + snprintf(hid->name, sizeof(hid->name), "%s %04hX:%04hX", >client->name, hid->vendor, hid->product); > > ret = hid_add_device(hid); Reviewed-by: Jean Delvare -- Jean Delvare -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 08/14] HID: i2c-hid: fix error messages
On Tue, 4 Dec 2012 16:27:49 +0100, Benjamin Tissoires wrote: Signed-off-by: Benjamin Tissoires benjamin.tissoi...@gmail.com --- drivers/hid/i2c-hid/i2c-hid.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index d6fdb3e..da04948 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -741,10 +741,10 @@ static int __devinit i2c_hid_init_irq(struct i2c_client *client) IRQF_TRIGGER_FALLING | IRQF_ONESHOT, client-name, ihid); if (ret 0) { - dev_dbg(client-dev, + dev_warn(client-dev, Could not register for %s interrupt, irq = %d, ret = %d\n, - client-name, client-irq, ret); + client-name, client-irq, ret); return ret; } @@ -770,7 +770,8 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) __func__, 4, ihid-hdesc_buffer); if (ret) { - dev_err(client-dev, HID_DESCR_LENGTH_CMD Fail (ret=%d)\n, + dev_err(client-dev, + unable to fetch the size of HID descriptor (ret=%d)\n, ret); return -ENODEV; } @@ -785,7 +786,7 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) /* check bcdVersion == 1.0 */ if (le16_to_cpu(hdesc-bcdVersion) != 0x0100) { dev_err(client-dev, - unexpected HID descriptor bcdVersion (0x%04x)\n, + unexpected HID descriptor bcdVersion (0x%04hx)\n, le16_to_cpu(hdesc-bcdVersion)); return -ENODEV; } @@ -871,7 +872,7 @@ static int __devinit i2c_hid_probe(struct i2c_client *client, hid-vendor = le16_to_cpu(ihid-hdesc.wVendorID); hid-product = le16_to_cpu(ihid-hdesc.wProductID); - snprintf(hid-name, sizeof(hid-name), %s %04X:%04X, + snprintf(hid-name, sizeof(hid-name), %s %04hX:%04hX, client-name, hid-vendor, hid-product); ret = hid_add_device(hid); Reviewed-by: Jean Delvare kh...@linux-fr.org -- Jean Delvare -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 08/14] HID: i2c-hid: fix error messages
On Wed, 5 Dec 2012, Jean Delvare wrote: Signed-off-by: Benjamin Tissoires benjamin.tissoi...@gmail.com --- drivers/hid/i2c-hid/i2c-hid.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index d6fdb3e..da04948 100644 --- a/drivers/hid/i2c-hid/i2c-hid.c +++ b/drivers/hid/i2c-hid/i2c-hid.c @@ -741,10 +741,10 @@ static int __devinit i2c_hid_init_irq(struct i2c_client *client) IRQF_TRIGGER_FALLING | IRQF_ONESHOT, client-name, ihid); if (ret 0) { - dev_dbg(client-dev, + dev_warn(client-dev, Could not register for %s interrupt, irq = %d, ret = %d\n, - client-name, client-irq, ret); + client-name, client-irq, ret); return ret; } @@ -770,7 +770,8 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) __func__, 4, ihid-hdesc_buffer); if (ret) { - dev_err(client-dev, HID_DESCR_LENGTH_CMD Fail (ret=%d)\n, + dev_err(client-dev, + unable to fetch the size of HID descriptor (ret=%d)\n, ret); return -ENODEV; } @@ -785,7 +786,7 @@ static int __devinit i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) /* check bcdVersion == 1.0 */ if (le16_to_cpu(hdesc-bcdVersion) != 0x0100) { dev_err(client-dev, - unexpected HID descriptor bcdVersion (0x%04x)\n, + unexpected HID descriptor bcdVersion (0x%04hx)\n, le16_to_cpu(hdesc-bcdVersion)); return -ENODEV; } @@ -871,7 +872,7 @@ static int __devinit i2c_hid_probe(struct i2c_client *client, hid-vendor = le16_to_cpu(ihid-hdesc.wVendorID); hid-product = le16_to_cpu(ihid-hdesc.wProductID); - snprintf(hid-name, sizeof(hid-name), %s %04X:%04X, + snprintf(hid-name, sizeof(hid-name), %s %04hX:%04hX, client-name, hid-vendor, hid-product); ret = hid_add_device(hid); Reviewed-by: Jean Delvare kh...@linux-fr.org Applied. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/