Re: [GIT PULL] patches for -rc2

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

 



On Thu, Jun 15, 2017 at 1:20 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:

> Please, drop what you have already pulled and take the
> following instead.

I am reviewing the pull request, here is some of the feed back for the memcpy
patch.

For -fmemcpy-max-count and -Wmemcpy-max-count, do we actually need to
have two separate options here? -fmemcpy-max-count set to zero will disable
this warning any way.

                unsigned long long val = count->value;
-               if (Wmemcpy_max_count && val > 100000ULL)
-
+               if (Wmemcpy_max_count && val > fmemcpy_max_count)

If we only use one option, for example fmemcpy_max_count,
we can do:

if ( fmemcpy_max_count && val > fmemcpy_max_count)

That way we don't need to set fmemcpy_max_count to  ~0ULL.

+       if (val == 0)
+               val = ~0ULL;
+       fmemcpy_max_count = val;

Even if we decide to have two options, -Wmemcpy-max-coun can totally
set the  fmemcpy_max_count to 0 to disable it.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux