Re: [PATCH v1 1/3] binder: BINDER_FREEZE ioctl
On Wed, Mar 10, 2021 at 02:52:49PM -0800, Li Li wrote: > if (target_proc) { > binder_inner_proc_lock(target_proc); > + target_proc->outstanding_txns--; > + WARN_ON(target_proc->outstanding_txns < 0); WARN_* is a huge crutch, please just handle stuff like this properly and if you really need to, warn userspace (but what can they do about it?) You also just rebooted all systems that have panic-on-warn set, so if this can be triggered by userspace, you caused a DoS of things :( So please remove all of the WARN_ON() you add in this patch series to properly handle the error conditions and deal with them correctly. And if these were here just for debugging, hopefully the code works properly now and you do not need debugging anymore so they can all just be dropped. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723bs: add initial value
Add initial value for some uninitialized variable and array. Signed-off-by: Hao Peng --- drivers/staging/rtl8723bs/core/rtw_ap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index b6f944b37b08..ceea160db38a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -206,8 +206,8 @@ void expire_timeout_chk(struct adapter *padapter) struct sta_info *psta = NULL; struct sta_priv *pstapriv = >stapriv; u8 chk_alive_num = 0; - char chk_alive_list[NUM_STA]; - int i; + char chk_alive_list[NUM_STA] = {0}; + int i = 0; spin_lock_bh(>auth_list_lock); @@ -308,7 +308,7 @@ void expire_timeout_chk(struct adapter *padapter) } } if (pmlmeext->active_keep_alive_check) { - int stainfo_offset; + int stainfo_offset = 0; stainfo_offset = rtw_stainfo_offset(pstapriv, psta); if (stainfo_offset_valid(stainfo_offset)) -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-testing] BUILD SUCCESS 31673785d5353b8a8e882fc51ef315cc197f4483
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing branch HEAD: 31673785d5353b8a8e882fc51ef315cc197f4483 staging: dpaa2-switch: prevent joining a bridge while VLAN uppers are present elapsed time: 729m configs tested: 139 configs skipped: 2 The following configs have been built successfully. More configs may be tested in the coming days. gcc tested configs: arm defconfig arm64allyesconfig arm64 defconfig arm allyesconfig arm allmodconfig m68k hp300_defconfig powerpcadder875_defconfig powerpc mpc8313_rdb_defconfig powerpc ppc40x_defconfig mips pistachio_defconfig powerpc mpc837x_rdb_defconfig powerpc pq2fads_defconfig powerpc obs600_defconfig powerpc holly_defconfig powerpc kmeter1_defconfig riscv rv32_defconfig arm mxs_defconfig sh microdev_defconfig mips capcella_defconfig armmvebu_v7_defconfig xtensa cadence_csp_defconfig arm pxa_defconfig powerpc tqm8541_defconfig sh polaris_defconfig powerpc ep88xc_defconfig mips rbtx49xx_defconfig powerpc mpc512x_defconfig sh se7750_defconfig arm eseries_pxa_defconfig sh alldefconfig powerpc katmai_defconfig m68k m5275evb_defconfig shdreamcast_defconfig microblaze defconfig powerpc ppc44x_defconfig powerpc mpc836x_mds_defconfig sh lboxre2_defconfig sh rts7751r2d1_defconfig powerpcge_imp3a_defconfig arm hackkit_defconfig mips loongson1b_defconfig h8300alldefconfig armxcep_defconfig arc tb10x_defconfig arm ep93xx_defconfig powerpc stx_gp3_defconfig arm pxa910_defconfig powerpcicon_defconfig arm colibri_pxa300_defconfig arm at91_dt_defconfig arm pcm027_defconfig sh rsk7201_defconfig ia64 allmodconfig ia64defconfig ia64 allyesconfig m68k allmodconfig m68kdefconfig m68k allyesconfig nios2 defconfig arc allyesconfig nds32 allnoconfig nds32 defconfig nios2allyesconfig cskydefconfig alpha defconfig alphaallyesconfig xtensa allyesconfig h8300allyesconfig arc defconfig sh allmodconfig parisc defconfig s390 allyesconfig s390 allmodconfig parisc allyesconfig s390defconfig i386 allyesconfig sparcallyesconfig sparc defconfig i386 tinyconfig i386defconfig mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig i386 randconfig-a005-20210309 i386 randconfig-a003-20210309 i386 randconfig-a002-20210309 i386 randconfig-a006-20210309 i386 randconfig-a004-20210309 i386 randconfig-a001-20210309 x86_64 randconfig-a013-20210309 x86_64 randconfig-a016-20210309 x86_64 randconfig-a015-20210309 x86_64 randconfig-a014-20210309 x86_64 randconfig-a011-20210309 x86_64 randconfig-a012-20210309 x86_64 randconfig-a011-20210310 x86_64 randconfig-a016-20210310 x86_64 randconfig
International Remittance Department
International Remittance Department. Int' London Mutual Credit Union Bank Add-4 Heaton Road Peckham, SE15 13TH London United Kingdom. Dear Beneficiary Your ATM Visa Card will be shipped through USPS to your Address. I am Mr. Roland de Marcellus, Acting Deputy Assistant Secretary of State for International Finance & Development (BUREAU OF ECONOMIC AND BUSINESS AFFAIRS). This is to inform you officially that after our investigations with the Federal Bureau of Investigation (FBI), Central Intelligence Agency (CIA), and other Security Agencies in the Countries for the year 2017 and 2018, we discovered that you have not yet received yours over due fund. I have made it my first point of call since taking office to settle all Outstanding Payments accrued to Individuals or Corporations with respect to local and overseas contract payment, Debt Rescheduling, and Outstanding Compensation payment. This is to make sure all Outstanding payments are settled this fiscal year 2018. On Behalf of the entire staff of the U.S. Department of State and the United Nations in collaboration with World Bank, we apologize for the delay in your contract paymen t, Winning or Inheritance funds from most the African Countries, and all the inconveniences you encountered while pursuing this payment. However, from the records of outstanding beneficiaries due for payment with the U.S Secretary of State, your name was discovered as next on the list of beneficiaries who has not yet received their payments. I have your file here in my office and it says that you are yet to receive your funds valued at US$1,850,000.00 (One Million, Eight Hundred And Fifty Thousand United States Dollars). This Funds will now be delivered to your designated address on your preferred payment option. We have perfected all modules on how to bring this fund to your designated address without any problem, but be aware that the United Nations and the United States Government have only authorized my office to release the Sum of US$1,850,000.00 to you as true beneficiary of the Funds. Note that your loaded ATM Visa Card will be mailed to you through Priority Mail Express (USP S) to your designated address immediately you admit full compliance to this email. Due to my busy schedules, you are advised to kindly get in contact with our correspondent Mr. Mark Christopher with the below details enclosed to help ensure safe mailing of your ATM Visa Card: Your Full Name: Your Contact House Address: Name of City of Residence: Country of Residence: Direct Mobile Telephone Number: ID Card, DL, or Passport Copy: Age and Occupation: Contact Mr. Mark Christopher immediately by emailing the address below: Name: Mr.Mark Christopher. Email: markintldmmutualcre...@consultant.com Telephone: +1 (915) 229-3346/+447452378992 He is obliged to treat your case with utmost urgency as soon as you contact him and fill out your correct details including all reachable phone numbers for him to get in touch with you via phone and email. NOTE: Every documentation proof for your fund has been packaged and sealed to be mailed together with your Visa Card to your address. Therefore, the only obligation required of you by the laws of the Government of the United States and the financial Monetary Policy of the Supreme Court, states that; you as a beneficiary must officially obtain the irrevocable LEGAL STAY OF PROCEED from the Supreme Court of USA, as a means to justify the legitimacy, transparency and clean bill of funds from the USA so that by the time your funds gets to you, no authority will question the funds as it has been legally certified free from all financial Malpractices and facets. The LEGAL STAY OF PROCEED is valued at a cost of ($550) please take note of that. As soon as the above-mentioned $550 is received, The LEGAL STAY OF PROCEED will be secured on your behalf immediately. I need all the compliance that I can get from you to ensure we get this project accomplished. Personally, I am very sorry for the de lay you have gone through in the past years. Thanks for adhering to this instruction which is meant for your sole benefit, once again accept my congratulations in advance. Thanks for your cooperation as your quick response to this email notice with adherence to the above instructions is highly anticipated. Yours Sincerely, Mr Roland de Marcellus. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v1 2/3] binder: use EINTR for interrupted wait for work
From: Marco Ballesio when interrupted by a signal, binder_wait_for_work currently returns -ERESTARTSYS. This error code isn't propagated to user space, but a way to handle interruption due to signals must be provided to code using this API. Replace this instance of -ERESTARTSYS with -EINTR, which is propagated to user space. Test: built, booted, interrupted a worker thread within binder_wait_for_work Signed-off-by: Marco Ballesio Signed-off-by: Li Li --- drivers/android/binder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 9ec3ba038652..34c3e430a270 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -3710,7 +3710,7 @@ static int binder_wait_for_work(struct binder_thread *thread, binder_inner_proc_lock(proc); list_del_init(>waiting_thread_node); if (signal_pending(current)) { - ret = -ERESTARTSYS; + ret = -EINTR; break; } } @@ -4851,7 +4851,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (thread) thread->looper_need_return = false; wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); - if (ret && ret != -ERESTARTSYS) + if (ret && ret != -EINTR) pr_info("%d:%d ioctl %x %lx returned %d\n", proc->pid, current->pid, cmd, arg, ret); err_unlocked: trace_binder_ioctl_done(ret); -- 2.31.0.rc1.246.gcd05c9c855-goog ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v1 3/3] binder: BINDER_GET_FROZEN_INFO ioctl
From: Marco Ballesio User space needs to know if binder transactions occurred to frozen processes. Introduce a new BINDER_GET_FROZEN ioctl and keep track of transactions occurring to frozen proceses. Signed-off-by: Marco Ballesio Signed-off-by: Li Li --- drivers/android/binder.c| 55 + drivers/android/binder_internal.h | 6 include/uapi/linux/android/binder.h | 7 3 files changed, 68 insertions(+) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 34c3e430a270..00c68b7eb553 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2358,6 +2358,10 @@ static int binder_proc_transaction(struct binder_transaction *t, } binder_inner_proc_lock(proc); + if (proc->is_frozen) { + proc->sync_recv |= !oneway; + proc->async_recv |= oneway; + } if ((proc->is_frozen && !oneway) || proc->is_dead || (thread && thread->is_dead)) { @@ -4632,6 +4636,8 @@ static int binder_ioctl_freeze(struct binder_freeze_info *info, if (!info->enable) { binder_inner_proc_lock(target_proc); + target_proc->sync_recv = false; + target_proc->async_recv = false; target_proc->is_frozen = false; binder_inner_proc_unlock(target_proc); return 0; @@ -4643,6 +4649,8 @@ static int binder_ioctl_freeze(struct binder_freeze_info *info, * for transactions to drain. */ binder_inner_proc_lock(target_proc); + target_proc->sync_recv = false; + target_proc->async_recv = false; target_proc->is_frozen = true; binder_inner_proc_unlock(target_proc); @@ -4664,6 +4672,33 @@ static int binder_ioctl_freeze(struct binder_freeze_info *info, return ret; } +static int binder_ioctl_get_freezer_info( + struct binder_frozen_status_info *info) +{ + struct binder_proc *target_proc; + bool found = false; + + info->sync_recv = 0; + info->async_recv = 0; + + mutex_lock(_procs_lock); + hlist_for_each_entry(target_proc, _procs, proc_node) { + if (target_proc->pid == info->pid) { + found = true; + binder_inner_proc_lock(target_proc); + info->sync_recv |= target_proc->sync_recv; + info->async_recv |= target_proc->async_recv; + binder_inner_proc_unlock(target_proc); + } + } + mutex_unlock(_procs_lock); + + if (!found) + return -EINVAL; + + return 0; +} + static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { int ret; @@ -4842,6 +4877,24 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) goto err; break; } + case BINDER_GET_FROZEN_INFO: { + struct binder_frozen_status_info info; + + if (copy_from_user(, ubuf, sizeof(info))) { + ret = -EFAULT; + goto err; + } + + ret = binder_ioctl_get_freezer_info(); + if (ret < 0) + goto err; + + if (copy_to_user(ubuf, , sizeof(info))) { + ret = -EFAULT; + goto err; + } + break; + } default: ret = -EINVAL; goto err; @@ -5152,6 +5205,8 @@ static void binder_deferred_release(struct binder_proc *proc) proc->is_dead = true; proc->is_frozen = false; + proc->sync_recv = false; + proc->async_recv = false; threads = 0; active_transactions = 0; while ((n = rb_first(>threads))) { diff --git a/drivers/android/binder_internal.h b/drivers/android/binder_internal.h index e6a53e98c6da..2872a7de68e1 100644 --- a/drivers/android/binder_internal.h +++ b/drivers/android/binder_internal.h @@ -376,6 +376,10 @@ struct binder_ref { * @is_frozen:process is frozen and unable to service *binder transactions *(protected by @inner_lock) + * @sync_recv:process received sync transactions since last frozen + *(protected by @inner_lock) + * @async_recv: process received async transactions since last frozen + *(protected by @inner_lock) * @freeze_wait: waitqueue of processes waiting for all outstanding *transactions to be processed *(protected by @inner_lock) @@ -422,6 +426,8 @@ struct binder_proc { int outstanding_txns; bool is_dead; bool is_frozen; + bool sync_recv; + bool async_recv; wait_queue_head_t
[PATCH v1 1/3] binder: BINDER_FREEZE ioctl
From: Marco Ballesio Frozen tasks can't process binder transactions, so a way is required to inform transmitting ends of communication failures due to the frozen state of their receiving counterparts. Additionally, races are possible between transitions to frozen state and binder transactions enqueued to a specific process. Implement BINDER_FREEZE ioctl for user space to inform the binder driver about the intention to freeze or unfreeze a process. When the ioctl is called, block the caller until any pending binder transactions toward the target process are flushed. Return an error to transactions to processes marked as frozen. Signed-off-by: Marco Ballesio Co-developed-by: Todd Kjos Signed-off-by: Todd Kjos Signed-off-by: Li Li --- drivers/android/binder.c| 137 ++-- drivers/android/binder_internal.h | 12 +++ include/uapi/linux/android/binder.h | 13 +++ 3 files changed, 152 insertions(+), 10 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index c119736ca56a..9ec3ba038652 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -1506,6 +1506,10 @@ static void binder_free_transaction(struct binder_transaction *t) if (target_proc) { binder_inner_proc_lock(target_proc); + target_proc->outstanding_txns--; + WARN_ON(target_proc->outstanding_txns < 0); + if (!target_proc->outstanding_txns && target_proc->is_frozen) + wake_up_interruptible_all(_proc->freeze_wait); if (t->buffer) t->buffer->transaction = NULL; binder_inner_proc_unlock(target_proc); @@ -2331,10 +2335,11 @@ static int binder_fixup_parent(struct binder_transaction *t, * If the @thread parameter is not NULL, the transaction is always queued * to the waitlist of that specific thread. * - * Return: true if the transactions was successfully queued - * false if the target process or thread is dead + * Return: 0 if the transaction was successfully queued + * BR_DEAD_REPLY if the target process or thread is dead + * BR_FROZEN_REPLY if the target process or thread is frozen */ -static bool binder_proc_transaction(struct binder_transaction *t, +static int binder_proc_transaction(struct binder_transaction *t, struct binder_proc *proc, struct binder_thread *thread) { @@ -2354,10 +2359,13 @@ static bool binder_proc_transaction(struct binder_transaction *t, binder_inner_proc_lock(proc); - if (proc->is_dead || (thread && thread->is_dead)) { + if ((proc->is_frozen && !oneway) || proc->is_dead || + (thread && thread->is_dead)) { + bool proc_is_dead = proc->is_dead + || (thread && thread->is_dead); binder_inner_proc_unlock(proc); binder_node_unlock(node); - return false; + return proc_is_dead ? BR_DEAD_REPLY : BR_FROZEN_REPLY; } if (!thread && !pending_async) @@ -2373,10 +2381,11 @@ static bool binder_proc_transaction(struct binder_transaction *t, if (!pending_async) binder_wakeup_thread_ilocked(proc, thread, !oneway /* sync */); + proc->outstanding_txns++; binder_inner_proc_unlock(proc); binder_node_unlock(node); - return true; + return 0; } /** @@ -3013,13 +3022,16 @@ static void binder_transaction(struct binder_proc *proc, if (reply) { binder_enqueue_thread_work(thread, tcomplete); binder_inner_proc_lock(target_proc); - if (target_thread->is_dead) { + if (target_thread->is_dead || target_proc->is_frozen) { + return_error = target_thread->is_dead ? + BR_DEAD_REPLY : BR_FROZEN_REPLY; binder_inner_proc_unlock(target_proc); goto err_dead_proc_or_thread; } BUG_ON(t->buffer->async_transaction != 0); binder_pop_transaction_ilocked(target_thread, in_reply_to); binder_enqueue_thread_work_ilocked(target_thread, >work); + target_proc->outstanding_txns++; binder_inner_proc_unlock(target_proc); wake_up_interruptible_sync(_thread->wait); binder_free_transaction(in_reply_to); @@ -3038,7 +3050,9 @@ static void binder_transaction(struct binder_proc *proc, t->from_parent = thread->transaction_stack; thread->transaction_stack = t; binder_inner_proc_unlock(proc); - if (!binder_proc_transaction(t, target_proc, target_thread)) { + return_error = binder_proc_transaction(t, + target_proc, target_thread); +
[PATCH v1 0/3] Binder: Enable App Freezing Capability
From: Li Li To improve the user experience when switching between recently used applications, the background applications which are not currently needed are cached in the memory. Normally, a well designed application will not consume valuable CPU resources in the background. However, it's possible some applications are not able or willing to behave as expected, wasting energy even after being cached. It is a good idea to freeze those applications when they're only being kept alive for the sake of faster startup and energy saving. These kernel patches will provide the necessary infrastructure for user space framework to freeze and thaw a cached process, check the current freezing status and correctly deal with outstanding binder transactions to frozen processes. Marco Ballesio (3): binder: BINDER_FREEZE ioctl binder: use EINTR for interrupted wait for work binder: BINDER_GET_FROZEN_INFO ioctl drivers/android/binder.c| 196 ++-- drivers/android/binder_internal.h | 18 +++ include/uapi/linux/android/binder.h | 20 +++ 3 files changed, 222 insertions(+), 12 deletions(-) -- 2.31.0.rc1.246.gcd05c9c855-goog ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: rtl8723bs: align and beautify comments
fix the following checkpatch warnings: WARNING: Block comments use * on subsequent lines + /* + AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k -- WARNING: Block comments use * on subsequent lines +/* +op_mode Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_ap.c | 32 - 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index b6f944b37b08..6d203814260f 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -719,11 +719,11 @@ static void update_hw_ht_param(struct adapter *padapter) DBG_871X("%s\n", __func__); - /* handle A-MPDU parameter field */ - /* - AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k - AMPDU_para [4:2]:Min MPDU Start Spacing - */ + /* handle A-MPDU parameter field +* +* AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k +* AMPDU_para [4:2]:Min MPDU Start Spacing +*/ max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; min_MPDU_spacing = ( @@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx) } /* -op_mode -Set to 0 (HT pure) under the following conditions - - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or - - all STAs in the BSS are 20 MHz HT in 20 MHz BSS -Set to 1 (HT non-member protection) if there may be non-HT STAs - in both the primary and the secondary channel -Set to 2 if only HT STAs are associated in BSS, - however and at least one 20 MHz HT STA is associated -Set to 3 (HT mixed mode) when one or more non-HT STAs are associated - (currently non-GF HT station is considered as non-HT STA also) -*/ + * op_mode + * Set to 0 (HT pure) under the following conditions + * - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or + * - all STAs in the BSS are 20 MHz HT in 20 MHz BSS + * Set to 1 (HT non-member protection) if there may be non-HT STAs + * in both the primary and the secondary channel + * Set to 2 if only HT STAs are associated in BSS, + * however and at least one 20 MHz HT STA is associated + * Set to 3 (HT mixed mode) when one or more non-HT STAs are associated + * (currently non-GF HT station is considered as non-HT STA also) + */ static int rtw_ht_operation_update(struct adapter *padapter) { u16 cur_op_mode, new_op_mode; -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-next] BUILD SUCCESS c972c2d821ca3eda001a20dbe2ca0b4718838caf
allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig x86_64 randconfig-a006-20210308 x86_64 randconfig-a001-20210308 x86_64 randconfig-a004-20210308 x86_64 randconfig-a002-20210308 x86_64 randconfig-a005-20210308 x86_64 randconfig-a003-20210308 i386 randconfig-a005-20210309 i386 randconfig-a003-20210309 i386 randconfig-a002-20210309 i386 randconfig-a006-20210309 i386 randconfig-a004-20210309 i386 randconfig-a001-20210309 x86_64 randconfig-a013-20210309 x86_64 randconfig-a016-20210309 x86_64 randconfig-a015-20210309 x86_64 randconfig-a014-20210309 x86_64 randconfig-a011-20210309 x86_64 randconfig-a012-20210309 x86_64 randconfig-a011-20210310 x86_64 randconfig-a016-20210310 x86_64 randconfig-a013-20210310 x86_64 randconfig-a015-20210310 x86_64 randconfig-a014-20210310 x86_64 randconfig-a012-20210310 i386 randconfig-a016-20210309 i386 randconfig-a012-20210309 i386 randconfig-a014-20210309 i386 randconfig-a013-20210309 i386 randconfig-a011-20210309 i386 randconfig-a015-20210309 i386 randconfig-a016-20210308 i386 randconfig-a012-20210308 i386 randconfig-a014-20210308 i386 randconfig-a013-20210308 i386 randconfig-a011-20210308 i386 randconfig-a015-20210308 riscvnommu_k210_defconfig riscvallyesconfig riscvnommu_virt_defconfig riscv allnoconfig riscv rv32_defconfig riscvallmodconfig x86_64 allyesconfig x86_64rhel-7.6-kselftests x86_64 rhel-8.3 x86_64 rhel-8.3-kbuiltin x86_64 kexec clang tested configs: x86_64 randconfig-a013-20210308 x86_64 randconfig-a016-20210308 x86_64 randconfig-a015-20210308 x86_64 randconfig-a014-20210308 x86_64 randconfig-a011-20210308 x86_64 randconfig-a012-20210308 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723bs: align comments
On Wed, Mar 10, 2021 at 04:51:44PM +0100, Greg KH wrote: > On Wed, Mar 10, 2021 at 04:37:21PM +0100, Fabio Aiuto wrote: > > fix the following checkpatch warnings: > > > > WARNING: Block comments use * on subsequent lines > > + /* > > + AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > > -- > > WARNING: Block comments use * on subsequent lines > > +/* > > +op_mode > > > > Signed-off-by: Fabio Aiuto > > --- > > drivers/staging/rtl8723bs/core/rtw_ap.c | 28 - > > 1 file changed, 14 insertions(+), 14 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c > > b/drivers/staging/rtl8723bs/core/rtw_ap.c > > index b6f944b37b08..3a0e4f64466a 100644 > > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > > @@ -721,9 +721,9 @@ static void update_hw_ht_param(struct adapter *padapter) > > > > /* handle A-MPDU parameter field */ > > /* > > - AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > > - AMPDU_para [4:2]:Min MPDU Start Spacing > > - */ > > +* AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > > +* AMPDU_para [4:2]:Min MPDU Start Spacing > > +*/ > > max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; > > > > min_MPDU_spacing = ( > > @@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 > > ie_id, u8 *oui, u8 tx) > > } > > > > /* > > -op_mode > > -Set to 0 (HT pure) under the following conditions > > - - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or > > - - all STAs in the BSS are 20 MHz HT in 20 MHz BSS > > -Set to 1 (HT non-member protection) if there may be non-HT STAs > > - in both the primary and the secondary channel > > -Set to 2 if only HT STAs are associated in BSS, > > - however and at least one 20 MHz HT STA is associated > > -Set to 3 (HT mixed mode) when one or more non-HT STAs are associated > > - (currently non-GF HT station is considered as non-HT STA also) > > -*/ > > + *op_mode > > + *Set to 0 (HT pure) under the following conditions > > + * - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or > > + * - all STAs in the BSS are 20 MHz HT in 20 MHz BSS > > + *Set to 1 (HT non-member protection) if there may be non-HT STAs > > + * in both the primary and the secondary channel > > + *Set to 2 if only HT STAs are associated in BSS, > > + * however and at least one 20 MHz HT STA is associated > > + *Set to 3 (HT mixed mode) when one or more non-HT STAs are associated > > + * (currently non-GF HT station is considered as non-HT STA also) > > + */ > > Add a space after the ' ' to make it look correct please. > > thanks, > > greg k-h I am sorry, I fear I don't understand, checkpatch.sh script says the patch is ok. Where have I to add a ' ' (a blank?)? thank you, fabio ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-linus] BUILD SUCCESS 16d7586dccf83785819f5b66f4d20fac9bfcd644
onfig s390 allmodconfig parisc allyesconfig s390defconfig i386 allyesconfig sparcallyesconfig sparc defconfig i386 tinyconfig mips allyesconfig mips allmodconfig powerpc allyesconfig powerpc allmodconfig powerpc allnoconfig x86_64 randconfig-a006-20210308 x86_64 randconfig-a001-20210308 x86_64 randconfig-a004-20210308 x86_64 randconfig-a002-20210308 x86_64 randconfig-a005-20210308 x86_64 randconfig-a003-20210308 i386 randconfig-a005-20210309 i386 randconfig-a003-20210309 i386 randconfig-a002-20210309 i386 randconfig-a006-20210309 i386 randconfig-a004-20210309 i386 randconfig-a001-20210309 i386 randconfig-a005-20210308 i386 randconfig-a003-20210308 i386 randconfig-a002-20210308 i386 randconfig-a006-20210308 i386 randconfig-a004-20210308 i386 randconfig-a001-20210308 x86_64 randconfig-a013-20210309 x86_64 randconfig-a016-20210309 x86_64 randconfig-a015-20210309 x86_64 randconfig-a014-20210309 x86_64 randconfig-a011-20210309 x86_64 randconfig-a012-20210309 x86_64 randconfig-a011-20210310 x86_64 randconfig-a016-20210310 x86_64 randconfig-a013-20210310 x86_64 randconfig-a015-20210310 x86_64 randconfig-a014-20210310 x86_64 randconfig-a012-20210310 i386 randconfig-a016-20210309 i386 randconfig-a012-20210309 i386 randconfig-a014-20210309 i386 randconfig-a013-20210309 i386 randconfig-a011-20210309 i386 randconfig-a015-20210309 riscvnommu_k210_defconfig riscvallyesconfig riscvnommu_virt_defconfig riscv allnoconfig riscv rv32_defconfig riscvallmodconfig x86_64 allyesconfig x86_64rhel-7.6-kselftests x86_64 defconfig x86_64 rhel-8.3 x86_64 rhel-8.3-kbuiltin x86_64 kexec clang tested configs: x86_64 randconfig-a006-20210309 x86_64 randconfig-a001-20210309 x86_64 randconfig-a004-20210309 x86_64 randconfig-a002-20210309 x86_64 randconfig-a005-20210309 x86_64 randconfig-a003-20210309 x86_64 randconfig-a013-20210308 x86_64 randconfig-a016-20210308 x86_64 randconfig-a015-20210308 x86_64 randconfig-a014-20210308 x86_64 randconfig-a011-20210308 x86_64 randconfig-a012-20210308 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723bs: align comments
On Wed, Mar 10, 2021 at 04:37:21PM +0100, Fabio Aiuto wrote: > fix the following checkpatch warnings: > > WARNING: Block comments use * on subsequent lines > + /* > + AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > -- > WARNING: Block comments use * on subsequent lines > +/* > +op_mode > > Signed-off-by: Fabio Aiuto > --- > drivers/staging/rtl8723bs/core/rtw_ap.c | 28 - > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c > b/drivers/staging/rtl8723bs/core/rtw_ap.c > index b6f944b37b08..3a0e4f64466a 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > @@ -721,9 +721,9 @@ static void update_hw_ht_param(struct adapter *padapter) > > /* handle A-MPDU parameter field */ > /* Combine these two comments into one mult-line comment. > - AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > - AMPDU_para [4:2]:Min MPDU Start Spacing > - */ > + * AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > + * AMPDU_para [4:2]:Min MPDU Start Spacing > + */ > max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; > > min_MPDU_spacing = ( > @@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 > ie_id, u8 *oui, u8 tx) > } > > /* > -op_mode > -Set to 0 (HT pure) under the following conditions > - - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or > - - all STAs in the BSS are 20 MHz HT in 20 MHz BSS > -Set to 1 (HT non-member protection) if there may be non-HT STAs > - in both the primary and the secondary channel > -Set to 2 if only HT STAs are associated in BSS, > - however and at least one 20 MHz HT STA is associated > -Set to 3 (HT mixed mode) when one or more non-HT STAs are associated > - (currently non-GF HT station is considered as non-HT STA also) > -*/ > + *op_mode You need to have a space character after the '*'. /* * op_mode * Set to ... > + *Set to 0 (HT pure) under the following conditions > + *- all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or > + *- all STAs in the BSS are 20 MHz HT in 20 MHz BSS > + *Set to 1 (HT non-member protection) if there may be non-HT STAs > + *in both the primary and the secondary channel > + *Set to 2 if only HT STAs are associated in BSS, > + *however and at least one 20 MHz HT STA is associated > + *Set to 3 (HT mixed mode) when one or more non-HT STAs are associated > + *(currently non-GF HT station is considered as non-HT STA also) > + */ regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Match alignment with open parenthesis
On Mon, Feb 22, 2021 at 05:14:09AM +0530, Mahak Gupta wrote: > This patches fixes the checks- 'Alignment should match open parenthesis' > of 'checkpatch.pl'. > > Signed-off-by: Mahak Gupta > --- > drivers/staging/octeon-usb/octeon-hcd.c | 32 + > 1 file changed, 17 insertions(+), 15 deletions(-) This got lost as you didn't put the subsystem on the subject line :( Please resend with "staging: " as a prefix on the subject line so our tools can pick this up properly. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: rtl8723bs: align comments
On Wed, Mar 10, 2021 at 04:37:21PM +0100, Fabio Aiuto wrote: > fix the following checkpatch warnings: > > WARNING: Block comments use * on subsequent lines > + /* > + AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > -- > WARNING: Block comments use * on subsequent lines > +/* > +op_mode > > Signed-off-by: Fabio Aiuto > --- > drivers/staging/rtl8723bs/core/rtw_ap.c | 28 - > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c > b/drivers/staging/rtl8723bs/core/rtw_ap.c > index b6f944b37b08..3a0e4f64466a 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > @@ -721,9 +721,9 @@ static void update_hw_ht_param(struct adapter *padapter) > > /* handle A-MPDU parameter field */ > /* > - AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > - AMPDU_para [4:2]:Min MPDU Start Spacing > - */ > + * AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k > + * AMPDU_para [4:2]:Min MPDU Start Spacing > + */ > max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; > > min_MPDU_spacing = ( > @@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 > ie_id, u8 *oui, u8 tx) > } > > /* > -op_mode > -Set to 0 (HT pure) under the following conditions > - - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or > - - all STAs in the BSS are 20 MHz HT in 20 MHz BSS > -Set to 1 (HT non-member protection) if there may be non-HT STAs > - in both the primary and the secondary channel > -Set to 2 if only HT STAs are associated in BSS, > - however and at least one 20 MHz HT STA is associated > -Set to 3 (HT mixed mode) when one or more non-HT STAs are associated > - (currently non-GF HT station is considered as non-HT STA also) > -*/ > + *op_mode > + *Set to 0 (HT pure) under the following conditions > + *- all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or > + *- all STAs in the BSS are 20 MHz HT in 20 MHz BSS > + *Set to 1 (HT non-member protection) if there may be non-HT STAs > + *in both the primary and the secondary channel > + *Set to 2 if only HT STAs are associated in BSS, > + *however and at least one 20 MHz HT STA is associated > + *Set to 3 (HT mixed mode) when one or more non-HT STAs are associated > + *(currently non-GF HT station is considered as non-HT STA also) > + */ Add a space after the ' ' to make it look correct please. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723bs: align comments
fix the following checkpatch warnings: WARNING: Block comments use * on subsequent lines + /* + AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k -- WARNING: Block comments use * on subsequent lines +/* +op_mode Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/core/rtw_ap.c | 28 - 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index b6f944b37b08..3a0e4f64466a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -721,9 +721,9 @@ static void update_hw_ht_param(struct adapter *padapter) /* handle A-MPDU parameter field */ /* - AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k - AMPDU_para [4:2]:Min MPDU Start Spacing - */ +* AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k +* AMPDU_para [4:2]:Min MPDU Start Spacing +*/ max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; min_MPDU_spacing = ( @@ -1815,17 +1815,17 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx) } /* -op_mode -Set to 0 (HT pure) under the following conditions - - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or - - all STAs in the BSS are 20 MHz HT in 20 MHz BSS -Set to 1 (HT non-member protection) if there may be non-HT STAs - in both the primary and the secondary channel -Set to 2 if only HT STAs are associated in BSS, - however and at least one 20 MHz HT STA is associated -Set to 3 (HT mixed mode) when one or more non-HT STAs are associated - (currently non-GF HT station is considered as non-HT STA also) -*/ + *op_mode + *Set to 0 (HT pure) under the following conditions + * - all STAs in the BSS are 20/40 MHz HT in 20/40 MHz BSS or + * - all STAs in the BSS are 20 MHz HT in 20 MHz BSS + *Set to 1 (HT non-member protection) if there may be non-HT STAs + * in both the primary and the secondary channel + *Set to 2 if only HT STAs are associated in BSS, + * however and at least one 20 MHz HT STA is associated + *Set to 3 (HT mixed mode) when one or more non-HT STAs are associated + * (currently non-GF HT station is considered as non-HT STA also) + */ static int rtw_ht_operation_update(struct adapter *padapter) { u16 cur_op_mode, new_op_mode; -- 2.20.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v7 11/11] pwm: Add Raspberry Pi Firmware based PWM bus
Hello Nicolas, On Mon, Jan 18, 2021 at 01:32:44PM +0100, Nicolas Saenz Julienne wrote: > diff --git a/drivers/pwm/pwm-raspberrypi-poe.c > b/drivers/pwm/pwm-raspberrypi-poe.c > new file mode 100644 > index ..ca845e8fabe6 > --- /dev/null > +++ b/drivers/pwm/pwm-raspberrypi-poe.c > @@ -0,0 +1,220 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright 2020 Nicolas Saenz Julienne > + * For more information on Raspberry Pi's PoE hat see: > + * https://www.raspberrypi.org/products/poe-hat/ > + * > + * Limitations: > + * - No disable bit, so a disabled PWM is simulated by duty_cycle 0 > + * - Only normal polarity > + * - Fixed 12.5 kHz period > + * > + * The current period is completed when HW is reconfigured. nice. > + */ > + > [...] > +static int raspberrypi_pwm_apply(struct pwm_chip *chip, struct pwm_device > *pwm, > + const struct pwm_state *state) > +{ > + struct raspberrypi_pwm *rpipwm = raspberrypi_pwm_from_chip(chip); > + unsigned int duty_cycle; > + int ret; > + > + if (state->period < RPI_PWM_PERIOD_NS || > + state->polarity != PWM_POLARITY_NORMAL) > + return -EINVAL; > + > + if (!state->enabled) > + duty_cycle = 0; > + else if (state->duty_cycle < RPI_PWM_PERIOD_NS) > + duty_cycle = DIV_ROUND_DOWN_ULL(state->duty_cycle * > RPI_PWM_MAX_DUTY, > + RPI_PWM_PERIOD_NS); > + else > + duty_cycle = RPI_PWM_MAX_DUTY; > + > + if (duty_cycle == rpipwm->duty_cycle) > + return 0; > + > + ret = raspberrypi_pwm_set_property(rpipwm->firmware, > RPI_PWM_CUR_DUTY_REG, > +duty_cycle); > + if (ret) { > + dev_err(chip->dev, "Failed to set duty cycle: %pe\n", > + ERR_PTR(ret)); > + return ret; > + } > + > + /* > + * This sets the default duty cycle after resetting the board, we > + * updated it every time to mimic Raspberry Pi's downstream's driver > + * behaviour. > + */ > + ret = raspberrypi_pwm_set_property(rpipwm->firmware, > RPI_PWM_DEF_DUTY_REG, > +duty_cycle); > + if (ret) { > + dev_err(chip->dev, "Failed to set default duty cycle: %pe\n", > + ERR_PTR(ret)); > + return ret; This only has an effect for the next reboot, right? If so I wonder if it is a good idea in general. (Think: The current PWM setting enables a motor that makes a self-driving car move at 100 km/h. Consider the rpi crashes, do I want to car to pick up driving 100 km/h at power up even before Linux is up again?) And if we agree it's a good idea: Should raspberrypi_pwm_apply return 0 if setting the duty cycle succeeded and only setting the default didn't? Other than that the patch looks fine. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ | signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8723bs/core: fix coding style issue
Move operators and spaces before tabs to fix coding style issues. Signed-off-by: Longji Guo --- drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c index 3c9dbd7443d9..f249193edeb3 100644 --- a/drivers/staging/rtl8723bs/core/rtw_recv.c +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c @@ -576,7 +576,7 @@ union recv_frame *portctrl(struct adapter *adapter, union recv_frame *precv_fram prtnframe = precv_frame; /* get ether_type */ - ptr = ptr+pfhdr->attrib.hdrlen+pfhdr->attrib.iv_len+LLC_HEADER_SIZE; + ptr = ptr + pfhdr->attrib.hdrlen + pfhdr->attrib.iv_len + LLC_HEADER_SIZE; memcpy(_tmp, ptr, 2); ether_type = ntohs(be_tmp); -- 2.30.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192u: ieee80211: Remove braces for single line blocks
Remove braces around those `if` and `for` blocks which contain a single line and therefore fix the Checkpatch warning of the following type: "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Atul Gopinathan --- .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 42 --- .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 +- .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 6 +-- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c index b6fee7230ce0..b0e01ee65f7f 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c @@ -612,9 +612,9 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee, pHTInfo->RxReorderDropCounter++; { int i; - for (i = 0; i < prxb->nr_subframes; i++) { + for (i = 0; i < prxb->nr_subframes; i++) dev_kfree_skb(prxb->subframes[i]); - } + kfree(prxb); prxb = NULL; } @@ -632,11 +632,11 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee, pTS->rx_indicate_seq = (pTS->rx_indicate_seq + 1) % 4096; bMatchWinStart = true; } else if (SN_LESS(WinEnd, SeqNum)) { - if (SeqNum >= (WinSize - 1)) { + if (SeqNum >= (WinSize - 1)) pTS->rx_indicate_seq = SeqNum + 1 - WinSize; - } else { + else pTS->rx_indicate_seq = 4095 - (WinSize - (SeqNum + 1)) + 1; - } + IEEE80211_DEBUG(IEEE80211_DL_REORDER, "Window Shift! IndicateSeq: %d, NewSeq: %d\n", pTS->rx_indicate_seq, SeqNum); } @@ -674,9 +674,9 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee, list_add_tail(>List, >RxReorder_Unused_List); { int i; - for (i = 0; i < prxb->nr_subframes; i++) { + for (i = 0; i < prxb->nr_subframes; i++) dev_kfree_skb(prxb->subframes[i]); - } + kfree(prxb); prxb = NULL; } @@ -693,9 +693,9 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee, IEEE80211_DEBUG(IEEE80211_DL_ERR, "RxReorderIndicatePacket(): There is no reorder entry!! Packet is dropped!!\n"); { int i; - for (i = 0; i < prxb->nr_subframes; i++) { + for (i = 0; i < prxb->nr_subframes; i++) dev_kfree_skb(prxb->subframes[i]); - } + kfree(prxb); prxb = NULL; } @@ -785,13 +785,12 @@ static u8 parse_subframe(struct ieee80211_device *ieee, bIsAggregateFrame = true; } - if (IEEE80211_QOS_HAS_SEQ(fc)) { + if (IEEE80211_QOS_HAS_SEQ(fc)) LLCOffset += 2; - } - if (rx_stats->bContainHTC) { + if (rx_stats->bContainHTC) LLCOffset += HTCLNG; - } + // Null packet, don't indicate it to upper layer ChkLength = LLCOffset;/* + (Frame_WEP(frame)!=0 ?Adapter->MgntInfo.SecurityInfo.EncryptionHeadOverhead:0);*/ @@ -855,13 +854,11 @@ static u8 parse_subframe(struct ieee80211_device *ieee, if (skb->len != 0) { nPadding_Length = 4 - ((nSubframe_Length + ETHERNET_HEADER_SIZE) % 4); - if (nPadding_Length == 4) { + if (nPadding_Length == 4) nPadding_Length = 0; - } - if (skb->len < nPadding_Length) { + if (skb->len < nPadding_Length) return 0; - } skb_pull(skb, nPadding_Length); } @@ -1248,9 +1245,8 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, TID = Frame_QoSTID(skb->data); SeqNum = WLAN_GET_SEQ_SEQ(sc); GetTs(ieee, (struct ts_common_info **), hdr->addr2, TID, RX_DIR, true); - if (TID != 0 && TID != 3) { + if (TID != 0 && TID != 3)
[PATCH] staging: iio: ad9834: convert to device-managed functions in probe
This change converts the driver to use device-managed functions in the probe function. For the clock and regulator disable, some devm_add_action_or_reset() calls are required, and then devm_iio_device_register() function can be used register the IIO device. The final aim here would be for IIO to export only the device-managed functions of it's API. That's a long way to go and this a small step in that direction. Signed-off-by: Alexandru Ardelean --- drivers/staging/iio/frequency/ad9834.c | 64 +- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c index 262c3590e64e..b063cfd0e0e1 100644 --- a/drivers/staging/iio/frequency/ad9834.c +++ b/drivers/staging/iio/frequency/ad9834.c @@ -390,6 +390,20 @@ static const struct iio_info ad9833_info = { .attrs = _attribute_group, }; +static void ad9834_disable_reg(void *data) +{ + struct regulator *reg = data; + + regulator_disable(reg); +} + +static void ad9834_disable_clk(void *data) +{ + struct clk *clk = data; + + clk_disable_unprepare(clk); +} + static int ad9834_probe(struct spi_device *spi) { struct ad9834_state *st; @@ -407,26 +421,33 @@ static int ad9834_probe(struct spi_device *spi) return ret; } + ret = devm_add_action_or_reset(>dev, ad9834_disable_reg, reg); + if (ret) + return ret; + indio_dev = devm_iio_device_alloc(>dev, sizeof(*st)); if (!indio_dev) { ret = -ENOMEM; - goto error_disable_reg; + return ret; } - spi_set_drvdata(spi, indio_dev); st = iio_priv(indio_dev); mutex_init(>lock); st->mclk = devm_clk_get(>dev, NULL); if (IS_ERR(st->mclk)) { ret = PTR_ERR(st->mclk); - goto error_disable_reg; + return ret; } ret = clk_prepare_enable(st->mclk); if (ret) { dev_err(>dev, "Failed to enable master clock\n"); - goto error_disable_reg; + return ret; } + ret = devm_add_action_or_reset(>dev, ad9834_disable_clk, st->mclk); + if (ret) + return ret; + st->spi = spi; st->devid = spi_get_device_id(spi)->driver_data; st->reg = reg; @@ -470,48 +491,26 @@ static int ad9834_probe(struct spi_device *spi) ret = spi_sync(st->spi, >msg); if (ret) { dev_err(>dev, "device init failed\n"); - goto error_clock_unprepare; + return ret; } ret = ad9834_write_frequency(st, AD9834_REG_FREQ0, 100); if (ret) - goto error_clock_unprepare; + return ret; ret = ad9834_write_frequency(st, AD9834_REG_FREQ1, 500); if (ret) - goto error_clock_unprepare; + return ret; ret = ad9834_write_phase(st, AD9834_REG_PHASE0, 512); if (ret) - goto error_clock_unprepare; + return ret; ret = ad9834_write_phase(st, AD9834_REG_PHASE1, 1024); if (ret) - goto error_clock_unprepare; - - ret = iio_device_register(indio_dev); - if (ret) - goto error_clock_unprepare; - - return 0; -error_clock_unprepare: - clk_disable_unprepare(st->mclk); -error_disable_reg: - regulator_disable(reg); - - return ret; -} - -static int ad9834_remove(struct spi_device *spi) -{ - struct iio_dev *indio_dev = spi_get_drvdata(spi); - struct ad9834_state *st = iio_priv(indio_dev); - - iio_device_unregister(indio_dev); - clk_disable_unprepare(st->mclk); - regulator_disable(st->reg); + return ret; - return 0; + return devm_iio_device_register(>dev, indio_dev); } static const struct spi_device_id ad9834_id[] = { @@ -539,7 +538,6 @@ static struct spi_driver ad9834_driver = { .of_match_table = ad9834_of_match }, .probe = ad9834_probe, - .remove = ad9834_remove, .id_table = ad9834_id, }; module_spi_driver(ad9834_driver); -- 2.29.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8723bs: remove unused code block
Remove conditional code block checked by unused CONFIG_GPIO_WAKEUP Cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 8 --- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 69 --- .../staging/rtl8723bs/include/rtl8723b_hal.h | 4 -- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 57 --- 4 files changed, 138 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c index 86f31d98349a..0480e32701f0 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c @@ -1183,11 +1183,6 @@ static void rtl8723b_set_FwWoWlanCtrl_Cmd(struct adapter *padapter, u8 bFuncEn) u8 gpio_high_active = 0; /* 0: low active, 1: high active */ u8 magic_pkt = 0; -#ifdef CONFIG_GPIO_WAKEUP - gpionum = WAKEUP_GPIO_IDX; - sdio_wakeup_enable = 0; -#endif - #ifdef CONFIG_PNO_SUPPORT if (!ppwrpriv->wowlan_pno_enable) magic_pkt = 1; @@ -1358,9 +1353,6 @@ static void rtl8723b_set_FwAPWoWlanCtrl_Cmd(struct adapter *padapter, u8 bFuncEn u8 gpionum = 0, gpio_dur = 0; u8 gpio_high_active = 1; /* 0: low active, 1: high active */ u8 gpio_pulse = bFuncEn; -#ifdef CONFIG_GPIO_WAKEUP - gpionum = WAKEUP_GPIO_IDX; -#endif DBG_871X("%s(): bFuncEn =%d\n", __func__, bFuncEn); diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index 718ee9eee87c..9dd3f3249e01 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -42,63 +42,6 @@ static u8 CardEnable(struct adapter *padapter) return ret; } -#ifdef CONFIG_GPIO_WAKEUP -/* we set it high under init and fw will */ -/* give us Low Pulse when host wake up */ -void HostWakeUpGpioClear(struct adapter *Adapter) -{ - u32 value32; - - value32 = rtw_read32(Adapter, REG_GPIO_PIN_CTRL_2); - - /* set GPIO 12 1 */ - value32 |= BIT(12);/* 4+8 */ - /* GPIO 12 out put */ - value32 |= BIT(20);/* 4+16 */ - - rtw_write32(Adapter, REG_GPIO_PIN_CTRL_2, value32); -} /* HostWakeUpGpioClear */ - -void HalSetOutPutGPIO(struct adapter *padapter, u8 index, u8 OutPutValue) -{ - if (index <= 7) { - /* config GPIO mode */ - rtw_write8(padapter, REG_GPIO_PIN_CTRL + 3, rtw_read8(padapter, REG_GPIO_PIN_CTRL + 3) & ~BIT(index)); - - /* config GPIO Sel */ - /* 0: input */ - /* 1: output */ - rtw_write8(padapter, REG_GPIO_PIN_CTRL + 2, rtw_read8(padapter, REG_GPIO_PIN_CTRL + 2) | BIT(index)); - - /* set output value */ - if (OutPutValue) - rtw_write8(padapter, REG_GPIO_PIN_CTRL + 1, rtw_read8(padapter, REG_GPIO_PIN_CTRL + 1) | BIT(index)); - else - rtw_write8(padapter, REG_GPIO_PIN_CTRL + 1, rtw_read8(padapter, REG_GPIO_PIN_CTRL + 1) & ~BIT(index)); - } else { - /* 88C Series: */ - /* index: 11~8 transform to 3~0 */ - /* 8723 Series: */ - /* index: 12~8 transform to 4~0 */ - index -= 8; - - /* config GPIO mode */ - rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 3, rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 3) & ~BIT(index)); - - /* config GPIO Sel */ - /* 0: input */ - /* 1: output */ - rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 2, rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 2) | BIT(index)); - - /* set output value */ - if (OutPutValue) - rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 1, rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 1) | BIT(index)); - else - rtw_write8(padapter, REG_GPIO_PIN_CTRL_2 + 1, rtw_read8(padapter, REG_GPIO_PIN_CTRL_2 + 1) & ~BIT(index)); - } -} -#endif - static u8 _InitPowerOn_8723BS(struct adapter *padapter) { @@ -190,10 +133,6 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter) rtw_write8(padapter, REG_PAD_CTRL1_8723B, value8); /* DBG_8192C("%s: REG_PAD_CTRL1(0x%x) = 0x%02X\n", __func__, REG_PAD_CTRL1_8723B, rtw_read8(padapter, REG_PAD_CTRL1_8723B)); */ -#ifdef CONFIG_GPIO_WAKEUP - HostWakeUpGpioClear(padapter); -#endif - return _SUCCESS; } @@ -1609,10 +1548,6 @@ static void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val) DBG_871X_LEVEL(_drv_always_, "Re-download Normal FW!\n"); SetFwRelatedForWoWLAN8723b(padapter, false); } -#ifdef CONFIG_GPIO_WAKEUP - DBG_871X_LEVEL(_drv_always_, "Set Wake GPIO to high for
Re: [kbuild] Re: [PATCH v3 1/2] char: xillybus: Move class-related functions to new xillybus_class.c
On 09/03/21 18:03, Dan Carpenter wrote: url:https://github.com/0day-ci/linux/commits/eli-billauer-gmail-com/Submission-of-XillyUSB-driver/20210309-193645 base:https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 080951f99de1e483a9a48f34c079b634f2912a54 config: x86_64-randconfig-m001-20210309 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/char/xillybus/xillybus_class.c:86 xillybus_init_chrdev() warn: ignoring unreachable code. drivers/char/xillybus/xillybus_class.c:96 xillybus_init_chrdev() warn: missing error code 'rc' Thanks a lot. I guess there's a patch v4 coming up. Regards, Eli ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel