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
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
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
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
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
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
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
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
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
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
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
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
>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
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
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
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
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
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
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
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
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
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
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
it's only one patch sorry, there is
something going wrong with my 'git' creating patch.
Thanks,
Kaim
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
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
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
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
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,
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
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-
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
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
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
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
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
>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
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
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
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 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
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
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
>>
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
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:
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
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
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
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
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
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
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
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
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
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
66 matches
Mail list logo