Re: [PATCH v1 5/9] selftests: kvm: s390: Add debug print functions

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

 



On Tue, 9 Jul 2024 18:31:54 +0200
Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> wrote:

> On Tue,  9 Jul 2024 14:57:00 +0200
> Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx> wrote:
> 

[...]

> > +static inline void print_hex_bytes(const char *name, u64 page, size_t len)  
> 
> "page" is not an appropriate name, it's just an address, right? "addr"
> seems a more appropriate name
> 

Yes, this is a address. I guess I just carried the name forward from
when I really printed out a whole page...
Will change this to addr.

> > +{
> > +	pr_debug("%s (%p)\t\t8-0x08  12-0x0c  16-0x10  20-0x14  24-0x18  28-0x1c",
> > +		 name, (void *)page);
> > +	for (u8 pp_row = 0; pp_row < (len / 32); pp_row++) {
> > +		pr_debug("\n %3d 0x%.3x ", pp_row * 32, pp_row * 32);
> > +		for (u8 pp_block = 0; pp_block < 8; pp_block++)
> > +			pr_debug(" %8x", *(((u32 *)page) + 8 * pp_row + pp_block));  
> 
> why not printing in blocks of 64 bits? 
> 

Nothing against 64 bit blocks. Adjusting that for the next version and
also optimizing the functions to allow more reuse.

[...]




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux