Message ID | 2390389.thI8mIvbv5@wasted.cogentembedded.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Hi Sergei, On Sat, Jun 20, 2015 at 2:33 AM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > Printing IRQ # using "%x" and "%u" unsigned formats isn't quite correct as > 'ndev->irq' is of type *int*, so the "%d" format needs to be used instead. > > While fixing this, beautify the dev_info() message in rcar_can_probe() a bit. If you change the message, why don't you make it consistent ("interrupt" vs. "IRQ")? > Fixes: fd1159318e55 ("can: add Renesas R-Car CAN driver") > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > --- > drivers/net/can/rcar_can.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > Index: linux-can/drivers/net/can/rcar_can.c > =================================================================== > --- linux-can.orig/drivers/net/can/rcar_can.c > +++ linux-can/drivers/net/can/rcar_can.c > @@ -526,7 +526,7 @@ static int rcar_can_open(struct net_devi > napi_enable(&priv->napi); > err = request_irq(ndev->irq, rcar_can_interrupt, 0, ndev->name, ndev); > if (err) { > - netdev_err(ndev, "error requesting interrupt %x\n", ndev->irq); > + netdev_err(ndev, "error requesting interrupt %d\n", ndev->irq); > goto out_close; > } > can_led_event(ndev, CAN_LED_EVENT_OPEN); > @@ -824,7 +824,7 @@ static int rcar_can_probe(struct platfor > > devm_can_led_init(ndev); > > - dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%u)\n", > + dev_info(&pdev->dev, "device registered (regs @ %p, IRQ%d)\n", > priv->regs, ndev->irq); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in
Hello. On 6/20/2015 3:03 PM, Geert Uytterhoeven wrote: >> Printing IRQ # using "%x" and "%u" unsigned formats isn't quite correct as >> 'ndev->irq' is of type *int*, so the "%d" format needs to be used instead. >> While fixing this, beautify the dev_info() message in rcar_can_probe() a bit. > If you change the message, why don't you make it consistent > ("interrupt" vs. "IRQ")? I decided to change the message in a follow-up patch (posted afterwards). >> Fixes: fd1159318e55 ("can: add Renesas R-Car CAN driver") >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> [...] > Gr{oetje,eeting}s, > Geert WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in
On 06/20/2015 04:38 PM, Sergei Shtylyov wrote: > Hello. > > On 6/20/2015 3:03 PM, Geert Uytterhoeven wrote: > >>> Printing IRQ # using "%x" and "%u" unsigned formats isn't quite correct as >>> 'ndev->irq' is of type *int*, so the "%d" format needs to be used instead. > >>> While fixing this, beautify the dev_info() message in rcar_can_probe() a bit. > >> If you change the message, why don't you make it consistent >> ("interrupt" vs. "IRQ")? > > I decided to change the message in a follow-up patch (posted afterwards). Please squash you patches, so that you don't modify code (or error messages) that you've added in a previous patch. Marc
Hello. On 6/20/2015 7:02 PM, Marc Kleine-Budde wrote: >>>> Printing IRQ # using "%x" and "%u" unsigned formats isn't quite correct as >>>> 'ndev->irq' is of type *int*, so the "%d" format needs to be used instead. >>>> While fixing this, beautify the dev_info() message in rcar_can_probe() a bit. >>> If you change the message, why don't you make it consistent >>> ("interrupt" vs. "IRQ")? >> I decided to change the message in a follow-up patch (posted afterwards). > Please squash you patches, so that you don't modify code (or error > messages) that you've added in a previous patch. I didn't add any messages. > Marc WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in
Index: linux-can/drivers/net/can/rcar_can.c =================================================================== --- linux-can.orig/drivers/net/can/rcar_can.c +++ linux-can/drivers/net/can/rcar_can.c @@ -526,7 +526,7 @@ static int rcar_can_open(struct net_devi napi_enable(&priv->napi); err = request_irq(ndev->irq, rcar_can_interrupt, 0, ndev->name, ndev); if (err) { - netdev_err(ndev, "error requesting interrupt %x\n", ndev->irq); + netdev_err(ndev, "error requesting interrupt %d\n", ndev->irq); goto out_close; } can_led_event(ndev, CAN_LED_EVENT_OPEN); @@ -824,7 +824,7 @@ static int rcar_can_probe(struct platfor devm_can_led_init(ndev); - dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%u)\n", + dev_info(&pdev->dev, "device registered (regs @ %p, IRQ%d)\n", priv->regs, ndev->irq); return 0;
Printing IRQ # using "%x" and "%u" unsigned formats isn't quite correct as 'ndev->irq' is of type *int*, so the "%d" format needs to be used instead. While fixing this, beautify the dev_info() message in rcar_can_probe() a bit. Fixes: fd1159318e55 ("can: add Renesas R-Car CAN driver") Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> --- drivers/net/can/rcar_can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in