All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Pavel Machek <pavel@ucw.cz>, <pali.rohar@gmail.com>,
	<sre@kernel.org>, kernel list <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	<linux-omap@vger.kernel.org>, <tony@atomide.com>,
	<khilman@kernel.org>, <aaro.koskinen@iki.fi>,
	<ivo.g.dimitrov.75@gmail.com>, <patrikbachan@gmail.com>,
	<serge@hallyn.com>, <abcloriens@gmail.com>,
	Julia Lawall <Julia.Lawall@lip6.fr>
Subject: Re: linux-next 2017-08-08 keyboard failure on Nokia N900
Date: Tue, 8 Aug 2017 14:59:05 -0500	[thread overview]
Message-ID: <61264d43-eda3-df9d-0c06-28611f373ce7@ti.com> (raw)
In-Reply-To: <20170808111243.GA20328@amd>



On 08/08/2017 06:12 AM, Pavel Machek wrote:
> Hi!
> 
>>> I tried today's linux-next. It boots on n900 (up to X), but then my
>>> screen locks and I can't get back. Touchscreen worked, so my guess is
>>> keyboard does not...? Ssh connection over usb still works.
>>
>> Confirmed, its the keyboard.
>>
>> Additionally, battery monitoring fails, because neither
>>
>> /sys/class/power_supply/{n900-,rx51-}battery/voltage_now
>>
>> exists.
> 
> And dmesg is helpful in this case:
> 
> [    0.675201] input: twl4030_pwrbutton as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:pwrbutton/input/input1
> [    0.676635] input: TWL4030 Keypad as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:keypad/input/input2
> [    0.679138] twl4030_keypad 48070000.i2c:twl@48:keypad: request_irq
> failed for irq no=156: -13
> [    0.679779] twl4030_keypad: probe of 48070000.i2c:twl@48:keypad
> failed with error -13
> [    0.682769] twl4030_madc 48070000.i2c:twl@48:madc: could not
> request irq
> [    0.684051] twl4030_madc: probe of 48070000.i2c:twl@48:madc failed
> with error -13
> [    0.685852] input: twl4030:vibrator as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input3
> [    0.768890] omap_i2c 48070000.i2c: bus 1 rev3.3 at 2200 kHz
> 

I've not precisely checked it, but smth is telling me that below 
patch  can cause this:

commit 78daaca78ee57dead0f4aa5ee399f0499e81cd9e
Author: Julia Lawall <Julia.Lawall@lip6.fr>
Date:   Thu May 4 22:10:50 2017 +0200

    mfd: twl4030-irq: Drop unnecessary static
    
    Drop static on a local variable, when the variable is initialized before
    any use, on every possible execution path through the function.

--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -685,7 +685,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
 
 int twl4030_init_irq(struct device *dev, int irq_num)
 {
-       static struct irq_chip  twl4030_irq_chip;
+       struct irq_chip twl4030_irq_chip;


but if we will look at code - it can be seen that this variable is passed by reference to
irq_set_chip_and_handler(). 
Ops. And what will happen when twl4030_init_irq() returns ;)

-- 
regards,
-grygorii

WARNING: multiple messages have this Message-ID (diff)
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Pavel Machek <pavel@ucw.cz>,
	pali.rohar@gmail.com, sre@kernel.org,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-omap@vger.kernel.org, tony@atomide.com, khilman@kernel.org,
	aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com,
	patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com,
	Julia Lawall <Julia.Lawall@lip6.fr>
Subject: Re: linux-next 2017-08-08 keyboard failure on Nokia N900
Date: Tue, 8 Aug 2017 14:59:05 -0500	[thread overview]
Message-ID: <61264d43-eda3-df9d-0c06-28611f373ce7@ti.com> (raw)
In-Reply-To: <20170808111243.GA20328@amd>



On 08/08/2017 06:12 AM, Pavel Machek wrote:
> Hi!
> 
>>> I tried today's linux-next. It boots on n900 (up to X), but then my
>>> screen locks and I can't get back. Touchscreen worked, so my guess is
>>> keyboard does not...? Ssh connection over usb still works.
>>
>> Confirmed, its the keyboard.
>>
>> Additionally, battery monitoring fails, because neither
>>
>> /sys/class/power_supply/{n900-,rx51-}battery/voltage_now
>>
>> exists.
> 
> And dmesg is helpful in this case:
> 
> [    0.675201] input: twl4030_pwrbutton as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:pwrbutton/input/input1
> [    0.676635] input: TWL4030 Keypad as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:keypad/input/input2
> [    0.679138] twl4030_keypad 48070000.i2c:twl@48:keypad: request_irq
> failed for irq no=156: -13
> [    0.679779] twl4030_keypad: probe of 48070000.i2c:twl@48:keypad
> failed with error -13
> [    0.682769] twl4030_madc 48070000.i2c:twl@48:madc: could not
> request irq
> [    0.684051] twl4030_madc: probe of 48070000.i2c:twl@48:madc failed
> with error -13
> [    0.685852] input: twl4030:vibrator as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:audio/twl4030-vibra/input/input3
> [    0.768890] omap_i2c 48070000.i2c: bus 1 rev3.3 at 2200 kHz
> 

I've not precisely checked it, but smth is telling me that below 
patch  can cause this:

commit 78daaca78ee57dead0f4aa5ee399f0499e81cd9e
Author: Julia Lawall <Julia.Lawall@lip6.fr>
Date:   Thu May 4 22:10:50 2017 +0200

    mfd: twl4030-irq: Drop unnecessary static
    
    Drop static on a local variable, when the variable is initialized before
    any use, on every possible execution path through the function.

--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -685,7 +685,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
 
 int twl4030_init_irq(struct device *dev, int irq_num)
 {
-       static struct irq_chip  twl4030_irq_chip;
+       struct irq_chip twl4030_irq_chip;


but if we will look at code - it can be seen that this variable is passed by reference to
irq_set_chip_and_handler(). 
Ops. And what will happen when twl4030_init_irq() returns ;)

-- 
regards,
-grygorii

WARNING: multiple messages have this Message-ID (diff)
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: linux-next 2017-08-08 keyboard failure on Nokia N900
Date: Tue, 8 Aug 2017 14:59:05 -0500	[thread overview]
Message-ID: <61264d43-eda3-df9d-0c06-28611f373ce7@ti.com> (raw)
In-Reply-To: <20170808111243.GA20328@amd>



On 08/08/2017 06:12 AM, Pavel Machek wrote:
> Hi!
> 
>>> I tried today's linux-next. It boots on n900 (up to X), but then my
>>> screen locks and I can't get back. Touchscreen worked, so my guess is
>>> keyboard does not...? Ssh connection over usb still works.
>>
>> Confirmed, its the keyboard.
>>
>> Additionally, battery monitoring fails, because neither
>>
>> /sys/class/power_supply/{n900-,rx51-}battery/voltage_now
>>
>> exists.
> 
> And dmesg is helpful in this case:
> 
> [    0.675201] input: twl4030_pwrbutton as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl at 48:pwrbutton/input/input1
> [    0.676635] input: TWL4030 Keypad as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl at 48:keypad/input/input2
> [    0.679138] twl4030_keypad 48070000.i2c:twl at 48:keypad: request_irq
> failed for irq no=156: -13
> [    0.679779] twl4030_keypad: probe of 48070000.i2c:twl at 48:keypad
> failed with error -13
> [    0.682769] twl4030_madc 48070000.i2c:twl at 48:madc: could not
> request irq
> [    0.684051] twl4030_madc: probe of 48070000.i2c:twl at 48:madc failed
> with error -13
> [    0.685852] input: twl4030:vibrator as
> /devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl at 48:audio/twl4030-vibra/input/input3
> [    0.768890] omap_i2c 48070000.i2c: bus 1 rev3.3 at 2200 kHz
> 

I've not precisely checked it, but smth is telling me that below 
patch  can cause this:

commit 78daaca78ee57dead0f4aa5ee399f0499e81cd9e
Author: Julia Lawall <Julia.Lawall@lip6.fr>
Date:   Thu May 4 22:10:50 2017 +0200

    mfd: twl4030-irq: Drop unnecessary static
    
    Drop static on a local variable, when the variable is initialized before
    any use, on every possible execution path through the function.

--- a/drivers/mfd/twl4030-irq.c
+++ b/drivers/mfd/twl4030-irq.c
@@ -685,7 +685,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
 
 int twl4030_init_irq(struct device *dev, int irq_num)
 {
-       static struct irq_chip  twl4030_irq_chip;
+       struct irq_chip twl4030_irq_chip;


but if we will look at code - it can be seen that this variable is passed by reference to
irq_set_chip_and_handler(). 
Ops. And what will happen when twl4030_init_irq() returns ;)

-- 
regards,
-grygorii

  reply	other threads:[~2017-08-08 20:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 10:17 linux-next 2017-08-08 failure on Nokia N900 Pavel Machek
2017-08-08 10:17 ` Pavel Machek
2017-08-08 10:34 ` Pavel Machek
2017-08-08 10:34   ` Pavel Machek
2017-08-08 11:12   ` linux-next 2017-08-08 keyboard " Pavel Machek
2017-08-08 11:12     ` Pavel Machek
2017-08-08 19:59     ` Grygorii Strashko [this message]
2017-08-08 19:59       ` Grygorii Strashko
2017-08-08 19:59       ` Grygorii Strashko
2017-08-08 20:09       ` Julia Lawall
2017-08-08 20:09         ` Julia Lawall
2017-08-08 20:15         ` Grygorii Strashko
2017-08-08 20:15           ` Grygorii Strashko
2017-08-08 20:15           ` Grygorii Strashko
2017-08-08 20:30           ` Julia Lawall
2017-08-08 20:30             ` Julia Lawall
2017-08-08 21:44             ` Pavel Machek
2017-08-08 21:44               ` Pavel Machek
2017-08-09 12:45               ` Lee Jones
2017-08-09 12:45                 ` Lee Jones
2017-08-10 17:10       ` Pavel Machek
2017-08-10 17:10         ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61264d43-eda3-df9d-0c06-28611f373ce7@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=aaro.koskinen@iki.fi \
    --cc=abcloriens@gmail.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=patrikbachan@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=serge@hallyn.com \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.