[PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler

2018-06-28 Thread Karim Eshapa
Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, as GFP_KERNEL may sleep according to slab allocator. Signed-off-by: Karim Eshapa --- drivers/staging/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging

[PATCH] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler

2018-06-28 Thread Karim Eshapa
Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, as GFP_KERNEL may sleep according to slab allocator. Signed-off-by: Karim Eshapa --- drivers/staging/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging

[PATCH 4/4] staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler

2018-06-28 Thread Karim Eshapa
Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, as GFP_KERNEL may sleep according to slab allocator. Signed-off-by: Karim Eshapa --- drivers/staging/iio/adc/ad7280a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging

[PATCH v2] staging:iio:impedance-analyzer:ad5933: Macro replacement Cleanups.

2018-06-25 Thread Karim Eshapa
Doing some macro replacement to start an array of structures so it can be reused by manipulating it with different values. Signed-off-by: Karim Eshapa --- .../staging/iio/impedance-analyzer/ad5933.c | 57 +++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a

[PATCH] staging:iio:impedance-analyzer:ad5933: Macro replacment Cleanups.

2018-06-24 Thread Karim Eshapa
Doing some macro replacment to start an array of structures so it can be reused by manipulating it with different values. Signed-off-by: Karim Eshapa --- .../staging/iio/impedance-analyzer/ad5933.c | 57 +++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a

[PATCH] staging:iio:adc:ad7816: Backward resources cleanups in probe

2018-06-18 Thread Karim Eshapa
Backward cleanups for all resources allocated in probing in case of failure at any regestering or allocation step. Signed-off-by: Karim Eshapa --- drivers/staging/iio/adc/ad7816.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/staging/iio/adc

[PATCH v3] staging:iio:accel:adis16240: sign extend function replace hard code duplication

2018-06-18 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication, Safe also for 16 bit. and remove declaration of bits variable not needed. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16240.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers

[PATCH] staging:iio:accel:adis16203: sign extend function rather code duplication

2018-06-12 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication. This function is also safe for 16 bits. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16203.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers

[PATCH v2] staging:iio:accel:adis16240: sign extend function avoiding code duplication

2018-06-12 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication, Safe also for 16 bit. and remove declaration of bits variable not needed. Signed-off-by: Karim Eshapa >On Tue, 2018-06-12 at 01:38 +0200, Karim Eshapa wrote: >> Use sign_extend32 kernel function instead of code duplication

Re: [PATCH] staging:iio:accel:adis16240: sign extend function avoiding code duplication

2018-06-11 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication. Safe also for 16 bit. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16240.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio

[PATCH] staging:iio:accel:adis16240: sign extend function avoiding code duplication

2018-06-11 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication. Safe also for 16 bit. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16240.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio

[PATCH] staging:iio:accel: use sign extend function avoiding code duplication

2018-06-10 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication. This function is also safe for 16 bits. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16201.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201.c b/drivers

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-17 Thread Karim Eshapa
>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

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-14 Thread Karim Eshapa
>> 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

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Karim Eshapa
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

[PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-13 Thread Karim Eshapa
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

[PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-13 Thread Karim Eshapa
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

bpf: Change structure passing and assignment

2018-01-13 Thread Karim Eshapa
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

[PATCH] soc/qman: Change a comment for an entry check insid drain_mr_fqrni function

2017-06-25 Thread Karim Eshapa
Change the comment for an entry check inside function drain_mr_fqrni() with sleep for sufficient period of time instead of long time proccessor cycles. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 25 + 1 file changed, 13 insertions(+), 12 deletions

[PATCH] soc/qman: Sleep instead of stuck hacking jiffies.

2017-06-25 Thread Karim Eshapa
Use msleep() instead of stucking with long delay will be more efficient. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 3d891db..18d391e

[PATCH v2] edac: edac_mc_sysfs.c: Use strlcpy to Copy a C-string into a sized buffer

2017-05-26 Thread Karim Eshapa
Use strlcpy with sized buffer instead of strncpy to avoid non NUL-terminated source strings problems. Signed-off-by: Karim Eshapa --- drivers/edac/edac_mc_sysfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac

[PATCH] edac: edac_mc_sysfs.c: Use strlcpy to Copy a C-string into a sized buffer

2017-05-26 Thread Karim Eshapa
Use strlcpy with sized buffer instead of strncpy to avoid non NUL-terminated source strings problems. Signed-off-by: Karim Eshapa --- drivers/edac/edac_mc_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c

[PATCH] acpi: acpica: dbfileio: Use strlcpy to Copy a C-string into a sized buffer

2017-05-23 Thread Karim Eshapa
Use strlcpy with sized buffer instead of strncpy to avoid non NUL-terminated source strings problems. Signed-off-by: Karim Eshapa --- drivers/acpi/acpica/dbfileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/dbfileio.c b/drivers/acpi/acpica

[PATCH] arch: blackfin: kernel: bfin_gpio: Use strlcpy to Copy a C-string into a sized buffer

2017-05-22 Thread Karim Eshapa
Use strlcpy with sized buffer instead of strncpy to avoid non NUL-terminated source strings problems. Signed-off-by: Karim Eshapa --- arch/blackfin/kernel/bfin_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel

[PATCH] Documentation: scheduler: sched-arch: remove __ARCH_WANT_UNLOCKED_CTXSW macro

2017-05-17 Thread Karim Eshapa
remove __ARCH_WANT_UNLOCKED_CTXSW macro because it's no longer exist after 3.17.8 kernel release. Signed-off-by: Karim Eshapa --- Documentation/scheduler/sched-arch.txt | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Documentation/scheduler/sched-arch.t

[PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be compatible with networking byte order.

2017-05-16 Thread Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be compatible with byte ordering of the network. and in hfa384x_usb.c make calculations with respect to machine. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 28

[PATCH] video: fbdev: omap2: omapfb: displays: panel-dsi-cm: Use time comparison kernel macro.

2017-05-15 Thread Karim Eshapa
Use time_before_eq() kernel macro for time comparison more safe. Signed-off-by: Karim Eshapa --- drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video

[PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.

2017-05-15 Thread Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be compatible with byte ordering of the network. and in hfa384x_usb.c make calculations with respect to machine. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 28

RE: [PATCH 9/9] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.

2017-05-15 Thread Karim Eshapa
it's only one patch sorry, there is something going wrong with my 'git' creating patch. Thanks, Kaim

[PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.

2017-05-15 Thread Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be compatible with byte ordering of the network. and in hfa384x_usb.c make calculations with respect to machine. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 28

[PATCH 9/9] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.

2017-05-15 Thread Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be compatible with byte ordering of the network. and in hfa384x_usb.c make calculations with respect to machine. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 28

[PATCH] crypto: algapi: Use pr_err common logging style.

2017-05-13 Thread Karim Eshapa
Use more common error logging style. Signed-off-by: Karim Eshapa --- crypto/algapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/algapi.c b/crypto/algapi.c index 9eed4ef..e4cc761 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -260,7 +260,7 @@ void

[PATCH] staging: wlan-ng: p80211conv: change args types of p80211_caphdr structure to be network compatible.

2017-05-12 Thread Karim Eshapa
Change p80211_caphdr structure args types to __be.. to be compatible with byte ordering of the network. and in hfa384x_usb.c make calculations with respect to machine. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 28

RE: [PATCH] drivers:staging:wlan-ng:hfa384x_usb: Fixing sparse warnings.

2017-05-12 Thread Karim Eshapa
On Fri, 12 May 2017 10:07:14 +0200 Greg KH wrote: >First off, why the "Re:" in the subject? > >Second, your subject sucks :) > >Try making it a bit more descriptive as to what you are doing, "fixing >sparse warnings" is very vague. > >On Wed, May 10,

[PATCH] fs: cifs: transport: Use time_after for time comparison

2017-05-11 Thread Karim Eshapa
Use time_after kernel macro for time comparison that has safety check. Signed-off-by: Karim Eshapa --- fs/cifs/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 4d64b5b..a7f5168 100644 --- a/fs/cifs/transport.c +++ b

RE: [PATCH] drivers:staging:wlan-ng:hfa384x_usb: Fixing sparse warnings.

2017-05-10 Thread Karim Eshapa
rest of fixes. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- drivers/staging/wlan-ng/p80211conv.h | 28 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-

RE: [PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison

2017-05-08 Thread Karim Eshapa
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

[PATCH] drivers: net: wireless: rsi: rsi_91x_core: Use time_after time comparison

2017-05-08 Thread Karim Eshapa
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

[PATCH] drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison

2017-05-08 Thread Karim Eshapa
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

[PATCH] char: random: casting prevents missing calculations

2017-05-07 Thread Karim Eshapa
Cast (long)jiffies and (long)state->last_time beacause they tends to unsigned long. may cause a problem specially when comparison happens (< 0). Signed-off-by: Karim Eshapa --- drivers/char/random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/rand

RE: [PATCH] char: random: casting prevents missing calculations

2017-05-07 Thread Karim Eshapa
On Sun, 7 May 2017 20:36:55 +0200, Arnd Bergmann wrote: >On Sun, May 7, 2017 at 2:47 PM, Karim Eshapa wrote: >> Cast (long)jiffies and (long)state->last_time beacause >> they tends to unsigned long. may cause a problem specially >> when comparison happens (< 0). >&g

[PATCH] drivers:soc:fsl:qbman:qman.c: Change a comment for an entry check inside drain_mr_fqrni function

2017-05-05 Thread Karim Eshapa
Change the comment for an entry check inside function drain_mr_fqrni() with sleep for sufficient period of time instead of long time proccessor cycles. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 25 + 1 file changed, 13 insertions(+), 12 deletions

[PATCH] drivers:soc:fsl:qbman:qman.c: Change a comment for an entry check inside drain_mr_fqrni function

2017-05-05 Thread Karim Eshapa
Change the comment for an entry check inside function drain_mr_fqrni() with sleep for sufficient period of time instead of long time proccessor cycles. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 25 + 1 file changed, 13 insertions(+), 12 deletions

RE: [PATCH v2] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Karim Eshapa
>On 5/4/2017 5:07 PM, Scott Wood wrote: >> On Thu, 2017-05-04 at 06:58 +0200, Karim Eshapa wrote: >>> +stop = jiffies + 1; >>> +/* >>> + * if MR was full and h/w had other FQRNI entries to produce, we >>> + * need to al

RE: [PATCH v3] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-04 Thread Karim Eshapa
Use msleep() instead of stucking with long delay will be more efficient. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 3d891db..18d391e

[PATCH v2] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-05-03 Thread Karim Eshapa
aking the big loop delay. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 47 ++-- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 6f509f6..4f99298 100644

[PATCH] benet: Use time_before_eq for time comparison

2017-05-01 Thread Karim Eshapa
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

[PATCH] drivers:video:fbdev:omap:lcd_mipid.c: Use time comparison kernel macros

2017-04-30 Thread Karim Eshapa
Use time_before_eq time comparison defind kernel macro that has safety check. Signed-off-by: Karim Eshapa --- drivers/video/fbdev/omap/lcd_mipid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c

RE:[PATCH] drivers:staging:wlan-ng:hfa384x_usb: Fixing sparse warnings.

2017-04-30 Thread Karim Eshapa
On Fri, 28 Apr 2017 12:02:58 +0200, Greg KH wrote: > On Wed, Apr 26, 2017 at 06:15:40PM +0200, Karim Eshapa wrote: > >> Fixing sparse warnings incorrect type assignment. >> >> Signed-off-by: Karim Eshapa >> --- >> drivers/staging/wlan-ng/hfa384x_usb.c | 24

RE:drivers:soc:fsl:qbman:qman.c: unsigned long jiffies value

2017-04-29 Thread Karim Eshapa
On Sat, 29 Apr 2017 18:32:55 -0500, Scott Wood wrote: >On Sat, 2017-04-29 at 22:43 +0200, Karim Eshapa wrote: > >> unsigned long jiffies value sorry for that. >> > You mean unsigned long msecs? > Yes, I mean usecs. >> >> Signed-off-by: Karim Eshapa >>

[PATCH] drivers:soc:fsl:qbman:qman.c: unsigned long jiffies value.

2017-04-29 Thread Karim Eshapa
unsigned long jiffies value sorry for that. Signed-off-by: Karim Eshapa --- drivers/soc/fsl/qbman/qman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index e0df4d1..6e1a44a 100644 --- a/drivers/soc/fsl/qbman

[PATCH] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.

2017-04-29 Thread Karim Eshapa
Convert the jiffies into usecs then use it with usleep_range such that instead of stuck doing nothing until action happens, sleep with range improves responsiveness and power usage and avoid hacking jiffies. it's used for approximate time. You can check /kernel/time/timer.c. Signed-off-by:

[PATCH] drivers:net:ethernet:emulex:benet: Use time_before_eq for time comparison

2017-04-27 Thread Karim Eshapa
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

[PATCH] drivers:staging:wlan-ng:hfa384x_usb: Fixing sparse warnings.

2017-04-26 Thread Karim Eshapa
Fixing sparse warnings incorrect type assignment. Signed-off-by: Karim Eshapa --- drivers/staging/wlan-ng/hfa384x_usb.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c

RE:PATCH drivers:net:cris/eth_v10: alternate string char arrary

2017-04-24 Thread Karim Eshapa
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. &

PATCH drivers:net:cris/eth_v10: alternate string char arrary

2017-04-24 Thread Karim Eshapa
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

RE:drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro

2017-04-23 Thread Karim Eshapa
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 :)

[PATCH 1/1] drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro

2017-04-23 Thread Karim Eshapa
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

[PATCH 2/2] drivers:net:ethernet:3com:3c512: array char instead of char pointer

2017-04-21 Thread Karim Eshapa
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

[PATCH] fs:orangefs:orangefs-debug, orangefs-kernel: Fixing warning issues and use ARRAY_SIZE

2017-04-20 Thread Karim Eshapa
Fix warning issues produced by kbuild test and use a ARRAY_SIZE kernel defined macro more safe and remove unnecessary cast when __KERNEL__ is defined. Signed-off-by: Karim Eshapa --- fs/orangefs/orangefs-debug.h | 6 ++ fs/orangefs/orangefs-kernel.h | 2 ++ 2 files changed, 8 insertions

[PATCH] fs:orangefs:orangefs-debug.h: Use ARRAY_SIZE kernel macro

2017-04-19 Thread Karim Eshapa
Let's use the defined kernel macro more safe and remove unnecessary cast. Signed-off-by: Karim Eshapa --- fs/orangefs/orangefs-debug.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/orangefs/orangefs-debug.h b/fs/orangefs/orangefs-debug.h index 387db17..be

Re:drivers:watchdog:aspeed_wdt: using msleep instead of mdelay

2017-04-17 Thread Karim Eshapa
On Sun, 16 Apr 2017 12:53:28 -0700,Guenter Roeck wrote: > On 04/16/2017 09:33 AM, Karim Eshapa wrote: >> >> that's useful for the scheduler, power management unless >> the driver needs to delay in atomic context >> look at documentation/timers/timers-howto > &g

Re:staging:skein: skein_base.h, skein_block.h: move macros into appropriate header files

2017-04-17 Thread Karim Eshapa
On Mon, 17 Apr 2017 09:04:03 +0200, Greg KH wrote: > On Mon, Apr 17, 2017 at 02:47:34AM +0200, Karim Eshapa wrote: >> >> Macros more related to BLK operations. > > That doesn't make any sense to me, can you be more explicit?. skein_block.h contains all fn's rela

[PATCH 2/2] staging:skein: skein_base.h, skein_block.h: move macros into appropriate header files

2017-04-16 Thread Karim Eshapa
Macros more related to BLK operations. Signed-off-by: Karim Eshapa --- drivers/staging/skein/skein_base.h | 28 drivers/staging/skein/skein_block.h | 28 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/staging

[PATCH 2/2] staging:skein: skein_base.h, skein_block.h: move macros into appropriate header files

2017-04-16 Thread Karim Eshapa
Macros more related to BLK operations. Signed-off-by: Karim Eshapa --- drivers/staging/skein/skein_base.h | 28 drivers/staging/skein/skein_block.h | 28 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/staging

[PATCH] drivers:watchdog:aspeed_wdt: using msleep instead of mdelay

2017-04-16 Thread Karim Eshapa
that's useful for the scheduler, power management unless the driver needs to delay in atomic context look at documentation/timers/timers-howto Signed-off-by: Karim Eshapa --- drivers/watchdog/aspeed_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/wat