>On Sun, Jan 14, 2018 at 01:18:35PM +0200, Karim Eshapa wrote:
>> >> Use pointers to structure as arguments to function instead of coping
>> >> structures and less stack size. Also transfer TNUM(_v, _m) to
>> >> tnum.h file to be used in differnet files f
>> Use pointers to structure as arguments to function instead of coping
>> structures and less stack size. Also transfer TNUM(_v, _m) to
>> tnum.h file to be used in differnet files for creating anonymous structures
>> statically.
>>
>> Signed-off-by: Kari
Use pointers to structure as arguments to function instead of coping
structures and less stack size. Also transfer TNUM(_v, _m) to
tnum.h file to be used in differnet files for creating anonymous structures
statically.
Signed-off-by: Karim Eshapa
Thanks,
Karim
---
include/linux/tnum.h | 4
Signed-off-by: Karim Eshapa
Thanks,
Karim
---
include/linux/tnum.h | 2 +-
kernel/bpf/tnum.c | 13 +++--
kernel/bpf/verifier.c | 12
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/include/linux/tnum.h b/include/linux/tnum.h
index 0d2d3da..ddb1250
Signed-off-by: Karim Eshapa
Thanks,
Karim
---
include/linux/tnum.h | 2 +-
kernel/bpf/tnum.c | 13 +++--
kernel/bpf/verifier.c | 12
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/include/linux/tnum.h b/include/linux/tnum.h
index 0d2d3da..ddb1250
I noticed that most of functions here have structure arguements and return
structure, all these structures passed and returned are delt in passing and
assignment like memcpy a structure.In addition it takes size in stack while
passing. so why not we use pointers to structure as argumentsor there
Use time_after() for time comparison with the new fix.
Signed-off-by: Karim Eshapa
---
drivers/net/wimax/i2400m/i2400m-usb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h
b/drivers/net/wimax/i2400m/i2400m-usb.h
index 649ecad..eff4f464
Use time_after kernel macro for time comparison.
Signed-off-by: Karim Eshapa
---
drivers/net/wireless/rsi/rsi_91x_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c
b/drivers/net/wireless/rsi/rsi_91x_core.c
index f3d3995..68f04a7
cast timeframe variable with (unsigned long) then
use time_after() kernel macro for time comparison.
Signed-off-by: Karim Eshapa
---
drivers/net/wimax/i2400m/i2400m-usb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h
b/drivers/net
Use time_before_eq for time comparison more safe and dealing
with timer wrapping to be future-proof.
Signed-off-by: Karim Eshapa
---
drivers/net/ethernet/emulex/benet/be_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
Use time_before_eq for time comparison more safe and dealing
with timer wrapping to be future-proof.
Signed-off-by: Karim Eshapa
---
drivers/net/ethernet/emulex/benet/be_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
On Mon, 24 Apr 2017 14:18:58 -0400 (EDT), David Miller wrote:
> Mon, 24 Apr 2017 19:49:39 +0200, Karim Eshapa wrote:
>>
>> static char pointer creates two variables in final assembly.
>> static string and pointer to it according to
>> Jeff Garzik janitors TODO.
&
static char pointer creates two variables in final assembly.
static string and pointer to it according to
Jeff Garzik janitors TODO.
Signed-off-by: Karim Eshapa
---
drivers/net/cris/eth_v10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/cris/eth_v10.c b
On Sun, 23 Apr 2017 22:56:38 +0200, Geert Uytterhoeven:
>IMHO this makes the code less safe and less future-proof.
>What if the type of info is ever changed?
>There's no safety check to validate that the FIELD_SIZEOF() operates on the
>same data as the strlcpy() destination.
Really make sense :)
Use FIELD_SIZEOF defined kernel macro kernel.h
Signed-off-by: Karim Eshapa
---
drivers/net/ethernet/adi/bfin_mac.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/adi/bfin_mac.c
b/drivers/net/ethernet/adi/bfin_mac.c
index a9ac58c..60346e0
char pointer creates two variables static string and pointer to it
according to Jeff Garzik janitors TODO
Signed-off-by: Karim Eshapa
---
drivers/net/ethernet/3com/3c515.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/3com/3c515.c
b/drivers/net
16 matches
Mail list logo