Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert

2024-02-07 Thread Ferruh Yigit
On 2/7/2024 10:36 PM, Stephen Hemminger wrote: > On Wed, 7 Feb 2024 19:10:37 + > Ferruh Yigit wrote: > >> ../drivers/common/sfc_efx/base/ef10_filter.c:1246:18: error: shift count >>> = width of type [-Werror,-Wshift-count-overflow] >> matches_count = MCDI_OUT_DWORD(req, >>

Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert

2024-02-07 Thread Stephen Hemminger
On Wed, 7 Feb 2024 19:10:37 + Ferruh Yigit wrote: > ../drivers/common/sfc_efx/base/ef10_filter.c:1246:18: error: shift count > >= width of type [-Werror,-Wshift-count-overflow] > matches_count = MCDI_OUT_DWORD(req, > ^~~ > ../drivers/common/sf

Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert

2024-02-07 Thread Stephen Hemminger
On Wed, 7 Feb 2024 19:10:37 + Ferruh Yigit wrote: > On 1/19/2024 10:13 PM, Stephen Hemminger wrote: > > The sfc base code had its own definition of static assertions > > using the out of bound array access hack. Replace it with a > > static_assert like rte_common.h. > > > > Fixes: f67e471914

Re: [PATCH v2] common/sfc: replace out of bounds condition with static_assert

2024-02-07 Thread Ferruh Yigit
On 1/19/2024 10:13 PM, Stephen Hemminger wrote: > The sfc base code had its own definition of static assertions > using the out of bound array access hack. Replace it with a > static_assert like rte_common.h. > > Fixes: f67e4719147d ("net/sfc/base: fix coding style") > Signed-off-by: Stephen Hemmi

RE: [PATCH v2] common/sfc: replace out of bounds condition with static_assert

2024-01-19 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Friday, 19 January 2024 23.14 > > The sfc base code had its own definition of static assertions > using the out of bound array access hack. Replace it with a > static_assert like rte_common.h. > > Fixes: f67e4719147d ("net/sfc/

[PATCH v2] common/sfc: replace out of bounds condition with static_assert

2024-01-19 Thread Stephen Hemminger
The sfc base code had its own definition of static assertions using the out of bound array access hack. Replace it with a static_assert like rte_common.h. Fixes: f67e4719147d ("net/sfc/base: fix coding style") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup --- v2 - add assert.h to make