Hi Andy, > > I checked briefly the code and found that the constant is heavily used > > as a definition for the length of static byte arrays. So, in that case > > probably better to use %*ph, but apply sizeof(cool_var) instead of > (int)sizeof(cool_var) of course > > > putting constant there. > > And one finding more: buffers are defined as u16. I'm afraid the both > previous and proposed versions are printing something interesting, like > only half of the defined data. You are right. The original code should be like this: print_hex_dump_bytes("last_cmd_id: ", DUMP_PREFIX_OFFSET, - adapter->dbg.last_cmd_id, DBG_CMD_NUM); + adapter->dbg.last_cmd_id, + sizeof(adapter->dbg.last_cmd_id)); and then in Andrei's patch: dev_err(adapter->dev, "last_cmd_id: %*ph\n", (int)sizeof(adapter->dbg.last_cmd_id)), adapter->dbg.last_cmd_id); I will send a patch to fix the original code. Thanks, Bing ��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f