[PATCH net-next] staging: irda: update MAINTAINERS
Now that the IRDA code has moved under drivers/staging/irda/, update the MAINTAINERS file with the new location. Reported-by: Joe Perches Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6fdfe2685eed..ff19b1c3141c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7101,9 +7101,7 @@ W:http://irda.sourceforge.net/ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6.git F: Documentation/networking/irda.txt -F: drivers/net/irda/ -F: include/net/irda/ -F: net/irda/ +F: drivers/staging/irda/ IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY) M: Marc Zyngier -- 2.14.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
74310e06be ("android: binder: Move buffer out of area shared .."): BUG: unable to handle kernel NULL pointer dereference at 00000014
Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next commit 74310e06be4d74dcf67cd108366710dee5c576d5 Author: Sherry Yang AuthorDate: Wed Aug 23 08:46:41 2017 -0700 Commit: Greg Kroah-Hartman CommitDate: Mon Aug 28 16:47:17 2017 +0200 android: binder: Move buffer out of area shared with user space Binder driver allocates buffer meta data in a region that is mapped in user space. These meta data contain pointers in the kernel. This patch allocates buffer meta data on the kernel heap that is not mapped in user space, and uses a pointer to refer to the data mapped. Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman 4175e2b46f android: binder: Add allocator selftest 74310e06be android: binder: Move buffer out of area shared with user space ac317e2767 char: virtio: constify attribute_group structures. +--++++ | | 4175e2b46f | 74310e06be | ac317e2767 | +--++++ | boot_successes | 623| 211| 40 | | boot_failures| 0 | 6 | 2 | | BUG:unable_to_handle_kernel | 0 | 6 | 2 | | Oops:#[##] | 0 | 6 | 2 | | EIP:binder_alloc_deferred_release| 0 | 6 | 2 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 6 | 2 | +--++++ or similar which could potentially make this machine unbootable without a firmware reset. ctrl-c now unless you really know what you are doing. [5.21] init: networking main process (377) terminated with status 1 [ 13.636567] sock: process `trinity-main' is using obsolete setsockopt SO_BSDCOMPAT [ 14.977100] BUG: unable to handle kernel NULL pointer dereference at 0014 [ 14.979193] IP: binder_alloc_deferred_release+0xd3/0x270 [ 14.980697] *pde = [ 14.980698] [ 14.981969] Oops: [#1] DEBUG_PAGEALLOC [ 14.983162] Modules linked in: [ 14.984040] CPU: 0 PID: 17 Comm: kworker/0:1 Not tainted 4.13.0-rc7-00153-g74310e0 #2 [ 14.986244] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [ 14.989116] Workqueue: events binder_deferred_func [ 14.990477] task: 54936880 task.stack: 54938000 [ 14.991779] EIP: binder_alloc_deferred_release+0xd3/0x270 [ 14.993311] EFLAGS: 00010202 CPU: 0 [ 14.994308] EAX: EBX: ECX: 49e2fda8 EDX: 41585c49 [ 14.996083] ESI: 49e2fd30 EDI: 49e2fd54 EBP: 54939ebc ESP: 54939ea4 [ 14.997857] DS: 007b ES: 007b FS: GS: SS: 0068 [ 14.999383] CR0: 80050033 CR2: 0014 CR3: 01c36000 CR4: 0690 [ 15.001161] Call Trace: [ 15.001877] binder_proc_dec_tmpref+0xab/0xf0 [ 15.003116] binder_deferred_func+0x5e8/0x660 [ 15.004362] process_one_work+0x3af/0x7c0 [ 15.005507] worker_thread+0x353/0x640 [ 15.006581] kthread+0x104/0x110 [ 15.007511] ? process_one_work+0x7c0/0x7c0 [ 15.008709] ? kthread_create_on_node+0x20/0x20 [ 15.010006] ret_from_fork+0x19/0x30 [ 15.011032] Code: 39 c1 75 24 8d 74 26 00 8b 47 68 85 c0 0f 85 d5 00 00 00 c7 45 ec 00 00 00 00 e9 76 01 00 00 89 f6 8d bc 27 00 00 00 00 8b 5f 54 <8a> 43 14 88 45 ec 89 c6 f7 d6 83 e6 01 6a 00 31 c9 89 f2 b8 b8 [ 15.016895] EIP: binder_alloc_deferred_release+0xd3/0x270 SS:ESP: 0068:54939ea4 [ 15.018967] CR2: 0014 [ 15.019925] ---[ end trace b386b8ff60a7e4be ]--- [ 15.021245] Kernel panic - not syncing: Fatal exception # HH:MM RESULT GOOD BAD GOOD_BUT_DIRTY DIRTY_NOT_BAD git bisect start d39f794ae6483f48e2b30ba997731a5511616871 cc4a41fe5541a73019a864883297bd5043aa6d98 -- git bisect bad 2c7a198a25595fe381b0c6c331f39e452974fb35 # 10:57 B 16 10 0 Merge 'usb/usb-testing' into devel-spot-201708290015 git bisect bad deda0b2d240d49d23f9f74bcba1ef534a6ea5020 # 11:18 B 22 30 0 Merge 'linux-de/upstream/rm_cpu_eff' into devel-spot-201708290015 git bisect bad 3d5a39f092f06fcde9cdc38edfde9302ee53a946 # 11:39 B 79 10 0 Merge 'linux-review/Yurii-Pavlenko/Staging-rtlwifi-efuse-fix-up-a-warning-kzalloc/20170828-232255' into devel-spot-201708290015 git bisect good 30e81e7e25330554b568ab77eb45ae5835d9aded # 12:14 G202 00 0 Merge 'driver-core/driver-core-testing' into devel-spot-201708290015 git bisect bad 586d662c3fd5e610274f9e027b2ad66ec63130c5 # 12:31 B 12 10 0 Merge 'char-misc/char-misc-testing' into devel-spot-201
Re: [PATCH v2] staging: most: hdm_usb: Driver registration with module_usb_driver
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Tue, Aug 29, 2017 at 11:44:37AM +0300, Alex Briskin wrote: > A change was made to the commit message itself. > In V1, as pointed out by Andy, I left module_driver instead of > module_usb_driver in the commit message. Then say that below the --- line. Also, please fix your email client to not send html email, the mailing lists reject that... thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH net-next] staging: irda: force to be a kernel module
Now that the IRDA networking code has moved into drivers/staging/, the link order is changed for when it is initialized if built into the system. This can cause a crash when initializing as the netfilter core hasn't been initialized yet. So force the IRDA code to be built as a module, preventing the crash. Reported-by: kernel test robot Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/irda/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/irda/net/Kconfig b/drivers/staging/irda/net/Kconfig index 6abeae6c666a..9c6489bcb596 100644 --- a/drivers/staging/irda/net/Kconfig +++ b/drivers/staging/irda/net/Kconfig @@ -3,7 +3,7 @@ # menuconfig IRDA - depends on NET && !S390 + depends on NET && !S390 && m tristate "IrDA (infrared) subsystem support" select CRC_CCITT ---help--- -- 2.14.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] Fix Avoid CamelCase
[Patch 1/2] : Replace 'IELength' and 'IEs' of struct wlan_bssid_ex with 'ie_length' and 'ies' [Patch 2/2] : Remove wrongly commented out lines from the code and rename 'ies' to 'ie' as per suggestions Janani Sankara Babu (2): staging:rtl8188eu:core Fix Avoid CamelCase staging:rtl8188eu:core Fix Avoid CamelCase drivers/staging/rtl8188eu/core/rtw_ap.c | 86 ++-- drivers/staging/rtl8188eu/core/rtw_cmd.c| 26 +++--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 20 ++--- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 66 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 100 drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 34 drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c| 16 ++-- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 10 +-- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +-- 10 files changed, 186 insertions(+), 186 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging:rtl8188eu:core Fix Avoid CamelCase
This patch is created to solve the CamelCase issue. The members 'IEs' and 'IELength' of struct wlan_bssid_ex are modified to 'ies' and 'ie_length' to solve the issue.And all the places where these variables are referenced inside rtl8188eu driver are also changed. Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8188eu/core/rtw_ap.c | 89 +++-- drivers/staging/rtl8188eu/core/rtw_cmd.c| 26 +++--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 20 ++--- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 66 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 100 drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 34 drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c| 16 ++-- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 10 +-- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +-- 10 files changed, 189 insertions(+), 186 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 647a922..2cd20f1 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -69,19 +69,22 @@ static void update_BCNTIM(struct adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network; - unsigned char *pie = pnetwork_mlmeext->IEs; + //unsigned char *pie = pnetwork_mlmeext->ies; + unsigned char *pie = pnetwork_mlmeext->ies; u8 *p, *dst_ie, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen; /* update TIM IE */ + //p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, + //pnetwork_mlmeext->ie_length - _FIXED_IE_LENGTH_); p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, - pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_); + pnetwork_mlmeext->ie_length - _FIXED_IE_LENGTH_); if (p && tim_ielen > 0) { tim_ielen += 2; premainder_ie = p + tim_ielen; tim_ie_offset = (int)(p - pie); - remainder_ielen = pnetwork_mlmeext->IELength - + remainder_ielen = pnetwork_mlmeext->ie_length - tim_ie_offset - tim_ielen; /* append TIM IE from dst_ie offset */ dst_ie = p; @@ -94,7 +97,7 @@ static void update_BCNTIM(struct adapter *padapter) /* get supported rates len */ p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, - &tmp_len, (pnetwork_mlmeext->IELength - + &tmp_len, (pnetwork_mlmeext->ie_length - _BEACON_IE_OFFSET_)); if (p) offset += tmp_len+2; @@ -104,7 +107,7 @@ static void update_BCNTIM(struct adapter *padapter) premainder_ie = pie + offset; - remainder_ielen = pnetwork_mlmeext->IELength - + remainder_ielen = pnetwork_mlmeext->ie_length - offset - tim_ielen; /* append TIM IE from offset */ @@ -119,7 +122,7 @@ static void update_BCNTIM(struct adapter *padapter) } *dst_ie++ = _TIM_IE_; - if ((pstapriv->tim_bitmap&0xff00) && (pstapriv->tim_bitmap&0x00fc)) + if ((pstapriv->tim_bitmap & 0xff00) && (pstapriv->tim_bitmap & 0x00fc)) tim_ielen = 5; else tim_ielen = 4; @@ -129,7 +132,7 @@ static void update_BCNTIM(struct adapter *padapter) *dst_ie++ = 0;/* DTIM count */ *dst_ie++ = 1;/* DTIM period */ - if (pstapriv->tim_bitmap&BIT(0))/* for bc/mc frames */ + if (pstapriv->tim_bitmap & BIT(0))/* for bc/mc frames */ *dst_ie++ = BIT(0);/* bitmap ctrl */ else *dst_ie++ = 0; @@ -148,7 +151,7 @@ static void update_BCNTIM(struct adapter *padapter) kfree(pbackup_remainder_ie); } offset = (uint)(dst_ie - pie); - pnetwork_mlmeext->IELength = offset + remainder_ielen; + pnetwork_mlmeext->ie_length = offset + remainder_ielen; set_tx_beacon_cmd(padapter); } @@ -158,13 +161,13 @@ void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, { struct ndis_802_11_var_ie *pIE; u8 bmatch = false; - u8 *pie = pnetwork->IEs; + u8 *pie = pnetwork->ies; u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; u32 i, offset, ielen = 0, ie_offset, remainder_ielen = 0; - for (i = sizeof(struct ndis_802_11_
[PATCH 2/2] staging:rtl8188eu:core Fix Avoid CamelCase
This patch is created to solve the CamelCase issue. The members 'IEs' and 'IELength' of struct wlan_bssid_ex are being modified to 'ie' and 'ie_length' to solve the issue. And all the places where these variables are referenced inside rtl8188eu driver are also changed. Signed-off-by: Janani Sankara Babu --- Changes since V1: * Removed the commented lines that was added by me * Changed variable name from 'ies' to 'ie' as suggested by Dan Carpenter drivers/staging/rtl8188eu/core/rtw_ap.c | 21 -- drivers/staging/rtl8188eu/core/rtw_cmd.c| 14 +++ drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 20 - drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 24 +-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 56 - drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 26 ++-- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c| 8 ++-- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 2 +- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 10 ++--- 10 files changed, 90 insertions(+), 93 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 2cd20f1..a52c856 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -69,15 +69,12 @@ static void update_BCNTIM(struct adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network; - //unsigned char *pie = pnetwork_mlmeext->ies; - unsigned char *pie = pnetwork_mlmeext->ies; + unsigned char *pie = pnetwork_mlmeext->ie; u8 *p, *dst_ie, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen; /* update TIM IE */ - //p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, - //pnetwork_mlmeext->ie_length - _FIXED_IE_LENGTH_); p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, pnetwork_mlmeext->ie_length - _FIXED_IE_LENGTH_); if (p && tim_ielen > 0) { @@ -161,13 +158,13 @@ void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, { struct ndis_802_11_var_ie *pIE; u8 bmatch = false; - u8 *pie = pnetwork->ies; + u8 *pie = pnetwork->ie; u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; u32 i, offset, ielen = 0, ie_offset, remainder_ielen = 0; for (i = sizeof(struct ndis_802_11_fixed_ie); i < pnetwork->ie_length;) { - pIE = (struct ndis_802_11_var_ie *)(pnetwork->ies + i); + pIE = (struct ndis_802_11_var_ie *)(pnetwork->ie + i); if (pIE->ElementID > index) { break; @@ -228,7 +225,7 @@ void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 *p, *dst_ie = NULL, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; uint offset, ielen, ie_offset, remainder_ielen = 0; - u8 *pie = pnetwork->ies; + u8 *pie = pnetwork->ie; p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, index, &ielen, pnetwork->ie_length - _FIXED_IE_LENGTH_); @@ -743,7 +740,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf) * beacon twice when stating hostapd, and at first time the * security ie (RSN/WPA IE) will not include in beacon. */ - if (!rtw_get_wps_ie(pnetwork->ies + _FIXED_IE_LENGTH_, pnetwork->ie_length - _FIXED_IE_LENGTH_, NULL, NULL)) + if (!rtw_get_wps_ie(pnetwork->ie + _FIXED_IE_LENGTH_, pnetwork->ie_length - _FIXED_IE_LENGTH_, NULL, NULL)) pmlmeext->bstart_bss = true; /* todo: update wmm, ht cap */ @@ -797,7 +794,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf) Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); } /* set channel, bwmode */ - p = rtw_get_ie((pnetwork->ies + sizeof(struct ndis_802_11_fixed_ie)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->ie_length - sizeof(struct ndis_802_11_fixed_ie))); + p = rtw_get_ie((pnetwork->ie + sizeof(struct ndis_802_11_fixed_ie)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->ie_length - sizeof(struct ndis_802_11_fixed_ie))); if (p && ie_len) { pht_info = (struct HT_info_element *)(p + 2); @@ -869,7 +866,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) struct security_priv *psecuritypriv = &padapter->securitypriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_bssid_ex *pbss_network = (struct wlan_bssid_ex *)&pmlmepriv->cur_network.network; -
Re: [PATCH 0/2] Fix Avoid CamelCase
You're sending this wrong. The [PATCH 2/2] is fixing the stuff I complained about in [PATCH 1/2]. The patches need to be folded into a single patch and the subject should say "[PATCH v3] staging: rtl8188eu: Rename CamelCase variables". Please can you resend it. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: most: hdm_usb: Driver registration with module_usb_driver
On Tue, Aug 29, 2017 at 11:44:37AM +0300, Alex Briskin wrote: > A change was made to the commit message itself. > In V1, as pointed out by Andy, I left module_driver instead of > module_usb_driver in the commit message. Dont't forget to fix the subject. "Driver registration ..." is not compliant to the rules: [Describe your changes in imperative mood, e.g. “make xyzzy do frotz” instead of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to do frotz”, as if you are giving orders to the codebase to change its behaviour.](https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html#describe-your-changes) > > On Aug 29, 2017 9:25 AM, "Greg KH" wrote: > > On Mon, Aug 28, 2017 at 08:40:16PM +0300, Alex Briskin wrote: > > Register with module_usb_driver macro instead of module_init/module_exit. > > > > Signed-off-by: Alex Briskin > > --- > > drivers/staging/most/hdm-usb/hdm_usb.c | 20 +--- > > 1 file changed, 1 insertion(+), 19 deletions(-) > > What changed from v1? Always put that below the --- line so we know > what is going on. > > Also, isn't this patch already applied in my tree? Why resend it? > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
Hi Greg, On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman wrote: > The IRDA code has long been obsolete and broken. So, to keep people > from trying to use it, and to prevent people from having to maintain it, > let's move it to drivers/staging/ so that we can delete it entirely from > the kernel in a few releases. (diving into an early boot crash) Have you tried running this? ;-) irda_init() and net_dev_init() are both subsys_initcall()s. But the former now runs before the latter, leading to: Unable to handle kernel NULL pointer dereference at virtual address 0004 pgd = c0004000 [0004] *pgd= Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc7-kzm9g-05769-g46efec19d1294ece-dirty #954 Hardware name: Generic SH73A0 (Flattened Device Tree) task: df440040 task.stack: df442000 PC is at __list_add_valid+0x8/0x74 LR is at 0x0 pc : []lr : [<>]psr: 6013 sp : df443ef0 ip : df440630 fp : r10: c0828858 r9 : c0937000 r8 : r7 : c0908034 r6 : r5 : c0908020 r4 : c090862c r3 : df440040 r2 : r1 : c090862c r0 : c0908034 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 4000404a DAC: 0051 Process swapper/0 (pid: 1, stack limit = 0xdf442210) Stack: (0xdf443ef0 to 0xdf444000) 3ee0: c090862c c0489ea8 3f00: c081c274 0093 c0836418 c081c2a0 0004 c0101878 c0790758 3f20: c013fec0 0001 c078fbf0 0004 0004 c079076c dfffce3f 3f40: 0092 c079076c dfffce3f dfffce47 c0910af0 0004 c0828844 0093 3f60: 0004 c0828848 0093 c0836418 c0937000 c0800d28 0004 0004 3f80: c08005b0 c055cf7c 3fa0: c055cf84 c0106f90 3fc0: 3fe0: 0013 7fdf fff7fdff [] (__list_add_valid) from [] (dev_add_pack+0x70/0xac) [] (dev_add_pack) from [] (irda_init+0x2c/0x84) [] (irda_init) from [] (do_one_initcall+0xa8/0x150) [] (do_one_initcall) from [] (kernel_init_freeable+0x114/0x1d4) [] (kernel_init_freeable) from [] (kernel_init+0x8/0x110) [] (kernel_init) from [] (ret_from_fork+0x14/0x24) DIsabling CONFIG_IRDA (apparently I wasn't using it anyway), and continuing my life... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 08/14] power: supply: Add power_supply_set_input_current_limit_from_supplier helper
Hi, On Tue, Aug 15, 2017 at 10:04:56PM +0200, Hans de Goede wrote: > On some devices the USB Type-C port power (USB PD 2.0) negotiation is > done by a separate port-controller IC, while the current limit is > controlled through another (charger) IC. > > It has been decided to model this by modelling the external Type-C > power brick (adapter/charger) as a power-supply class device which > supplies the charger-IC, with its voltage-now and current-max representing > the negotiated voltage and max current draw. > > This commit adds a power_supply_set_input_current_limit_from_supplier > helper function which charger power-supply drivers can call to get > the max-current from their supplier and have this applied > through their set_property call-back to their input-current-limit. > > Signed-off-by: Hans de Goede Thanks, queued. -- Sebastian > drivers/power/supply/power_supply_core.c | 41 > > include/linux/power_supply.h | 2 ++ > 2 files changed, 43 insertions(+) > > diff --git a/drivers/power/supply/power_supply_core.c > b/drivers/power/supply/power_supply_core.c > index 0741fce..3f92574 100644 > --- a/drivers/power/supply/power_supply_core.c > +++ b/drivers/power/supply/power_supply_core.c > @@ -375,6 +375,47 @@ int power_supply_is_system_supplied(void) > } > EXPORT_SYMBOL_GPL(power_supply_is_system_supplied); > > +static int __power_supply_get_supplier_max_current(struct device *dev, > +void *data) > +{ > + union power_supply_propval ret = {0,}; > + struct power_supply *epsy = dev_get_drvdata(dev); > + struct power_supply *psy = data; > + > + if (__power_supply_is_supplied_by(epsy, psy)) > + if (!epsy->desc->get_property(epsy, > + POWER_SUPPLY_PROP_CURRENT_MAX, > + &ret)) > + return ret.intval; > + > + return 0; > +} > + > +int power_supply_set_input_current_limit_from_supplier(struct power_supply > *psy) > +{ > + union power_supply_propval val = {0,}; > + int curr; > + > + if (!psy->desc->set_property) > + return -EINVAL; > + > + /* > + * This function is not intended for use with a supply with multiple > + * suppliers, we simply pick the first supply to report a non 0 > + * max-current. > + */ > + curr = class_for_each_device(power_supply_class, NULL, psy, > + __power_supply_get_supplier_max_current); > + if (curr <= 0) > + return (curr == 0) ? -ENODEV : curr; > + > + val.intval = curr; > + > + return psy->desc->set_property(psy, > + POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, &val); > +} > +EXPORT_SYMBOL_GPL(power_supply_set_input_current_limit_from_supplier); > + > int power_supply_set_battery_charged(struct power_supply *psy) > { > if (atomic_read(&psy->use_cnt) >= 0 && > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h > index de89066..79e90b3 100644 > --- a/include/linux/power_supply.h > +++ b/include/linux/power_supply.h > @@ -332,6 +332,8 @@ extern int power_supply_get_battery_info(struct > power_supply *psy, >struct power_supply_battery_info > *info); > extern void power_supply_changed(struct power_supply *psy); > extern int power_supply_am_i_supplied(struct power_supply *psy); > +extern int power_supply_set_input_current_limit_from_supplier( > + struct power_supply *psy); > extern int power_supply_set_battery_charged(struct power_supply *psy); > > #ifdef CONFIG_POWER_SUPPLY > -- > 2.9.4 > signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: staging: r8822be: Add code for halmac sub-driver
Hi Ping-Ke, hi Larry, I noticed your commit in linux-next today using the in-tree script at scripts/checkkconfigsymbols.py [0]. The script showed that it uses CONFIG_RTL_DEBUG in an #ifdef statement - this symbol, however, does not exist, and should probably be CONFIG_RTLWIFI_DEBUG instead. I attached a patch which fixes this problem. Best regards, Andreas Ziegler [0]: I called the script like this: './scripts/checkkconfigsymbols.py --force -c 938a0447f094' From 6c713900ed877c01f94fb76630f9ffd32c73ec88 Mon Sep 17 00:00:00 2001 From: Andreas Ziegler Date: Tue, 29 Aug 2017 12:50:37 +0200 Subject: [PATCH] staging: r8822be: Fix typo for CONFIG_RTLWIFI_DEBUG The debugging output in deinit_priv is guarded by an #ifdef using CONFIG_RTL_DEBUG. This symbol does not exist and should be CONFIG_RTLWIFI_DEBUG instead. Signed-off-by: Andreas Ziegler --- drivers/staging/rtlwifi/halmac/rtl_halmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c index 031bf2c..888ca43 100644 --- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c +++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c @@ -386,7 +386,7 @@ static void deinit_priv(struct rtl_halmac *halmac) u32 count, size; count = HALMAC_FEATURE_ALL + 1; -#ifdef CONFIG_RTL_DEBUG +#ifdef CONFIG_RTLWIFI_DEBUG { struct submit_ctx *sctx; u32 i; @@ -405,7 +405,7 @@ static void deinit_priv(struct rtl_halmac *halmac) rtl_mfree((u8 *)sctx, sizeof(*sctx)); } } -#endif /* !CONFIG_RTL_DEBUG */ +#endif /* !CONFIG_RTLWIFI_DEBUG */ size = sizeof(*indicator) * count; kfree((u8 *)indicator); } -- 2.7.4 smime.p7s Description: S/MIME Cryptographic Signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
On Tue, 29 Aug 2017 12:59:00 +0200 Geert Uytterhoeven wrote: > Hi Greg, > > On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman > wrote: > > The IRDA code has long been obsolete and broken. So, to keep people > > from trying to use it, and to prevent people from having to maintain it, > > let's move it to drivers/staging/ so that we can delete it entirely from > > the kernel in a few releases. > > (diving into an early boot crash) > > Have you tried running this? ;-) > > irda_init() and net_dev_init() are both subsys_initcall()s. > But the former now runs before the latter, leading to: > > Unable to handle kernel NULL pointer dereference at virtual address 0004 Should be fixed by https://patchwork.ozlabs.org/patch/807006/ ("[net-next] staging: irda: force to be a kernel module") I guess... -- Stefano ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: staging: r8822be: Add code for halmac sub-driver
On Tue, Aug 29, 2017 at 12:59:27PM +0200, Andreas Ziegler wrote: > Hi Ping-Ke, hi Larry, > > I noticed your commit in linux-next today using the in-tree script at > scripts/checkkconfigsymbols.py [0]. The script showed that it uses > CONFIG_RTL_DEBUG in an #ifdef statement - this symbol, however, does not > exist, > and should probably be CONFIG_RTLWIFI_DEBUG instead. > > I attached a patch which fixes this problem. Please resend this in a format in which I can apply it in (i.e. in a proper email, cc: the correct mailing lists, etc.) thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
On Tue, Aug 29, 2017 at 01:11:31PM +0200, Stefano Brivio wrote: > On Tue, 29 Aug 2017 12:59:00 +0200 > Geert Uytterhoeven wrote: > > > Hi Greg, > > > > On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman > > wrote: > > > The IRDA code has long been obsolete and broken. So, to keep people > > > from trying to use it, and to prevent people from having to maintain it, > > > let's move it to drivers/staging/ so that we can delete it entirely from > > > the kernel in a few releases. > > > > (diving into an early boot crash) > > > > Have you tried running this? ;-) > > > > irda_init() and net_dev_init() are both subsys_initcall()s. > > But the former now runs before the latter, leading to: > > > > Unable to handle kernel NULL pointer dereference at virtual address 0004 > > Should be fixed by https://patchwork.ozlabs.org/patch/807006/ > ("[net-next] staging: irda: force to be a kernel module") I guess... Yup, that's the fix for this issue. Geert, does that fix the problem for you? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 09/14] power: supply: bq24190_charger: Export 5V boost converter as regulator
Hi, On Tue, Aug 15, 2017 at 10:04:57PM +0200, Hans de Goede wrote: > Register the 5V boost converter as a regulator named "usb_otg_vbus". > > This commit also adds support for bq24190_platform_data, through which > non device-tree platforms can pass the regulator_init_data (containing > mappings for the consumer amongst other things). > > Signed-off-by: Hans de Goede > --- > Changes in v2: > -Use "usb_otg_vbus" as default name for the regulator > -Add support for passing regulator_init_data for non device-tree platforms > -Register the regulator later, to avoid it showing up and shortly later > disappearing again on probe errors (e.g. -EPROBE_DEFER). > --- > drivers/power/supply/bq24190_charger.c | 126 > + > include/linux/power/bq24190_charger.h | 18 + > 2 files changed, 144 insertions(+) > create mode 100644 include/linux/power/bq24190_charger.h > > diff --git a/drivers/power/supply/bq24190_charger.c > b/drivers/power/supply/bq24190_charger.c > index d5a707e..073cd9d 100644 > --- a/drivers/power/supply/bq24190_charger.c > +++ b/drivers/power/supply/bq24190_charger.c > @@ -16,6 +16,9 @@ > #include > #include > #include > +#include > +#include > +#include > #include > #include > #include > @@ -504,6 +507,125 @@ static int bq24190_sysfs_create_group(struct > bq24190_dev_info *bdi) > static inline void bq24190_sysfs_remove_group(struct bq24190_dev_info *bdi) > {} > #endif > > +#ifdef CONFIG_REGULATOR > + > +static int bq24190_vbus_enable(struct regulator_dev *dev) > +{ > + struct bq24190_dev_info *bdi = rdev_get_drvdata(dev); > + int ret; > + > + ret = pm_runtime_get_sync(bdi->dev); > + if (ret < 0) { > + dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", ret); > + pm_runtime_put_noidle(bdi->dev); > + return ret; > + } > + > + ret = bq24190_write_mask(bdi, BQ24190_REG_POC, > + BQ24190_REG_POC_CHG_CONFIG_MASK, > + BQ24190_REG_POC_CHG_CONFIG_SHIFT, > + BQ24190_REG_POC_CHG_CONFIG_OTG); > + > + pm_runtime_mark_last_busy(bdi->dev); > + pm_runtime_put_autosuspend(bdi->dev); > + > + return ret; > +} > + > +static int bq24190_vbus_disable(struct regulator_dev *dev) > +{ > + struct bq24190_dev_info *bdi = rdev_get_drvdata(dev); > + int ret; > + > + ret = pm_runtime_get_sync(bdi->dev); > + if (ret < 0) { > + dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", ret); > + pm_runtime_put_noidle(bdi->dev); > + return ret; > + } > + > + ret = bq24190_write_mask(bdi, BQ24190_REG_POC, > + BQ24190_REG_POC_CHG_CONFIG_MASK, > + BQ24190_REG_POC_CHG_CONFIG_SHIFT, > + BQ24190_REG_POC_CHG_CONFIG_CHARGE); > + > + pm_runtime_mark_last_busy(bdi->dev); > + pm_runtime_put_autosuspend(bdi->dev); > + > + return ret; > +} Let's reduce code duplication: static int bq24190_vbus_set(dev, val) { ... } static int bq24190_vbus_enable(dev) { return bq24190_vbus_set(dev, BQ24190_REG_POC_CHG_CONFIG_OTG); } static int bq24190_vbus_disable(dev) { return bq24190_vbus_set(dev, BQ24190_REG_POC_CHG_CONFIG_CHARGE); } > +static int bq24190_vbus_is_enabled(struct regulator_dev *dev) > +{ > + struct bq24190_dev_info *bdi = rdev_get_drvdata(dev); > + int ret; > + u8 val; > + > + ret = pm_runtime_get_sync(bdi->dev); > + if (ret < 0) { > + dev_warn(bdi->dev, "pm_runtime_get failed: %i\n", ret); > + pm_runtime_put_noidle(bdi->dev); > + return ret; > + } > + > + ret = bq24190_read_mask(bdi, BQ24190_REG_POC, > + BQ24190_REG_POC_CHG_CONFIG_MASK, > + BQ24190_REG_POC_CHG_CONFIG_SHIFT, &val); > + > + pm_runtime_mark_last_busy(bdi->dev); > + pm_runtime_put_autosuspend(bdi->dev); > + > + return ret ? ret : val == BQ24190_REG_POC_CHG_CONFIG_OTG; > +} > + > +static const struct regulator_ops bq24190_vbus_ops = { > + .enable = bq24190_vbus_enable, > + .disable = bq24190_vbus_disable, > + .is_enabled = bq24190_vbus_is_enabled, > +}; > + > +static const struct regulator_desc bq24190_vbus_desc = { > + .name = "usb_otg_vbus", > + .type = REGULATOR_VOLTAGE, > + .owner = THIS_MODULE, > + .ops = &bq24190_vbus_ops, > + .fixed_uV = 500, > + .n_voltages = 1, > +}; > + > +static const struct regulator_init_data bq24190_vbus_init_data = { > + .constraints = { > + .valid_ops_mask = REGULATOR_CHANGE_STATUS, > + }, > +}; > + > +static int bq24190_register_vbus_regulator(struct bq24190_dev_info *bdi) > +{ > + struct bq24190_platform_data *pdata = bdi->dev->platform_data; > + struct regulator_config cfg = { }; > + struct regulator_dev *reg; > + int ret = 0; > + > + cfg.dev = bdi->dev; > +
Re: [PATCH v2 10/14] power: supply: bq24190_charger: Add input_current_limit property
Hi, On Tue, Aug 15, 2017 at 10:04:58PM +0200, Hans de Goede wrote: > Export the input current limit of the charger as a > POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT property on the charger > power_supply class device. > > Signed-off-by: Hans de Goede > --- Thanks, queued. -- Sebastian > drivers/power/supply/bq24190_charger.c | 35 > ++ > 1 file changed, 35 insertions(+) > > diff --git a/drivers/power/supply/bq24190_charger.c > b/drivers/power/supply/bq24190_charger.c > index 073cd9d..f13f892 100644 > --- a/drivers/power/supply/bq24190_charger.c > +++ b/drivers/power/supply/bq24190_charger.c > @@ -987,6 +987,33 @@ static int bq24190_charger_set_voltage(struct > bq24190_dev_info *bdi, > ARRAY_SIZE(bq24190_cvc_vreg_values), val->intval); > } > > +static int bq24190_charger_get_iinlimit(struct bq24190_dev_info *bdi, > + union power_supply_propval *val) > +{ > + int iinlimit, ret; > + > + ret = bq24190_get_field_val(bdi, BQ24190_REG_ISC, > + BQ24190_REG_ISC_IINLIM_MASK, > + BQ24190_REG_ISC_IINLIM_SHIFT, > + bq24190_isc_iinlim_values, > + ARRAY_SIZE(bq24190_isc_iinlim_values), &iinlimit); > + if (ret < 0) > + return ret; > + > + val->intval = iinlimit; > + return 0; > +} > + > +static int bq24190_charger_set_iinlimit(struct bq24190_dev_info *bdi, > + const union power_supply_propval *val) > +{ > + return bq24190_set_field_val(bdi, BQ24190_REG_ISC, > + BQ24190_REG_ISC_IINLIM_MASK, > + BQ24190_REG_ISC_IINLIM_SHIFT, > + bq24190_isc_iinlim_values, > + ARRAY_SIZE(bq24190_isc_iinlim_values), val->intval); > +} > + > static int bq24190_charger_get_property(struct power_supply *psy, > enum power_supply_property psp, union power_supply_propval *val) > { > @@ -1027,6 +1054,9 @@ static int bq24190_charger_get_property(struct > power_supply *psy, > case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: > ret = bq24190_charger_get_voltage_max(bdi, val); > break; > + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: > + ret = bq24190_charger_get_iinlimit(bdi, val); > + break; > case POWER_SUPPLY_PROP_SCOPE: > val->intval = POWER_SUPPLY_SCOPE_SYSTEM; > ret = 0; > @@ -1078,6 +1108,9 @@ static int bq24190_charger_set_property(struct > power_supply *psy, > case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE: > ret = bq24190_charger_set_voltage(bdi, val); > break; > + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: > + ret = bq24190_charger_set_iinlimit(bdi, val); > + break; > default: > ret = -EINVAL; > } > @@ -1099,6 +1132,7 @@ static int bq24190_charger_property_is_writeable(struct > power_supply *psy, > case POWER_SUPPLY_PROP_CHARGE_TYPE: > case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT: > case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE: > + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: > ret = 1; > break; > default: > @@ -1118,6 +1152,7 @@ static enum power_supply_property > bq24190_charger_properties[] = { > POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX, > POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE, > POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX, > + POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, > POWER_SUPPLY_PROP_SCOPE, > POWER_SUPPLY_PROP_MODEL_NAME, > POWER_SUPPLY_PROP_MANUFACTURER, > -- > 2.9.4 > signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: r8822be: Fix typo for CONFIG_RTLWIFI_DEBUG
The debugging output in deinit_priv is guarded by an #ifdef using CONFIG_RTL_DEBUG. This symbol does not exist and should be CONFIG_RTLWIFI_DEBUG instead. Signed-off-by: Andreas Ziegler --- drivers/staging/rtlwifi/halmac/rtl_halmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c index 031bf2c..888ca43 100644 --- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c +++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c @@ -386,7 +386,7 @@ static void deinit_priv(struct rtl_halmac *halmac) u32 count, size; count = HALMAC_FEATURE_ALL + 1; -#ifdef CONFIG_RTL_DEBUG +#ifdef CONFIG_RTLWIFI_DEBUG { struct submit_ctx *sctx; u32 i; @@ -405,7 +405,7 @@ static void deinit_priv(struct rtl_halmac *halmac) rtl_mfree((u8 *)sctx, sizeof(*sctx)); } } -#endif /* !CONFIG_RTL_DEBUG */ +#endif /* !CONFIG_RTLWIFI_DEBUG */ size = sizeof(*indicator) * count; kfree((u8 *)indicator); } -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V3] staging:rtl8188eu:core Rename CamelCase variables
This patch is created to solve the CamelCase issue. The members 'IEs' and 'IELength' of struct wlan_bssid_ex are being modified to 'ie' and 'ie_length' to solve the issue. And all the places where these variables are referenced inside rtl8188eu driver are also changed. Signed-off-by: Janani Sankara Babu --- Changelog [Patch 1/2] : Replace 'IELength' and 'IEs' of struct wlan_bssid_ex with 'ie_length' and 'ies' [Patch 2/2] : Remove wrongly commented out lines from the code and rename 'ies' to 'ie' as per suggestions V3 : Merge all changes into single patch drivers/staging/rtl8188eu/core/rtw_ap.c | 86 ++-- drivers/staging/rtl8188eu/core/rtw_cmd.c| 26 +++--- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 20 ++--- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 66 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 100 drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 34 drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c| 16 ++-- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 10 +-- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +-- 10 files changed, 186 insertions(+), 186 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 647a922..a52c856 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -69,19 +69,19 @@ static void update_BCNTIM(struct adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network; - unsigned char *pie = pnetwork_mlmeext->IEs; + unsigned char *pie = pnetwork_mlmeext->ie; u8 *p, *dst_ie, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen; /* update TIM IE */ p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen, - pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_); + pnetwork_mlmeext->ie_length - _FIXED_IE_LENGTH_); if (p && tim_ielen > 0) { tim_ielen += 2; premainder_ie = p + tim_ielen; tim_ie_offset = (int)(p - pie); - remainder_ielen = pnetwork_mlmeext->IELength - + remainder_ielen = pnetwork_mlmeext->ie_length - tim_ie_offset - tim_ielen; /* append TIM IE from dst_ie offset */ dst_ie = p; @@ -94,7 +94,7 @@ static void update_BCNTIM(struct adapter *padapter) /* get supported rates len */ p = rtw_get_ie(pie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, - &tmp_len, (pnetwork_mlmeext->IELength - + &tmp_len, (pnetwork_mlmeext->ie_length - _BEACON_IE_OFFSET_)); if (p) offset += tmp_len+2; @@ -104,7 +104,7 @@ static void update_BCNTIM(struct adapter *padapter) premainder_ie = pie + offset; - remainder_ielen = pnetwork_mlmeext->IELength - + remainder_ielen = pnetwork_mlmeext->ie_length - offset - tim_ielen; /* append TIM IE from offset */ @@ -119,7 +119,7 @@ static void update_BCNTIM(struct adapter *padapter) } *dst_ie++ = _TIM_IE_; - if ((pstapriv->tim_bitmap&0xff00) && (pstapriv->tim_bitmap&0x00fc)) + if ((pstapriv->tim_bitmap & 0xff00) && (pstapriv->tim_bitmap & 0x00fc)) tim_ielen = 5; else tim_ielen = 4; @@ -129,7 +129,7 @@ static void update_BCNTIM(struct adapter *padapter) *dst_ie++ = 0;/* DTIM count */ *dst_ie++ = 1;/* DTIM period */ - if (pstapriv->tim_bitmap&BIT(0))/* for bc/mc frames */ + if (pstapriv->tim_bitmap & BIT(0))/* for bc/mc frames */ *dst_ie++ = BIT(0);/* bitmap ctrl */ else *dst_ie++ = 0; @@ -148,7 +148,7 @@ static void update_BCNTIM(struct adapter *padapter) kfree(pbackup_remainder_ie); } offset = (uint)(dst_ie - pie); - pnetwork_mlmeext->IELength = offset + remainder_ielen; + pnetwork_mlmeext->ie_length = offset + remainder_ielen; set_tx_beacon_cmd(padapter); } @@ -158,13 +158,13 @@ void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork, { struct ndis_802_11_var_ie *pIE; u8 bmatch = false; - u8 *pie = pnetwork->IEs; + u8 *pie = pnetwork->ie; u8 *p = NULL, *dst_ie = NULL, *premainder_ie = NULL; u8 *pbackup_remainder_ie = NULL; u32 i, offset, ielen = 0, ie_offset, remainder_ielen
Re: [PATCH v2 11/14] power: supply: bq24190_charger: Get input_current_limit from our supplier
Hi, On Tue, Aug 15, 2017 at 10:04:59PM +0200, Hans de Goede wrote: > On some devices the USB Type-C port power (USB PD 2.0) negotiation is > done by a separate port-controller IC, while the current limit is > controlled through another (charger) IC. > > It has been decided to model this by modelling the external Type-C > power brick (adapter/charger) as a power-supply class device which > supplies the charger-IC, with its voltage-now and current-max representing > the negotiated voltage and max current draw. > > This commit adds support for this to the bq24190_charger driver by calling > power_supply_set_input_current_limit_from_supplier helper if the > "input-current-limit-from-supplier" device-property is set. > > Note this replaces the functionality to get the current-limit from an > extcon device, which will be removed in a follow-up commit. I'm fine with the general approach, but ... > [...] > + bdi->input_current_limit_from_supplier = > + device_property_read_bool(dev, > + "input-current-limit-from-supplier"); > [...] I wonder if we actually need this. I think we can just enable it unconditionally when we have a parent power supply providing the information. -- Sebastian signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 11/14] power: supply: bq24190_charger: Get input_current_limit from our supplier
Hi, Thank you for your reviews / queuing! On 29-08-17 13:40, Sebastian Reichel wrote: Hi, On Tue, Aug 15, 2017 at 10:04:59PM +0200, Hans de Goede wrote: On some devices the USB Type-C port power (USB PD 2.0) negotiation is done by a separate port-controller IC, while the current limit is controlled through another (charger) IC. It has been decided to model this by modelling the external Type-C power brick (adapter/charger) as a power-supply class device which supplies the charger-IC, with its voltage-now and current-max representing the negotiated voltage and max current draw. This commit adds support for this to the bq24190_charger driver by calling power_supply_set_input_current_limit_from_supplier helper if the "input-current-limit-from-supplier" device-property is set. Note this replaces the functionality to get the current-limit from an extcon device, which will be removed in a follow-up commit. I'm fine with the general approach, but ... [...] + bdi->input_current_limit_from_supplier = + device_property_read_bool(dev, + "input-current-limit-from-supplier"); [...] I wonder if we actually need this. I think we can just enable it unconditionally when we have a parent power supply providing the information. I was thinking the same when implementing this, so this is fine with me. I think it is best to just unconditionally call power_supply_set_input_current_limit_from_supplier from the external_power_changed callback, that will only get called if we've a parent supply and that function will check that the parent has a current-max property itself. Please let me know if just unconditionally calling power_supply_set_input_current_limit_from_supplier from the external_power_changed callback is ok with you then I will do that for v3 of the patch-set (from which I will drop the patches you've already queued). Regards, Hans ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V3] staging:rtl8188eu:core Rename CamelCase variables
On Tue, Aug 29, 2017 at 05:01:20PM +0530, Janani Sankara Babu wrote: > This patch is created to solve the CamelCase issue. The members 'IEs' and > 'IELength' of struct wlan_bssid_ex are being modified to 'ie' and > 'ie_length' to solve the issue. And all the places where these variables > are referenced inside rtl8188eu driver are also changed. > > Signed-off-by: Janani Sankara Babu Looks good. Thank you! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
Hi Greg, On Tue, Aug 29, 2017 at 1:28 PM, Greg Kroah-Hartman wrote: > On Tue, Aug 29, 2017 at 01:11:31PM +0200, Stefano Brivio wrote: >> On Tue, 29 Aug 2017 12:59:00 +0200 >> Geert Uytterhoeven wrote: >> > On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman >> > wrote: >> > > The IRDA code has long been obsolete and broken. So, to keep people >> > > from trying to use it, and to prevent people from having to maintain it, >> > > let's move it to drivers/staging/ so that we can delete it entirely from >> > > the kernel in a few releases. >> > >> > (diving into an early boot crash) >> > >> > Have you tried running this? ;-) >> > >> > irda_init() and net_dev_init() are both subsys_initcall()s. >> > But the former now runs before the latter, leading to: >> > >> > Unable to handle kernel NULL pointer dereference at virtual address >> > 0004 >> >> Should be fixed by https://patchwork.ozlabs.org/patch/807006/ >> ("[net-next] staging: irda: force to be a kernel module") I guess... > > Yup, that's the fix for this issue. > > Geert, does that fix the problem for you? Thanks, that patch fixes the crash, obviously. It does mean you can no longer have IrDA in a non-modular kernel. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 11/14] power: supply: bq24190_charger: Get input_current_limit from our supplier
Hi, On Tue, Aug 29, 2017 at 01:53:24PM +0200, Hans de Goede wrote: > Hi, > > Thank you for your reviews / queuing! > > On 29-08-17 13:40, Sebastian Reichel wrote: > > Hi, > > > > On Tue, Aug 15, 2017 at 10:04:59PM +0200, Hans de Goede wrote: > > > On some devices the USB Type-C port power (USB PD 2.0) negotiation is > > > done by a separate port-controller IC, while the current limit is > > > controlled through another (charger) IC. > > > > > > It has been decided to model this by modelling the external Type-C > > > power brick (adapter/charger) as a power-supply class device which > > > supplies the charger-IC, with its voltage-now and current-max representing > > > the negotiated voltage and max current draw. > > > > > > This commit adds support for this to the bq24190_charger driver by calling > > > power_supply_set_input_current_limit_from_supplier helper if the > > > "input-current-limit-from-supplier" device-property is set. > > > > > > Note this replaces the functionality to get the current-limit from an > > > extcon device, which will be removed in a follow-up commit. > > > > I'm fine with the general approach, but ... > > > > > [...] > > > + bdi->input_current_limit_from_supplier = > > > + device_property_read_bool(dev, > > > + "input-current-limit-from-supplier"); > > > [...] > > > > I wonder if we actually need this. I think we can just enable it > > unconditionally when we have a parent power supply providing the > > information. > > I was thinking the same when implementing this, so this is fine with > me. I think it is best to just unconditionally call > power_supply_set_input_current_limit_from_supplier from the > external_power_changed callback, that will only get called if we've > a parent supply and that function will check that the parent has > a current-max property itself. > > Please let me know if just unconditionally calling > power_supply_set_input_current_limit_from_supplier from the > external_power_changed callback is ok with you then I will do that > for v3 of the patch-set (from which I will drop the patches you've > already queued). Makes sense to me. -- Sebastian signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-testing 445/445] drivers/staging//rtlwifi/halmac/rtl_halmac.c:405:5: error: implicit declaration of function 'rtl_mfree'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing head: 59b5306d1db0b53e39a676643b9781ba35813bb4 commit: 59b5306d1db0b53e39a676643b9781ba35813bb4 [445/445] staging: r8822be: Fix typo for CONFIG_RTLWIFI_DEBUG config: ia64-allyesconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 59b5306d1db0b53e39a676643b9781ba35813bb4 # save the attached .config to linux build tree make.cross ARCH=ia64 All errors (new ones prefixed by >>): drivers/staging//rtlwifi/halmac/rtl_halmac.c: In function 'deinit_priv': >> drivers/staging//rtlwifi/halmac/rtl_halmac.c:395:22: error: 'struct >> rtl_halmac_indicator' has no member named 'sctx' if (!indicator[i].sctx) ^ In file included from drivers/staging//rtlwifi/halmac/../wifi.h:38:0, from drivers/staging//rtlwifi/halmac/halmac_2_platform.h:28, from drivers/staging//rtlwifi/halmac/halmac_api.h:38, from drivers/staging//rtlwifi/halmac/rtl_halmac.c:26: >> drivers/staging//rtlwifi/halmac/rtl_halmac.c:399:6: error: 'rtlpriv' >> undeclared (first use in this function) rtlpriv, COMP_HALMAC, DBG_LOUD, ^ drivers/staging//rtlwifi/halmac/../debug.h:185:17: note: in definition of macro 'RT_TRACE' _rtl_dbg_trace(rtlpriv, comp, level,\ ^~~ drivers/staging//rtlwifi/halmac/rtl_halmac.c:399:6: note: each undeclared identifier is reported only once for each function it appears in rtlpriv, COMP_HALMAC, DBG_LOUD, ^ drivers/staging//rtlwifi/halmac/../debug.h:185:17: note: in definition of macro 'RT_TRACE' _rtl_dbg_trace(rtlpriv, comp, level,\ ^~~ drivers/staging//rtlwifi/halmac/rtl_halmac.c:403:24: error: 'struct rtl_halmac_indicator' has no member named 'sctx' sctx = indicator[i].sctx; ^ drivers/staging//rtlwifi/halmac/rtl_halmac.c:404:17: error: 'struct rtl_halmac_indicator' has no member named 'sctx' indicator[i].sctx = NULL; ^ >> drivers/staging//rtlwifi/halmac/rtl_halmac.c:405:5: error: implicit >> declaration of function 'rtl_mfree' [-Werror=implicit-function-declaration] rtl_mfree((u8 *)sctx, sizeof(*sctx)); ^ >> drivers/staging//rtlwifi/halmac/rtl_halmac.c:405:34: error: dereferencing >> pointer to incomplete type 'struct submit_ctx' rtl_mfree((u8 *)sctx, sizeof(*sctx)); ^ cc1: some warnings being treated as errors vim +/rtl_mfree +405 drivers/staging//rtlwifi/halmac/rtl_halmac.c 938a0447 Ping-Ke Shih2017-08-17 378 938a0447 Ping-Ke Shih2017-08-17 379 static void deinit_priv(struct rtl_halmac *halmac) 938a0447 Ping-Ke Shih2017-08-17 380 { 938a0447 Ping-Ke Shih2017-08-17 381struct rtl_halmac_indicator *indicator; 938a0447 Ping-Ke Shih2017-08-17 382 938a0447 Ping-Ke Shih2017-08-17 383indicator = halmac->indicator; 938a0447 Ping-Ke Shih2017-08-17 384halmac->indicator = NULL; 938a0447 Ping-Ke Shih2017-08-17 385if (indicator) { 938a0447 Ping-Ke Shih2017-08-17 386u32 count, size; 938a0447 Ping-Ke Shih2017-08-17 387 938a0447 Ping-Ke Shih2017-08-17 388count = HALMAC_FEATURE_ALL + 1; 59b5306d Andreas Ziegler 2017-08-29 389 #ifdef CONFIG_RTLWIFI_DEBUG 938a0447 Ping-Ke Shih2017-08-17 390{ 938a0447 Ping-Ke Shih2017-08-17 391struct submit_ctx *sctx; 938a0447 Ping-Ke Shih2017-08-17 392u32 i; 938a0447 Ping-Ke Shih2017-08-17 393 938a0447 Ping-Ke Shih2017-08-17 394for (i = 0; i < count; i++) { 938a0447 Ping-Ke Shih2017-08-17 @395if (!indicator[i].sctx) 938a0447 Ping-Ke Shih2017-08-17 396 continue; 938a0447 Ping-Ke Shih2017-08-17 397 938a0447 Ping-Ke Shih2017-08-17 398 RT_TRACE( 938a0447 Ping-Ke Shih2017-08-17 @399 rtlpriv, COMP_HALMAC, DBG_LOUD, 938a0447 Ping-Ke Shih2017-08-17 400 "%s: %s id(%d) sctx still exist!!\n", 938a0447 Ping-Ke Shih2017-08-17 401 __func__, RTL_HALMAC_FEATURE_NAME[i], 938a0447 Ping-Ke Shih2017-08-17 402 i); 938a0447 Ping-Ke Shih2017-08-17 @403sctx = indicator[i].sctx; 938a0447 Ping-Ke Shih2017-08-17 404 indicator[i].sctx = NULL; 938a0447 Ping-Ke Shih2017-08-17 @
[PATCH] staging:rtl8188eu Use __func__ instead of function name
This patch makes use of predefined identifier __func__ inorder to clear the warning: Prefer using '"%s...", __func__' to using 'update_bmc_sta', this function's name, in a string Signed-off-by: Janani Sankara Babu --- drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index a52c856..4cc8223 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -586,7 +586,7 @@ static void update_bmc_sta(struct adapter *padapter) arg = psta->mac_id & 0x1f; arg |= BIT(7); tx_ra_bitmap |= ((raid << 28) & 0xf000); - DBG_88E("update_bmc_sta, mask = 0x%x, arg = 0x%x\n", tx_ra_bitmap, arg); + DBG_88E("%s, mask = 0x%x, arg = 0x%x\n", __func__, tx_ra_bitmap, arg); /* bitmap[0:27] = tx_rate_bitmap */ /* bitmap[28:31]= Rate Adaptive id */ -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: r8822be: Fix typo for CONFIG_RTLWIFI_DEBUG
On 08/29/2017 06:30 AM, Andreas Ziegler wrote: The debugging output in deinit_priv is guarded by an #ifdef using CONFIG_RTL_DEBUG. This symbol does not exist and should be CONFIG_RTLWIFI_DEBUG instead. Signed-off-by: Andreas Ziegler NACK. Yes, there is a problem; however, CONFIG_RTLWIFI_DEBUG is not the value that should be used. That one is reserved for the non-staging drivers in drivers/net/wireless/realtek/rtlwifi/. The correct symbol for r8822be is CONFIG_RTLWIFI_DEBUG_ST. Larry --- drivers/staging/rtlwifi/halmac/rtl_halmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c index 031bf2c..888ca43 100644 --- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c +++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c @@ -386,7 +386,7 @@ static void deinit_priv(struct rtl_halmac *halmac) u32 count, size; count = HALMAC_FEATURE_ALL + 1; -#ifdef CONFIG_RTL_DEBUG +#ifdef CONFIG_RTLWIFI_DEBUG { struct submit_ctx *sctx; u32 i; @@ -405,7 +405,7 @@ static void deinit_priv(struct rtl_halmac *halmac) rtl_mfree((u8 *)sctx, sizeof(*sctx)); } } -#endif /* !CONFIG_RTL_DEBUG */ +#endif /* !CONFIG_RTLWIFI_DEBUG */ size = sizeof(*indicator) * count; kfree((u8 *)indicator); } ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: r8822be: Fix typo for CONFIG_RTLWIFI_DEBUG
On Tue, Aug 29, 2017 at 09:10:10AM -0500, Larry Finger wrote: > On 08/29/2017 06:30 AM, Andreas Ziegler wrote: > > The debugging output in deinit_priv is guarded by an #ifdef using > > CONFIG_RTL_DEBUG. This symbol does not exist and should be > > CONFIG_RTLWIFI_DEBUG instead. > > > > Signed-off-by: Andreas Ziegler > > NACK. > > Yes, there is a problem; however, CONFIG_RTLWIFI_DEBUG is not the value that > should be used. That one is reserved for the non-staging drivers in > drivers/net/wireless/realtek/rtlwifi/. The correct symbol for r8822be is > CONFIG_RTLWIFI_DEBUG_ST. Yeah, kbuild just blew up on this as well, I wonder why my local build testing didn't see that :( Now dropped. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
On Tue, Aug 29, 2017 at 02:11:39PM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Tue, Aug 29, 2017 at 1:28 PM, Greg Kroah-Hartman > wrote: > > On Tue, Aug 29, 2017 at 01:11:31PM +0200, Stefano Brivio wrote: > >> On Tue, 29 Aug 2017 12:59:00 +0200 > >> Geert Uytterhoeven wrote: > >> > On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman > >> > wrote: > >> > > The IRDA code has long been obsolete and broken. So, to keep people > >> > > from trying to use it, and to prevent people from having to maintain > >> > > it, > >> > > let's move it to drivers/staging/ so that we can delete it entirely > >> > > from > >> > > the kernel in a few releases. > >> > > >> > (diving into an early boot crash) > >> > > >> > Have you tried running this? ;-) > >> > > >> > irda_init() and net_dev_init() are both subsys_initcall()s. > >> > But the former now runs before the latter, leading to: > >> > > >> > Unable to handle kernel NULL pointer dereference at virtual address > >> > 0004 > >> > >> Should be fixed by https://patchwork.ozlabs.org/patch/807006/ > >> ("[net-next] staging: irda: force to be a kernel module") I guess... > > > > Yup, that's the fix for this issue. > > > > Geert, does that fix the problem for you? > > Thanks, that patch fixes the crash, obviously. > > It does mean you can no longer have IrDA in a non-modular kernel. Given that irda doesn't really work, I doubt anyone is going to care about it :) thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] vsock: only load vmci transport on VMware hypervisor by default
> On Aug 29, 2017, at 4:36 AM, Dexuan Cui wrote: > >> From: Dexuan Cui >> Sent: Tuesday, August 22, 2017 21:21 >>> ... >>> ... >>> The only problem here would be the potential for a guest and a host app >> to >>> have a conflict wrt port numbers, even though they would be able to >>> operate fine, if restricted to their appropriate transport. >>> >>> Thanks, >>> Jorgen >> >> Hi Jorgen, Stefan, >> Thank you for the detailed analysis! >> You have a much better understanding than me about the complex >> scenarios. Can you please work out a patch? :-) > > Hi Jorgen, Stefan, > May I know your plan for this? I’d be happy to discuss this now, but I don’t have time to work on the actual implementation in the next couple of weeks. For the guest, we agree that registering a guest transport should be tied to either the hypervisor running the guest, or the existence of the appropriate virtual hardware. My main concern is that our existing software relies on the current behavior of auto-loading the VMCI transport on the host side. So changing that behavior could cause trouble for our existing Linux users. I’m wondering whether it would be possible to support multiple host side transports. Since it is theoretically possible to run multiple hypervisors at the same time, there would even be a use case for this. If the assignment of CIDs is made unique across all transports, a connection initiated by the host side will get directed to the appropriate transport based on the CID. Any traffic coming from a guest will naturally be using the appropriate transport. Host side applications will have to share the port space as well. This would require tracking CIDs as a common resource across all transports, but make CIDs unique VM addresses on a given host. If we allow multiple host side transports, virtio host side support and vmci should be able to coexist regardless of the order of initialization. Thanks, Jorgen ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next] staging: irda: update MAINTAINERS
From: Greg Kroah-Hartman Date: Tue, 29 Aug 2017 09:09:29 +0200 > Now that the IRDA code has moved under drivers/staging/irda/, update the > MAINTAINERS file with the new location. > > Reported-by: Joe Perches > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org Applied. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next] staging: irda: force to be a kernel module
From: Greg Kroah-Hartman Date: Tue, 29 Aug 2017 11:14:17 +0200 > Now that the IRDA networking code has moved into drivers/staging/, the > link order is changed for when it is initialized if built into the > system. This can cause a crash when initializing as the netfilter core > hasn't been initialized yet. > > So force the IRDA code to be built as a module, preventing the crash. > > Reported-by: kernel test robot > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org I don't think this is reasonable. IRDA being built in was broken by moving it to staging, so it's a regression and we should find a way to fix it. It's one thing if IRDA on it's own has deteriorated and broken in some ways over time due to lack of maintainence, it's another to knowingly do something to it that causes a regression which is what happened here. Thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
From: Geert Uytterhoeven Date: Tue, 29 Aug 2017 12:59:00 +0200 > Hi Greg, > > On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman > wrote: >> The IRDA code has long been obsolete and broken. So, to keep people >> from trying to use it, and to prevent people from having to maintain it, >> let's move it to drivers/staging/ so that we can delete it entirely from >> the kernel in a few releases. > > (diving into an early boot crash) > > Have you tried running this? ;-) > > irda_init() and net_dev_init() are both subsys_initcall()s. > But the former now runs before the latter, leading to: We must find a way to make the ordering proper again when both are built-in. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
From: Greg Kroah-Hartman Date: Tue, 29 Aug 2017 16:48:50 +0200 > On Tue, Aug 29, 2017 at 02:11:39PM +0200, Geert Uytterhoeven wrote: >> Hi Greg, >> >> On Tue, Aug 29, 2017 at 1:28 PM, Greg Kroah-Hartman >> wrote: >> > On Tue, Aug 29, 2017 at 01:11:31PM +0200, Stefano Brivio wrote: >> >> On Tue, 29 Aug 2017 12:59:00 +0200 >> >> Geert Uytterhoeven wrote: >> >> > On Sun, Aug 27, 2017 at 5:03 PM, Greg Kroah-Hartman >> >> > wrote: >> >> > > The IRDA code has long been obsolete and broken. So, to keep people >> >> > > from trying to use it, and to prevent people from having to maintain >> >> > > it, >> >> > > let's move it to drivers/staging/ so that we can delete it entirely >> >> > > from >> >> > > the kernel in a few releases. >> >> > >> >> > (diving into an early boot crash) >> >> > >> >> > Have you tried running this? ;-) >> >> > >> >> > irda_init() and net_dev_init() are both subsys_initcall()s. >> >> > But the former now runs before the latter, leading to: >> >> > >> >> > Unable to handle kernel NULL pointer dereference at virtual address >> >> > 0004 >> >> >> >> Should be fixed by https://patchwork.ozlabs.org/patch/807006/ >> >> ("[net-next] staging: irda: force to be a kernel module") I guess... >> > >> > Yup, that's the fix for this issue. >> > >> > Geert, does that fix the problem for you? >> >> Thanks, that patch fixes the crash, obviously. >> >> It does mean you can no longer have IrDA in a non-modular kernel. > > Given that irda doesn't really work, I doubt anyone is going to care > about it :) The initialization with everything built-in worked fine before your changes. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
Signed-off-by: harsha --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 93e2c90..a2d36b3 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, p = &(*p)->rb_right; } else { pr_err("%s: buffer already found.", __func__); - BUG(); + WARN_ON(); } } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next] staging: irda: force to be a kernel module
On Tue, Aug 29, 2017 at 09:35:07AM -0700, David Miller wrote: > From: Greg Kroah-Hartman > Date: Tue, 29 Aug 2017 11:14:17 +0200 > > > Now that the IRDA networking code has moved into drivers/staging/, the > > link order is changed for when it is initialized if built into the > > system. This can cause a crash when initializing as the netfilter core > > hasn't been initialized yet. > > > > So force the IRDA code to be built as a module, preventing the crash. > > > > Reported-by: kernel test robot > > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org > > I don't think this is reasonable. > > IRDA being built in was broken by moving it to staging, so it's a > regression and we should find a way to fix it. Hm, this is due to netlink coming before irda in the link order before this patch series. I can't change the link order to put all of net/ before drivers/, which would solve this, and I don't think I can put: obj-$(CONFIG_IRDA) += ../../drivers/staging/irda/net/ in a networking Makefile, can I? Does "../" even work in a Makefile like that? Any other thoughts? > It's one thing if IRDA on it's own has deteriorated and broken in some > ways over time due to lack of maintainence, it's another to knowingly > do something to it that causes a regression which is what happened > here. It has deteriorated and is broken and does not work at all from the reports I have gotten, Linus pointing this out to me directly due to his involvement in irda-related dive computers. So I don't think anyone is using this at all right now, it seems to crash when used anyway. So no one is running this "build in" code at the moment :) ideas? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: most: hdm_usb: Register the driver with module_usb_driver macro
1. Register the driver with module_usb_driver macro instead of module_init and module_exit. 2. Remove redundant code. Signed-off-by: Alex Briskin --- drivers/staging/most/hdm-usb/hdm_usb.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index a9c3785d19ae..85775da293fb 100644 --- a/drivers/staging/most/hdm-usb/hdm_usb.c +++ b/drivers/staging/most/hdm-usb/hdm_usb.c @@ -1301,25 +1301,7 @@ static struct usb_driver hdm_usb = { .disconnect = hdm_disconnect, }; -static int __init hdm_usb_init(void) -{ - pr_info("hdm_usb_init()\n"); - if (usb_register(&hdm_usb)) { - pr_err("could not register hdm_usb driver\n"); - return -EIO; - } - - return 0; -} - -static void __exit hdm_usb_exit(void) -{ - pr_info("hdm_usb_exit()\n"); - usb_deregister(&hdm_usb); -} - -module_init(hdm_usb_init); -module_exit(hdm_usb_exit); +module_usb_driver(hdm_usb); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Christian Gromm "); MODULE_DESCRIPTION("HDM_4_USB"); -- 2.11.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
On Tue, Aug 29, 2017 at 10:49:54PM +0530, harsha wrote: > Signed-off-by: harsha > --- > drivers/staging/android/ion/ion.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/android/ion/ion.c > b/drivers/staging/android/ion/ion.c > index 93e2c90..a2d36b3 100644 > --- a/drivers/staging/android/ion/ion.c > +++ b/drivers/staging/android/ion/ion.c > @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, > p = &(*p)->rb_right; > } else { > pr_err("%s: buffer already found.", __func__); > - BUG(); > + WARN_ON(); > } > } > > -- > 1.9.1 Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You did not specify a description of why the patch is needed, or possibly, any description at all, in the email body. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what is needed in order to properly describe the change. - You did not write a descriptive Subject: for the patch, allowing Greg, and everyone else, to know what this patch is all about. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what a proper Subject: line should look like. - You did not use your real name. Signed-off-by: and From: has to have a real name associated with it. Use whatever you sign legal documents with, no anonymous patches are allowed. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next] staging: irda: force to be a kernel module
On Tue, Aug 29, 2017 at 07:26:08PM +0200, Greg KH wrote: > On Tue, Aug 29, 2017 at 09:35:07AM -0700, David Miller wrote: > > From: Greg Kroah-Hartman > > Date: Tue, 29 Aug 2017 11:14:17 +0200 > > > > > Now that the IRDA networking code has moved into drivers/staging/, the > > > link order is changed for when it is initialized if built into the > > > system. This can cause a crash when initializing as the netfilter core > > > hasn't been initialized yet. > > > > > > So force the IRDA code to be built as a module, preventing the crash. > > > > > > Reported-by: kernel test robot > > > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org > > > > I don't think this is reasonable. > > > > IRDA being built in was broken by moving it to staging, so it's a > > regression and we should find a way to fix it. > > Hm, this is due to netlink coming before irda in the link order before > this patch series. I can't change the link order to put all of net/ > before drivers/, which would solve this, and I don't think I can put: > obj-$(CONFIG_IRDA) += ../../drivers/staging/irda/net/ > in a networking Makefile, can I? Does "../" even work in a Makefile > like that? Wait, I think that does work, let me go test this some more... thanks, greg k-h- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net-next] staging: irda: force to be a kernel module
From: Greg KH Date: Tue, 29 Aug 2017 19:26:08 +0200 > On Tue, Aug 29, 2017 at 09:35:07AM -0700, David Miller wrote: >> From: Greg Kroah-Hartman >> Date: Tue, 29 Aug 2017 11:14:17 +0200 >> >> > Now that the IRDA networking code has moved into drivers/staging/, the >> > link order is changed for when it is initialized if built into the >> > system. This can cause a crash when initializing as the netfilter core >> > hasn't been initialized yet. >> > >> > So force the IRDA code to be built as a module, preventing the crash. >> > >> > Reported-by: kernel test robot >> > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org >> >> I don't think this is reasonable. >> >> IRDA being built in was broken by moving it to staging, so it's a >> regression and we should find a way to fix it. > > Hm, this is due to netlink coming before irda in the link order before > this patch series. I can't change the link order to put all of net/ > before drivers/, which would solve this, and I don't think I can put: > obj-$(CONFIG_IRDA) += ../../drivers/staging/irda/net/ > in a networking Makefile, can I? Does "../" even work in a Makefile > like that? > > Any other thoughts? Change the initialization type in IRDA from subsys_init() to ... something else? Amazing! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
When moving the IRDA code out of net/ into drivers/staging/irda/net, the link order changes when IRDA is built into the kernel. That causes a kernel crash at boot time as netfilter isn't initialized yet. To fix this, build and link the irda networking code in the same exact order that it was previously before the move. Reported-by: kernel test robot Reported-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- v2 - don't force irda to be a module, make the Makefiles put irda back where it was before in the link order. drivers/staging/Makefile | 1 - net/Makefile | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index fced929a0e67..1192caa94435 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -2,7 +2,6 @@ obj-y += media/ obj-y += typec/ -obj-$(CONFIG_IRDA) += irda/net/ obj-$(CONFIG_IRDA) += irda/drivers/ obj-$(CONFIG_PRISM2_USB) += wlan-ng/ obj-$(CONFIG_COMEDI) += comedi/ diff --git a/net/Makefile b/net/Makefile index 3d3feff3643b..ddd059c3dfa4 100644 --- a/net/Makefile +++ b/net/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_NETROM) += netrom/ obj-$(CONFIG_ROSE) += rose/ obj-$(CONFIG_AX25) += ax25/ obj-$(CONFIG_CAN) += can/ +obj-$(CONFIG_IRDA) += ../drivers/staging/irda/net/ obj-$(CONFIG_BT) += bluetooth/ obj-$(CONFIG_SUNRPC) += sunrpc/ obj-$(CONFIG_AF_RXRPC) += rxrpc/ -- 2.14.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
From: Greg KH Date: Tue, 29 Aug 2017 19:46:22 +0200 > When moving the IRDA code out of net/ into drivers/staging/irda/net, the > link order changes when IRDA is built into the kernel. That causes a > kernel crash at boot time as netfilter isn't initialized yet. > > To fix this, build and link the irda networking code in the same exact > order that it was previously before the move. > > Reported-by: kernel test robot > Reported-by: Geert Uytterhoeven > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org Greg, just change the initializer in IRDA so that it will run after subsys_init() when built statically. IRDA is definitely not the first pontentially statically built thing that needs netlink up and available. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
Fixes checkpatch.pl warning: Use WARN_ON() rather than BUG_ON() and BUG() Signed-off-by: harsha --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 93e2c90..a2d36b3 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, p = &(*p)->rb_right; } else { pr_err("%s: buffer already found.", __func__); - BUG(); + WARN_ON(); } } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
On Tue, Aug 29, 2017 at 11:30:22PM +0530, harsha wrote: > Fixes checkpatch.pl warning: Use WARN_ON() rather than BUG_ON() and BUG() > > Signed-off-by: harsha I still need a real name here. > --- > drivers/staging/android/ion/ion.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/android/ion/ion.c > b/drivers/staging/android/ion/ion.c > index 93e2c90..a2d36b3 100644 > --- a/drivers/staging/android/ion/ion.c > +++ b/drivers/staging/android/ion/ion.c > @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, > p = &(*p)->rb_right; > } else { > pr_err("%s: buffer already found.", __func__); > - BUG(); > + WARN_ON(); You can't just change code without understanding _why_ you are changing it. You just changed the logic here, why do you think it is ok that BUG() is no longer called? Are you properly cleaning up and recovering here now that WARN_ON() is called? checkpatch.pl is a hint, you can't just blindly do whatever it says, you still have to think. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
On Tue, Aug 29, 2017 at 10:49:45AM -0700, David Miller wrote: > From: Greg KH > Date: Tue, 29 Aug 2017 19:46:22 +0200 > > > When moving the IRDA code out of net/ into drivers/staging/irda/net, the > > link order changes when IRDA is built into the kernel. That causes a > > kernel crash at boot time as netfilter isn't initialized yet. > > > > To fix this, build and link the irda networking code in the same exact > > order that it was previously before the move. > > > > Reported-by: kernel test robot > > Reported-by: Geert Uytterhoeven > > Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org > > Greg, just change the initializer in IRDA so that it will run > after subsys_init() when built statically. > > IRDA is definitely not the first pontentially statically built > thing that needs netlink up and available. Ok, will do that tomorrow and test it and send you the patch. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
Hi, harsha, this is my real name. There is no need to call BUG() over here as this error is not very basic and BUG() tends to bring the system down so calling WARN_ON() is preferable. Please correct me if I am wrong as this is my first contribution. I am unable to send any direct mail from gmail( gets rejected based on some filter rule match) so trying to send it in this way. Thanks. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
Fixes checkpatch.pl warning: Use WARN_ON() rather than BUG_ON() and BUG() Signed-off-by: harsha --- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 93e2c90..a2d36b3 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, p = &(*p)->rb_right; } else { pr_err("%s: buffer already found.", __func__); - BUG(); + WARN_ON(); } } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
On Wed, Aug 30, 2017 at 12:51:01AM +0530, harsha wrote: > Hi, > harsha, this is my real name. That's your full name that you use to sign legal documents? No last name? No capital letter at the beginning? > There is no need to call BUG() over here as this error is not very basic and > BUG() tends to bring the system down so calling WARN_ON() is preferable. In the original code the kernel will call BUG() once but in the new code it will spam the dmesg forever until you pull the power cord. There is no improvement. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it
On Tuesday 29 August 2017 01:42:08 David Miller wrote: > From: Greg Kroah-Hartman > Date: Sun, 27 Aug 2017 17:03:30 +0200 > > > The IRDA code has long been obsolete and broken. So, to keep people > > from trying to use it, and to prevent people from having to maintain it, > > let's move it to drivers/staging/ so that we can delete it entirely from > > the kernel in a few releases. > > No objection, I'll apply this to net-next, thanks Greg. IRDA works fine in Debian 9 (kernel 4.9) and I use it for simple file transfer. Hope I'm not the only one... # irattach /dev/ttyS0 -d tekram -s # irdadump 21:28:52.830350 xid:cmd aed8eb79 > S=6 s=0 (14) 21:28:52.922368 xid:cmd aed8eb79 > S=6 s=1 (14) 21:28:53.014350 xid:cmd aed8eb79 > S=6 s=2 (14) 21:28:53.106338 xid:cmd aed8eb79 > S=6 s=3 (14) 21:28:53.190276 xid:rsp aed8eb79 < 35d1 S=6 s=3 Nokia 6230i hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (28) 21:28:53.198384 xid:cmd aed8eb79 > S=6 s=4 (14) 21:28:53.290382 xid:cmd aed8eb79 > S=6 s=5 (14) 21:28:53.382341 xid:cmd aed8eb79 > S=6 s=* pentium hint=0400 [ Computer ] (23) ^C 8 packets received by filter $ obexftp -i -l MMC Connecting..\done Receiving "MMC".../ ]> $ obexftp -i -c MMC -g Image004.jpg Connecting..\done Sending "MMC"...|done Receiving "Image004.jpg"...-done Disconnecting..\done -- Ondrej Zary ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/6] android: binder: Add allocator selftest
binder_alloc_selftest tests that alloc_new_buf handles page allocation and deallocation properly when allocate and free buffers. The test allocates 5 buffers of various sizes to cover all possible page alignment cases, and frees the buffers using a list of exhaustive freeing order. Test: boot the device with ANDROID_BINDER_IPC_SELFTEST config option enabled. Allocator selftest passes. Signed-off-by: Sherry Yang --- drivers/android/Kconfig | 10 ++ drivers/android/Makefile| 1 + drivers/android/binder.c| 2 + drivers/android/binder_alloc.h | 5 + drivers/android/binder_alloc_selftest.c | 271 5 files changed, 289 insertions(+) create mode 100644 drivers/android/binder_alloc_selftest.c diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig index 832e885349b1..0f295704abd4 100644 --- a/drivers/android/Kconfig +++ b/drivers/android/Kconfig @@ -44,6 +44,16 @@ config ANDROID_BINDER_IPC_32BIT Note that enabling this will break newer Android user-space. +config ANDROID_BINDER_IPC_SELFTEST + bool "Android Binder IPC Driver Selftest" + depends on ANDROID_BINDER_IPC + ---help--- + This feature allows binder selftest to run. + + Binder selftest checks the allocation and free of binder buffers + exhaustively with combinations of various buffer sizes and + alignments. + endif # if ANDROID endmenu diff --git a/drivers/android/Makefile b/drivers/android/Makefile index 4b7c726bb560..a01254c43ee3 100644 --- a/drivers/android/Makefile +++ b/drivers/android/Makefile @@ -1,3 +1,4 @@ ccflags-y += -I$(src) # needed for trace events obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o +obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 9f95d7093f32..b31e64c6f666 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -4225,6 +4225,8 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) /*pr_info("binder_ioctl: %d:%d %x %lx\n", proc->pid, current->pid, cmd, arg);*/ + binder_selftest_alloc(&proc->alloc); + trace_binder_ioctl(cmd, arg); ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h index 088e4ffc6230..4f02cc084c15 100644 --- a/drivers/android/binder_alloc.h +++ b/drivers/android/binder_alloc.h @@ -102,6 +102,11 @@ struct binder_alloc { int pid; }; +#ifdef CONFIG_ANDROID_BINDER_IPC_SELFTEST +void binder_selftest_alloc(struct binder_alloc *alloc); +#else +static inline void binder_selftest_alloc(struct binder_alloc *alloc) {} +#endif extern struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, diff --git a/drivers/android/binder_alloc_selftest.c b/drivers/android/binder_alloc_selftest.c new file mode 100644 index ..cc00ab6ee29d --- /dev/null +++ b/drivers/android/binder_alloc_selftest.c @@ -0,0 +1,271 @@ +/* binder_alloc_selftest.c + * + * Android IPC Subsystem + * + * Copyright (C) 2017 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + +#include +#include +#include "binder_alloc.h" + +#define BUFFER_NUM 5 +#define BUFFER_MIN_SIZE (PAGE_SIZE / 8) + +static bool binder_selftest_run = true; +static int binder_selftest_failures; +static DEFINE_MUTEX(binder_selftest_lock); + +/** + * enum buf_end_align_type - Page alignment of a buffer + * end with regard to the end of the previous buffer. + * + * In the pictures below, buf2 refers to the buffer we + * are aligning. buf1 refers to previous buffer by addr. + * Symbol [ means the start of a buffer, ] means the end + * of a buffer, and | means page boundaries. + */ +enum buf_end_align_type { + /** +* @SAME_PAGE_UNALIGNED: The end of this buffer is on +* the same page as the end of the previous buffer and +* is not page aligned. Examples: +* buf1 ][ buf2 ][ ... +* buf1 ]|[ buf2 ][ ... +*/ + SAME_PAGE_UNALIGNED = 0, + /** +* @SAME_PAGE_ALIGNED: When the end of the previous buffer +* is not page aligned, the end of this buffer is on the +
[PATCH v3 5/6] android: binder: Add shrinker tracepoints
Add tracepoints in binder transaction allocator to record lru hits and alloc/free page. Signed-off-by: Sherry Yang --- drivers/android/binder_alloc.c | 27 +++-- drivers/android/binder_trace.h | 55 ++ 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 8eb7e9e9a21f..2624a502fcde 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -237,18 +237,25 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, for (page_addr = start; page_addr < end; page_addr += PAGE_SIZE) { int ret; bool on_lru; + size_t index; - page = &alloc->pages[(page_addr - alloc->buffer) / PAGE_SIZE]; + index = (page_addr - alloc->buffer) / PAGE_SIZE; + page = &alloc->pages[index]; if (page->page_ptr) { + trace_binder_alloc_lru_start(alloc, index); + on_lru = list_lru_del(&binder_alloc_lru, &page->lru); WARN_ON(!on_lru); + + trace_binder_alloc_lru_end(alloc, index); continue; } if (WARN_ON(!vma)) goto err_page_ptr_cleared; + trace_binder_alloc_page_start(alloc, index); page->page_ptr = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO); @@ -278,6 +285,8 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, alloc->pid, user_page_addr); goto err_vm_insert_page_failed; } + + trace_binder_alloc_page_end(alloc, index); /* vm_insert_page does not seem to increment the refcount */ } if (mm) { @@ -290,11 +299,17 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, for (page_addr = end - PAGE_SIZE; page_addr >= start; page_addr -= PAGE_SIZE) { bool ret; + size_t index; - page = &alloc->pages[(page_addr - alloc->buffer) / PAGE_SIZE]; + index = (page_addr - alloc->buffer) / PAGE_SIZE; + page = &alloc->pages[index]; + + trace_binder_free_lru_start(alloc, index); ret = list_lru_add(&binder_alloc_lru, &page->lru); WARN_ON(!ret); + + trace_binder_free_lru_end(alloc, index); continue; err_vm_insert_page_failed: @@ -887,18 +902,26 @@ enum lru_status binder_alloc_free_page(struct list_head *item, if (!down_write_trylock(&mm->mmap_sem)) goto err_down_write_mmap_sem_failed; + trace_binder_unmap_user_start(alloc, index); + zap_page_range(alloc->vma, page_addr + alloc->user_buffer_offset, PAGE_SIZE); + trace_binder_unmap_user_end(alloc, index); + up_write(&mm->mmap_sem); mmput(mm); } + trace_binder_unmap_kernel_start(alloc, index); + unmap_kernel_range(page_addr, PAGE_SIZE); __free_page(page->page_ptr); page->page_ptr = NULL; + trace_binder_unmap_kernel_end(alloc, index); + list_lru_isolate(lru, item); mutex_unlock(&alloc->mutex); diff --git a/drivers/android/binder_trace.h b/drivers/android/binder_trace.h index 7967db16ba5a..76e3b9c8a8a2 100644 --- a/drivers/android/binder_trace.h +++ b/drivers/android/binder_trace.h @@ -291,6 +291,61 @@ TRACE_EVENT(binder_update_page_range, __entry->offset, __entry->size) ); +DECLARE_EVENT_CLASS(binder_lru_page_class, + TP_PROTO(const struct binder_alloc *alloc, size_t page_index), + TP_ARGS(alloc, page_index), + TP_STRUCT__entry( + __field(int, proc) + __field(size_t, page_index) + ), + TP_fast_assign( + __entry->proc = alloc->pid; + __entry->page_index = page_index; + ), + TP_printk("proc=%d page_index=%zu", + __entry->proc, __entry->page_index) +); + +DEFINE_EVENT(binder_lru_page_class, binder_alloc_lru_start, + TP_PROTO(const struct binder_alloc *alloc, size_t page_index), + TP_ARGS(alloc, page_index)); + +DEFINE_EVENT(binder_lru_page_class, binder_alloc_lru_end, + TP_PROTO(const struct binder_alloc *alloc, size_t page_index), + TP_ARGS(alloc, page_index)); + +DEFINE_EVENT(binder_lru_page_class, binder_free_lru_start, + TP_PROTO(const struct binder_alloc *alloc, size_t page_index), + TP_ARGS(alloc, page_index)); + +DEFINE_EVENT(binder_lru_page_class, binder_free_lru_en
[PATCH v3 1/6] android: binder: Refactor prev and next buffer into a helper function
Use helper functions buffer_next and buffer_prev instead of list_entry to get the next and previous buffers. Signed-off-by: Sherry Yang --- drivers/android/binder_alloc.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 40f31df60580..f15af2b55a62 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -48,14 +48,23 @@ module_param_named(debug_mask, binder_alloc_debug_mask, pr_info(x); \ } while (0) +static struct binder_buffer *binder_buffer_next(struct binder_buffer *buffer) +{ + return list_entry(buffer->entry.next, struct binder_buffer, entry); +} + +static struct binder_buffer *binder_buffer_prev(struct binder_buffer *buffer) +{ + return list_entry(buffer->entry.prev, struct binder_buffer, entry); +} + static size_t binder_alloc_buffer_size(struct binder_alloc *alloc, struct binder_buffer *buffer) { if (list_is_last(&buffer->entry, &alloc->buffers)) return alloc->buffer + alloc->buffer_size - (void *)buffer->data; - return (size_t)list_entry(buffer->entry.next, - struct binder_buffer, entry) - (size_t)buffer->data; + return (size_t)binder_buffer_next(buffer) - (size_t)buffer->data; } static void binder_insert_free_buffer(struct binder_alloc *alloc, @@ -470,7 +479,7 @@ static void binder_delete_free_buffer(struct binder_alloc *alloc, int free_page_start = 1; BUG_ON(alloc->buffers.next == &buffer->entry); - prev = list_entry(buffer->entry.prev, struct binder_buffer, entry); + prev = binder_buffer_prev(buffer); BUG_ON(!prev->free); if (buffer_end_page(prev) == buffer_start_page(buffer)) { free_page_start = 0; @@ -482,8 +491,7 @@ static void binder_delete_free_buffer(struct binder_alloc *alloc, } if (!list_is_last(&buffer->entry, &alloc->buffers)) { - next = list_entry(buffer->entry.next, - struct binder_buffer, entry); + next = binder_buffer_next(buffer); if (buffer_start_page(next) == buffer_end_page(buffer)) { free_page_end = 0; if (buffer_start_page(next) == @@ -544,8 +552,7 @@ static void binder_free_buf_locked(struct binder_alloc *alloc, rb_erase(&buffer->rb_node, &alloc->allocated_buffers); buffer->free = 1; if (!list_is_last(&buffer->entry, &alloc->buffers)) { - struct binder_buffer *next = list_entry(buffer->entry.next, - struct binder_buffer, entry); + struct binder_buffer *next = binder_buffer_next(buffer); if (next->free) { rb_erase(&next->rb_node, &alloc->free_buffers); @@ -553,8 +560,7 @@ static void binder_free_buf_locked(struct binder_alloc *alloc, } } if (alloc->buffers.next != &buffer->entry) { - struct binder_buffer *prev = list_entry(buffer->entry.prev, - struct binder_buffer, entry); + struct binder_buffer *prev = binder_buffer_prev(buffer); if (prev->free) { binder_delete_free_buffer(alloc, buffer); -- 2.14.1.342.g6490525c54-goog ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 6/6] android: binder: Add page usage in binder stats
Add the number of active, lru, and free pages for each binder process in binder stats Signed-off-by: Sherry Yang --- drivers/android/binder.c | 2 ++ drivers/android/binder_alloc.c | 28 drivers/android/binder_alloc.h | 2 ++ 3 files changed, 32 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index fc5a4b9f3d97..7210e0dba3ef 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -5047,6 +5047,8 @@ static void print_binder_proc_stats(struct seq_file *m, count = binder_alloc_get_allocated_count(&proc->alloc); seq_printf(m, " buffers: %d\n", count); + binder_alloc_print_pages(m, &proc->alloc); + count = 0; binder_inner_proc_lock(proc); list_for_each_entry(w, &proc->todo, entry) { diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 2624a502fcde..8fe165844e47 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -831,6 +831,34 @@ void binder_alloc_print_allocated(struct seq_file *m, mutex_unlock(&alloc->mutex); } +/** + * binder_alloc_print_pages() - print page usage + * @m: seq_file for output via seq_printf() + * @alloc: binder_alloc for this proc + */ +void binder_alloc_print_pages(struct seq_file *m, + struct binder_alloc *alloc) +{ + struct binder_lru_page *page; + int i; + int active = 0; + int lru = 0; + int free = 0; + + mutex_lock(&alloc->mutex); + for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) { + page = &alloc->pages[i]; + if (!page->page_ptr) + free++; + else if (list_empty(&page->lru)) + active++; + else + lru++; + } + mutex_unlock(&alloc->mutex); + seq_printf(m, " pages: %d:%d:%d\n", active, lru, free); +} + /** * binder_alloc_get_allocated_count() - return count of buffers * @alloc: binder_alloc for this proc diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h index fa707cc63393..a3a3602c689c 100644 --- a/drivers/android/binder_alloc.h +++ b/drivers/android/binder_alloc.h @@ -142,6 +142,8 @@ extern void binder_alloc_deferred_release(struct binder_alloc *alloc); extern int binder_alloc_get_allocated_count(struct binder_alloc *alloc); extern void binder_alloc_print_allocated(struct seq_file *m, struct binder_alloc *alloc); +void binder_alloc_print_pages(struct seq_file *m, + struct binder_alloc *alloc); /** * binder_alloc_get_free_async_space() - get free space available for async -- 2.14.1.342.g6490525c54-goog ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 4/6] android: binder: Add global lru shrinker to binder
Hold on to the pages allocated and mapped for transaction buffers until the system is under memory pressure. When that happens, use linux shrinker to free pages. Without using shrinker, patch "android: binder: Move buffer out of area shared with user space" will cause a significant slow down for small transactions that fit into the first page because free list buffer header used to be inlined with buffer data. In addition to prevent the performance regression for small transactions, this patch improves the performance for transactions that take up more than one page. Modify alloc selftest to work with the shrinker change. Test: Run memory intensive applications (Chrome and Camera) to trigger shrinker callbacks. Binder frees memory as expected. Test: Run binderThroughputTest with high memory pressure option enabled. Signed-off-by: Sherry Yang --- drivers/android/binder.c| 2 + drivers/android/binder_alloc.c | 172 +++- drivers/android/binder_alloc.h | 23 - drivers/android/binder_alloc_selftest.c | 68 ++--- 4 files changed, 225 insertions(+), 40 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index b31e64c6f666..fc5a4b9f3d97 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -5243,6 +5243,8 @@ static int __init binder_init(void) struct binder_device *device; struct hlist_node *tmp; + binder_alloc_shrinker_init(); + atomic_set(&binder_transaction_log.cur, ~0U); atomic_set(&binder_transaction_log_failed.cur, ~0U); diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index ddf5f1a379a4..8eb7e9e9a21f 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -27,9 +27,12 @@ #include #include #include +#include #include "binder_alloc.h" #include "binder_trace.h" +struct list_lru binder_alloc_lru; + static DEFINE_MUTEX(binder_alloc_mmap_lock); enum { @@ -188,8 +191,9 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, { void *page_addr; unsigned long user_page_addr; - struct page **page; - struct mm_struct *mm; + struct binder_lru_page *page; + struct mm_struct *mm = NULL; + bool need_mm = false; binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC, "%d: %s pages %pK-%pK\n", alloc->pid, @@ -200,9 +204,18 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, trace_binder_update_page_range(alloc, allocate, start, end); - if (vma) - mm = NULL; - else + if (allocate == 0) + goto free_range; + + for (page_addr = start; page_addr < end; page_addr += PAGE_SIZE) { + page = &alloc->pages[(page_addr - alloc->buffer) / PAGE_SIZE]; + if (!page->page_ptr) { + need_mm = true; + break; + } + } + + if (!vma && need_mm) mm = get_task_mm(alloc->tsk); if (mm) { @@ -215,10 +228,7 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, } } - if (allocate == 0) - goto free_range; - - if (vma == NULL) { + if (!vma && need_mm) { pr_err("%d: binder_alloc_buf failed to map pages in userspace, no vma\n", alloc->pid); goto err_no_vma; @@ -226,18 +236,33 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, for (page_addr = start; page_addr < end; page_addr += PAGE_SIZE) { int ret; + bool on_lru; page = &alloc->pages[(page_addr - alloc->buffer) / PAGE_SIZE]; - BUG_ON(*page); - *page = alloc_page(GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO); - if (*page == NULL) { + if (page->page_ptr) { + on_lru = list_lru_del(&binder_alloc_lru, &page->lru); + WARN_ON(!on_lru); + continue; + } + + if (WARN_ON(!vma)) + goto err_page_ptr_cleared; + + page->page_ptr = alloc_page(GFP_KERNEL | + __GFP_HIGHMEM | + __GFP_ZERO); + if (!page->page_ptr) { pr_err("%d: binder_alloc_buf failed for page at %pK\n", alloc->pid, page_addr); goto err_alloc_page_failed; } + page->alloc = alloc; + INIT_LIST_HEAD(&page->lru); + ret = map_kernel_range_noflush((unsigned long)page_addr, - PAGE_SIZE, PAGE_KERNEL, page); +
[PATCH v3 3/6] android: binder: Move buffer out of area shared with user space
Binder driver allocates buffer meta data in a region that is mapped in user space. These meta data contain pointers in the kernel. This patch allocates buffer meta data on the kernel heap that is not mapped in user space, and uses a pointer to refer to the data mapped. Also move alloc->buffers initialization from mmap to init since it's now used even when mmap failed or was not called. Signed-off-by: Sherry Yang --- drivers/android/binder_alloc.c | 146 +++- drivers/android/binder_alloc.h | 2 +- drivers/android/binder_alloc_selftest.c | 11 ++- 3 files changed, 91 insertions(+), 68 deletions(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index f15af2b55a62..ddf5f1a379a4 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -62,9 +62,9 @@ static size_t binder_alloc_buffer_size(struct binder_alloc *alloc, struct binder_buffer *buffer) { if (list_is_last(&buffer->entry, &alloc->buffers)) - return alloc->buffer + - alloc->buffer_size - (void *)buffer->data; - return (size_t)binder_buffer_next(buffer) - (size_t)buffer->data; + return (u8 *)alloc->buffer + + alloc->buffer_size - (u8 *)buffer->data; + return (u8 *)binder_buffer_next(buffer)->data - (u8 *)buffer->data; } static void binder_insert_free_buffer(struct binder_alloc *alloc, @@ -114,9 +114,9 @@ static void binder_insert_allocated_buffer_locked( buffer = rb_entry(parent, struct binder_buffer, rb_node); BUG_ON(buffer->free); - if (new_buffer < buffer) + if (new_buffer->data < buffer->data) p = &parent->rb_left; - else if (new_buffer > buffer) + else if (new_buffer->data > buffer->data) p = &parent->rb_right; else BUG(); @@ -131,18 +131,17 @@ static struct binder_buffer *binder_alloc_prepare_to_free_locked( { struct rb_node *n = alloc->allocated_buffers.rb_node; struct binder_buffer *buffer; - struct binder_buffer *kern_ptr; + void *kern_ptr; - kern_ptr = (struct binder_buffer *)(user_ptr - alloc->user_buffer_offset - - offsetof(struct binder_buffer, data)); + kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset); while (n) { buffer = rb_entry(n, struct binder_buffer, rb_node); BUG_ON(buffer->free); - if (kern_ptr < buffer) + if (kern_ptr < buffer->data) n = n->rb_left; - else if (kern_ptr > buffer) + else if (kern_ptr > buffer->data) n = n->rb_right; else { /* @@ -330,6 +329,9 @@ struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, return ERR_PTR(-ENOSPC); } + /* Pad 0-size buffers so they get assigned unique addresses */ + size = max(size, sizeof(void *)); + while (n) { buffer = rb_entry(n, struct binder_buffer, rb_node); BUG_ON(!buffer->free); @@ -389,14 +391,9 @@ struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, has_page_addr = (void *)(((uintptr_t)buffer->data + buffer_size) & PAGE_MASK); - if (n == NULL) { - if (size + sizeof(struct binder_buffer) + 4 >= buffer_size) - buffer_size = size; /* no room for other buffers */ - else - buffer_size = size + sizeof(struct binder_buffer); - } + WARN_ON(n && buffer_size != size); end_page_addr = - (void *)PAGE_ALIGN((uintptr_t)buffer->data + buffer_size); + (void *)PAGE_ALIGN((uintptr_t)buffer->data + size); if (end_page_addr > has_page_addr) end_page_addr = has_page_addr; ret = binder_update_page_range(alloc, 1, @@ -404,17 +401,25 @@ struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, if (ret) return ERR_PTR(ret); - rb_erase(best_fit, &alloc->free_buffers); - buffer->free = 0; - buffer->free_in_progress = 0; - binder_insert_allocated_buffer_locked(alloc, buffer); if (buffer_size != size) { - struct binder_buffer *new_buffer = (void *)buffer->data + size; + struct binder_buffer *new_buffer; + new_buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); + if (!new_buffer) { + pr_err("%s: %d failed to alloc new buffer struct\n", + __func__, alloc->pid); + goto err_alloc_buf_struct_failed; + } + new_buff
Re: [PATCH] storvsc: fix memory leak on ring buffer busy
Long, > When storvsc is sending I/O to Hyper-v, it may allocate a bigger > buffer descriptor for large data payload that can't fit into a > pre-allocated buffer descriptor. This bigger buffer is freed on return > path. > > If I/O request to Hyper-v fails due to ring buffer busy, the storvsc > allocated buffer descriptor should also be freed. Which kernel version is this patch aimed at? -- Martin K. Petersen Oracle Linux Engineering ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: ks7010: Fix coding style and remove checkpatch.pl warnings.
It is prefered to use '"%s...", __func__ instead of function names for logging. This commit replaces hardcoded function name strings to the more preferred '"%s...", __func__' style. These warnings were reported by checkpatch.pl. Signed-off-by: Jonathan Whitaker Changes in v2: - Wrapped the changelog text to 72 columns. - Fixed the commit subject to be more clear. --- drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 9b28ee1..c0e91c3 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -834,7 +834,7 @@ static int ks7010_sdio_probe(struct sdio_func *func, unsigned char byte; int ret; - DPRINTK(5, "ks7010_sdio_probe()\n"); + DPRINTK(5, "%s()\n", __func__); priv = NULL; netdev = NULL; @@ -1008,7 +1008,7 @@ static void ks7010_sdio_remove(struct sdio_func *func) struct ks_sdio_card *card; struct ks_wlan_private *priv; - DPRINTK(1, "ks7010_sdio_remove()\n"); + DPRINTK(1, "%s()\n", __func__); card = sdio_get_drvdata(func); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging : gdm724x: Rename variable for consistency
v2: Undo the renaming of the dft_eps_id variable in hci_pdn_table_ind to resolve a compiler error. Signed-off-by: Nick Fox --- drivers/staging/gdm724x/hci_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gdm724x/hci_packet.h b/drivers/staging/gdm724x/hci_packet.h index 22ce8b9477b6..f8837c7103ac 100644 --- a/drivers/staging/gdm724x/hci_packet.h +++ b/drivers/staging/gdm724x/hci_packet.h @@ -50,7 +50,7 @@ struct tlv { struct sdu_header { __dev16 cmd_evt; __dev16 len; - __dev32 dftEpsId; + __dev32 dft_eps_ID; __dev32 bearer_ID; __dev32 nic_type; } __packed; -- 2.13.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH] storvsc: fix memory leak on ring buffer busy
> -Original Message- > From: Martin K. Petersen [mailto:martin.peter...@oracle.com] > Sent: Tuesday, August 29, 2017 6:31 PM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; James E . J . Bottomley > ; de...@linuxdriverproject.org; linux- > s...@vger.kernel.org; linux-ker...@vger.kernel.org; Long Li > > Subject: Re: [PATCH] storvsc: fix memory leak on ring buffer busy > > > Long, > > > When storvsc is sending I/O to Hyper-v, it may allocate a bigger > > buffer descriptor for large data payload that can't fit into a > > pre-allocated buffer descriptor. This bigger buffer is freed on return > > path. > > > > If I/O request to Hyper-v fails due to ring buffer busy, the storvsc > > allocated buffer descriptor should also be freed. > > Which kernel version is this patch aimed at? Martin, thanks for pointing this out. This should also go to stable trees. Cc: sta...@vger.kernel.org > > -- > Martin K. PetersenOracle Linux Engineering ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging:rt8712:xmit_linux.c: Avoid multiple assignments in a single line
Fixed coding style issue Signed-off-by: Harsha Sharma --- drivers/staging/rtl8712/xmit_linux.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c index d13fd15..03c6b0c 100644 --- a/drivers/staging/rtl8712/xmit_linux.c +++ b/drivers/staging/rtl8712/xmit_linux.c @@ -49,8 +49,10 @@ static uint remainder_len(struct pkt_file *pfile) void _r8712_open_pktfile(_pkt *pktptr, struct pkt_file *pfile) { pfile->pkt = pktptr; - pfile->cur_addr = pfile->buf_start = pktptr->data; - pfile->pkt_len = pfile->buf_len = pktptr->len; + pfile->cur_addr = pktptr->data; + pfile->buf_start = pfile->cur_addr; + pfile->pkt_len = pktptr->len; + pfile->buf_len = pfile->pkt_len; pfile->cur_buffer = pfile->buf_start; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
On Wed, Aug 30, 2017 at 12:51:02AM +0530, harsha wrote: > Fixes checkpatch.pl warning: Use WARN_ON() rather than BUG_ON() and BUG() > > Signed-off-by: harsha > --- > drivers/staging/android/ion/ion.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/android/ion/ion.c > b/drivers/staging/android/ion/ion.c > index 93e2c90..a2d36b3 100644 > --- a/drivers/staging/android/ion/ion.c > +++ b/drivers/staging/android/ion/ion.c > @@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, > p = &(*p)->rb_right; > } else { > pr_err("%s: buffer already found.", __func__); > - BUG(); > + WARN_ON(); > } > } > As you did not do anything different from the last submission where I said this patch was not correct, I'm guessing that you don't want any feedback. So I'll go add you to my kill-file now and just ignore your emails, as obviously, you are ignoring mine :( good luck! greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[lkp-robot] [irda] 66d98e78e4: BUG:unable_to_handle_kernel
FYI, we noticed the following commit: commit: 66d98e78e44ccb969cb3196995759d200e64b49b ("irda: move net/irda/ to drivers/staging/irda/net/") url: https://github.com/0day-ci/linux/commits/Greg-Kroah-Hartman/irda-move-it-to-drivers-staging-so-we-can-delete-it/20170829-090816 in testcase: trinity with following parameters: runtime: 300s test-description: Trinity is a linux system call fuzz tester. test-url: http://codemonkey.org.uk/projects/trinity/ on test machine: qemu-system-i386 -enable-kvm -smp 2 -m 320M caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +-+++ | | 89ff9d58e6 | 66d98e78e4 | +-+++ | boot_successes | 0 | 0 | | boot_failures | 10 | 12 | | IP-Config:Auto-configuration_of_network_failed | 8 | | | WARNING:at_arch/x86/mm/dump_pagetables.c:#note_page | 2 | | | EIP:note_page | 2 | | | BUG:unable_to_handle_kernel | 0 | 12 | | Oops:#[##] | 0 | 12 | | EIP:dev_add_pack| 0 | 12 | | Kernel_panic-not_syncing:Fatal_exception| 0 | 12 | +-+++ [0.227015] BUG: unable to handle kernel NULL pointer dereference at 0004 [0.228000] IP: dev_add_pack+0x37/0x80 [0.228000] *pdpt = *pde = f000ff53f000ff53 [0.228000] [0.228000] Oops: 0002 [#1] SMP [0.228000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc5-00526-g66d98e7 #60 [0.228000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 [0.228000] task: d3042040 task.stack: d3044000 [0.228000] EIP: dev_add_pack+0x37/0x80 [0.228000] EFLAGS: 00210286 CPU: 0 [0.228000] EAX: EBX: c20c9318 ECX: d30424c8 EDX: c20c8c60 [0.228000] ESI: c20c8c4c EDI: EBP: d3045f18 ESP: d3045f10 [0.228000] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [0.228000] CR0: 80050033 CR2: 0004 CR3: 022f4000 CR4: 06b0 [0.228000] Call Trace: [0.228000] ? irda_nl_register+0xf/0xf [0.228000] irda_init+0x30/0x88 [0.228000] do_one_initcall+0x8b/0x131 [0.228000] kernel_init_freeable+0xee/0x166 [0.228000] ? rest_init+0x120/0x120 [0.228000] kernel_init+0xb/0x100 [0.228000] ? schedule_tail_wrapper+0x9/0xc [0.228000] ret_from_fork+0x19/0x24 [0.228000] Code: 03 00 00 74 3f 8b 5e 04 85 db 74 50 83 c3 5c b8 e0 6a 09 c2 e8 ab 69 20 00 8b 03 8d 56 14 89 5e 18 89 46 14 0f ae f0 89 f6 89 13 <89> 50 04 b8 e0 6a 09 c2 e8 cc 6d 20 00 5b 5e 5d c3 90 8d b4 26 [0.228000] EIP: dev_add_pack+0x37/0x80 SS:ESP: 0068:d3045f10 [0.228000] CR2: 0004 [0.228000] ---[ end trace 593bc6d2366a532d ]--- To reproduce: git clone https://github.com/01org/lkp-tests.git cd lkp-tests bin/lkp qemu -k job-script # job-script is attached in this email Thanks, Xiaolong # # Automatically generated file; DO NOT EDIT. # Linux/i386 4.13.0-rc5 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf32-i386" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_MMU=y CONFIG_ARCH_MMAP_RND_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_BITS_MAX=16 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_X86_32_SMP=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=3 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # # General setup # CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION
Re: [PATCH v3 1/6] android: binder: Refactor prev and next buffer into a helper function
On Tue, Aug 29, 2017 at 05:46:57PM -0700, Sherry Yang wrote: > Use helper functions buffer_next and buffer_prev instead > of list_entry to get the next and previous buffers. > > Signed-off-by: Sherry Yang > --- > drivers/android/binder_alloc.c | 24 +++- > 1 file changed, 15 insertions(+), 9 deletions(-) What changed from the previous version? Always put the changes below the --- line. Like the documentation says to do so. Also, don't I already have these patches in my tree? Do you want me to revert the existing ones and use the new ones, or what about a fixup patch for any differences? confused, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [lkp-robot] [irda] 66d98e78e4: BUG:unable_to_handle_kernel
On Wed, Aug 30, 2017 at 02:04:11PM +0800, kernel test robot wrote: > FYI, we noticed the following commit: > > commit: 66d98e78e44ccb969cb3196995759d200e64b49b ("irda: move net/irda/ to > drivers/staging/irda/net/") > url: > https://github.com/0day-ci/linux/commits/Greg-Kroah-Hartman/irda-move-it-to-drivers-staging-so-we-can-delete-it/20170829-090816 > > in testcase: trinity > with following parameters: > > runtime: 300s > > test-description: Trinity is a linux system call fuzz tester. > test-url: http://codemonkey.org.uk/projects/trinity/ > > on test machine: qemu-system-i386 -enable-kvm -smp 2 -m 320M > > caused below changes (please refer to attached dmesg/kmsg for entire > log/backtrace): > > +-+++ > | | 89ff9d58e6 | > 66d98e78e4 | > +-+++ > | boot_successes | 0 | 0 > | > | boot_failures | 10 | 12 > | > | IP-Config:Auto-configuration_of_network_failed | 8 | > | > | WARNING:at_arch/x86/mm/dump_pagetables.c:#note_page | 2 | > | > | EIP:note_page | 2 | > | > | BUG:unable_to_handle_kernel | 0 | 12 > | > | Oops:#[##] | 0 | 12 > | > | EIP:dev_add_pack| 0 | 12 > | > | Kernel_panic-not_syncing:Fatal_exception| 0 | 12 > | > +-+++ > > [0.227015] BUG: unable to handle kernel NULL pointer dereference at > 0004 > [0.228000] IP: dev_add_pack+0x37/0x80 Didn't you report this yesterday as well? Anyway, am working on it, give me a few hours to wake up and test... thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [lkp-robot] [irda] 66d98e78e4: BUG:unable_to_handle_kernel
On 08/30, Greg Kroah-Hartman wrote: >On Wed, Aug 30, 2017 at 02:04:11PM +0800, kernel test robot wrote: >> FYI, we noticed the following commit: >> >> commit: 66d98e78e44ccb969cb3196995759d200e64b49b ("irda: move net/irda/ to >> drivers/staging/irda/net/") >> url: >> https://github.com/0day-ci/linux/commits/Greg-Kroah-Hartman/irda-move-it-to-drivers-staging-so-we-can-delete-it/20170829-090816 >> >> in testcase: trinity >> with following parameters: >> >> runtime: 300s >> >> test-description: Trinity is a linux system call fuzz tester. >> test-url: http://codemonkey.org.uk/projects/trinity/ >> >> on test machine: qemu-system-i386 -enable-kvm -smp 2 -m 320M >> >> caused below changes (please refer to attached dmesg/kmsg for entire >> log/backtrace): >> >> +-+++ >> | | 89ff9d58e6 | >> 66d98e78e4 | >> +-+++ >> | boot_successes | 0 | 0 >>| >> | boot_failures | 10 | 12 >>| >> | IP-Config:Auto-configuration_of_network_failed | 8 | >>| >> | WARNING:at_arch/x86/mm/dump_pagetables.c:#note_page | 2 | >>| >> | EIP:note_page | 2 | >>| >> | BUG:unable_to_handle_kernel | 0 | 12 >>| >> | Oops:#[##] | 0 | 12 >>| >> | EIP:dev_add_pack| 0 | 12 >>| >> | Kernel_panic-not_syncing:Fatal_exception| 0 | 12 >>| >> +-+++ >> >> [0.227015] BUG: unable to handle kernel NULL pointer dereference at >> 0004 >> [0.228000] IP: dev_add_pack+0x37/0x80 > >Didn't you report this yesterday as well? Anyway, am working on it, >give me a few hours to wake up and test... Hi, 0day bot tested both the lkml patch and the commit in dev-queue branch of next-queue.git tree, hence the duplicated report. Thanks, Xiaolong > >thanks, > >greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel