Re: [PATCH 7/7] can: peak_usb: align user device id format in log with sysfs attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25.10.2022 13:28:37, Marc Kleine-Budde wrote:
> On 22.10.2022 21:35:35, Lukas Magel wrote:
> > Previously, the user device id was printed to the kernel log in decimal
> > upon connecting a new PEAK device. This behavior is inconsistent with
> > the hexadecimal format of the user device id sysfs attribute. This patch
> > updates the log message to output the id in hexadecimal.
> > 
> > Signed-off-by: Lukas Magel <lukas.magel@xxxxxxxxxx>
> > ---
> >  drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
> > index fbefd4f05e08..8bb9a3fa686c 100644
> > --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
> > +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
> > @@ -1028,8 +1028,8 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter,
> >  	/* get device number early */
> >  	dev->adapter->dev_get_user_devid(dev, &dev->user_devid);
> >  
> > -	netdev_info(netdev, "attached to %s channel %u (device %u)\n",
> > -			peak_usb_adapter->name, ctrl_idx, dev->user_devid);
> > +	netdev_info(netdev, "attached to %s channel %u (device %08Xh)\n",
>                                                                   ^^
> Why is the a trailing 'h'? To denote that it's a hexadecimal value?

Probably because it says so in Windows, as shown on page 18 in:

| https://www.peak-system.com/produktcd/Pdf/English/PCAN-USB-FD_UserMan_eng.pdf

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux