Re: [net-next 03/16] fm10k: Avoid crashing the kernel

2016-04-06 Thread Keller, Jacob E
On Tue, 2016-04-05 at 12:12 -0400, David Miller wrote: > As Joe suggested, it is not reasonable to expect all compilers to be > able to figure > out the result of all of the index increments in this function lead > to a specific > constant value. > > Your only option is to either keep the code as-

Re: [net-next 03/16] fm10k: Avoid crashing the kernel

2016-04-05 Thread David Miller
From: Jeff Kirsher Date: Tue, 5 Apr 2016 01:01:15 -0700 > diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c > b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c > index 28837ae..6a9f988 100644 > --- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c > +++ b/drivers/net/ethernet/inte

Re: [net-next 03/16] fm10k: Avoid crashing the kernel

2016-04-05 Thread Joe Perches
On Tue, 2016-04-05 at 01:01 -0700, Jeff Kirsher wrote: > From: Bruce Allan > > Use BUILD_BUG_ON() instead of BUG_ON() where appropriate to get a compile > error rather than crash the kernel. > > Signed-off-by: Bruce Allan > Acked-by: Alexander Duyck > Tested-by: Krishneil Singh > Signed-off-b

[net-next 03/16] fm10k: Avoid crashing the kernel

2016-04-05 Thread Jeff Kirsher
From: Bruce Allan Use BUILD_BUG_ON() instead of BUG_ON() where appropriate to get a compile error rather than crash the kernel. Signed-off-by: Bruce Allan Acked-by: Alexander Duyck Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c |