lkml.org 
[lkml]   [2023]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5 8/8] selftests/resctrl: Adjust effective L3 cache size when SNC enabled
Date
> So it would look like this:
>
> while ((fscanf(fp, "%x", c)) != EOF ) {
> if (c > 0xF)
> continue;
> count = __builtin_popcount(c);
> }
>
> Are there some problems with an approach like that?

I think I'd prefer something that does more checking on the input
(e.g. the hex numbers are separated by "," and terminated with
a '\n').

If Shuah Khan doesn't like my original patch I can re-write
to use fscanf() et. al.

-Tony

\
 
 \ /
  Last update: 2023-08-31 19:06    [W:0.150 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site