[PATCH v5 2/2] kni: fix warning about discarding const qualifier

Ferruh Yigit ferruh.yigit at xilinx.com
Wed Jun 8 15:10:46 CEST 2022


On 6/8/2022 1:54 PM, Ferruh Yigit wrote:
> On 6/8/2022 1:11 PM, Andrew Rybchenko wrote:
> 
>>
>> From: Ke Zhang <ke1x.zhang at intel.com>
>>
>> The warning info:
>> warning: passing argument 1 of ‘memcpy’ discards ‘const’
>> qualifier from pointer target type
>>
>> Variable dev_addr is done const intentionally in v5.17 to prevent using
>> it directly. See kernel series [1] for more information.

`dev_addr` is done const in v5.17,
but patch checks >= v5.15 because used helpers introduced in v5.15, 
should this be clarified to not confuse users? No strong opinion from me.

>>
>> [1] https://lore.kernel.org/netdev/YZYAb4X%2FVQFy0iks@shredder/T/
> 
> Can you add Linux kernel commit log, instead of the mail list archive? 
> This helps to check the relevant code change in kernel easier, and 
> verify in which versions it exists etc..
> 

I think mentioned commit is following
Commit adeef3e32146 ("net: constify netdev->dev_addr")

>>
>> Fixes: ea6b39b5b847 ("kni: remove ethtool support")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Ke Zhang <ke1x.zhang at intel.com>
>> Signed-off-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit at xilinx.com>
> 



More information about the stable mailing list