Commit Graph

174 Commits

Author SHA1 Message Date
Linus Torvalds ef8f3d48af Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton:
 "Am experimenting with splitting MM up into identifiable subsystems
  perhaps with a view to gitifying it in complex ways. Also with more
  verbose "incoming" emails.

  Most of MM is here and a few other trees.

  Subsystems affected by this patch series:
   - hotfixes
   - iommu
   - scripts
   - arch/sh
   - ocfs2
   - mm:slab-generic
   - mm:slub
   - mm:kmemleak
   - mm:kasan
   - mm:cleanups
   - mm:debug
   - mm:pagecache
   - mm:swap
   - mm:memcg
   - mm:gup
   - mm:pagemap
   - mm:infrastructure
   - mm:vmalloc
   - mm:initialization
   - mm:pagealloc
   - mm:vmscan
   - mm:tools
   - mm:proc
   - mm:ras
   - mm:oom-kill

  hotfixes:
      mm: vmscan: scan anonymous pages on file refaults
      mm/nvdimm: add is_ioremap_addr and use that to check ioremap address
      mm/memcontrol: fix wrong statistics in memory.stat
      mm/z3fold.c: lock z3fold page before  __SetPageMovable()
      nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header
      MAINTAINERS: nilfs2: update email address

  iommu:
      include/linux/dmar.h: replace single-char identifiers in macros

  scripts:
      scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
      scripts/decode_stacktrace: look for modules with .ko.debug extension
      scripts/spelling.txt: drop "sepc" from the misspelling list
      scripts/spelling.txt: add spelling fix for prohibited
      scripts/decode_stacktrace: Accept dash/underscore in modules
      scripts/spelling.txt: add more spellings to spelling.txt

  arch/sh:
      arch/sh/configs/sdk7786_defconfig: remove CONFIG_LOGFS
      sh: config: remove left-over BACKLIGHT_LCD_SUPPORT
      sh: prevent warnings when using iounmap

  ocfs2:
      fs: ocfs: fix spelling mistake "hearbeating" -> "heartbeat"
      ocfs2/dlm: use struct_size() helper
      ocfs2: add last unlock times in locking_state
      ocfs2: add locking filter debugfs file
      ocfs2: add first lock wait time in locking_state
      ocfs: no need to check return value of debugfs_create functions
      fs/ocfs2/dlmglue.c: unneeded variable: "status"
      ocfs2: use kmemdup rather than duplicating its implementation

  mm:slab-generic:
    Patch series "mm/slab: Improved sanity checking":
      mm/slab: validate cache membership under freelist hardening
      mm/slab: sanity-check page type when looking up cache
      lkdtm/heap: add tests for freelist hardening

  mm:slub:
      mm/slub.c: avoid double string traverse in kmem_cache_flags()
      slub: don't panic for memcg kmem cache creation failure

  mm:kmemleak:
      mm/kmemleak.c: fix check for softirq context
      mm/kmemleak.c: change error at _write when kmemleak is disabled
      docs: kmemleak: add more documentation details

  mm:kasan:
      mm/kasan: print frame description for stack bugs
      Patch series "Bitops instrumentation for KASAN", v5:
        lib/test_kasan: add bitops tests
        x86: use static_cpu_has in uaccess region to avoid instrumentation
        asm-generic, x86: add bitops instrumentation for KASAN
      Patch series "mm/kasan: Add object validation in ksize()", v3:
        mm/kasan: introduce __kasan_check_{read,write}
        mm/kasan: change kasan_check_{read,write} to return boolean
        lib/test_kasan: Add test for double-kzfree detection
        mm/slab: refactor common ksize KASAN logic into slab_common.c
        mm/kasan: add object validation in ksize()

  mm:cleanups:
      include/linux/pfn_t.h: remove pfn_t_to_virt()
      Patch series "remove ARCH_SELECT_MEMORY_MODEL where it has no effect":
        arm: remove ARCH_SELECT_MEMORY_MODEL
        s390: remove ARCH_SELECT_MEMORY_MODEL
        sparc: remove ARCH_SELECT_MEMORY_MODEL
      mm/gup.c: make follow_page_mask() static
      mm/memory.c: trivial clean up in insert_page()
      mm: make !CONFIG_HUGE_PAGE wrappers into static inlines
      include/linux/mm_types.h: ifdef struct vm_area_struct::swap_readahead_info
      mm: remove the account_page_dirtied export
      mm/page_isolation.c: change the prototype of undo_isolate_page_range()
      include/linux/vmpressure.h: use spinlock_t instead of struct spinlock
      mm: remove the exporting of totalram_pages
      include/linux/pagemap.h: document trylock_page() return value

  mm:debug:
      mm/failslab.c: by default, do not fail allocations with direct reclaim only
      Patch series "debug_pagealloc improvements":
        mm, debug_pagelloc: use static keys to enable debugging
        mm, page_alloc: more extensive free page checking with debug_pagealloc
        mm, debug_pagealloc: use a page type instead of page_ext flag

  mm:pagecache:
      Patch series "fix filler_t callback type mismatches", v2:
        mm/filemap.c: fix an overly long line in read_cache_page
        mm/filemap: don't cast ->readpage to filler_t for do_read_cache_page
        jffs2: pass the correct prototype to read_cache_page
        9p: pass the correct prototype to read_cache_page
      mm/filemap.c: correct the comment about VM_FAULT_RETRY

  mm:swap:
      mm, swap: fix race between swapoff and some swap operations
      mm/swap_state.c: simplify total_swapcache_pages() with get_swap_device()
      mm, swap: use rbtree for swap_extent
      mm/mincore.c: fix race between swapoff and mincore

  mm:memcg:
      memcg, oom: no oom-kill for __GFP_RETRY_MAYFAIL
      memcg, fsnotify: no oom-kill for remote memcg charging
      mm, memcg: introduce memory.events.local
      mm: memcontrol: dump memory.stat during cgroup OOM
      Patch series "mm: reparent slab memory on cgroup removal", v7:
        mm: memcg/slab: postpone kmem_cache memcg pointer initialization to memcg_link_cache()
        mm: memcg/slab: rename slab delayed deactivation functions and fields
        mm: memcg/slab: generalize postponed non-root kmem_cache deactivation
        mm: memcg/slab: introduce __memcg_kmem_uncharge_memcg()
        mm: memcg/slab: unify SLAB and SLUB page accounting
        mm: memcg/slab: don't check the dying flag on kmem_cache creation
        mm: memcg/slab: synchronize access to kmem_cache dying flag using a spinlock
        mm: memcg/slab: rework non-root kmem_cache lifecycle management
        mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages
        mm: memcg/slab: reparent memcg kmem_caches on cgroup removal
      mm, memcg: add a memcg_slabinfo debugfs file

  mm:gup:
      Patch series "switch the remaining architectures to use generic GUP", v4:
        mm: use untagged_addr() for get_user_pages_fast addresses
        mm: simplify gup_fast_permitted
        mm: lift the x86_32 PAE version of gup_get_pte to common code
        MIPS: use the generic get_user_pages_fast code
        sh: add the missing pud_page definition
        sh: use the generic get_user_pages_fast code
        sparc64: add the missing pgd_page definition
        sparc64: define untagged_addr()
        sparc64: use the generic get_user_pages_fast code
        mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP
        mm: reorder code blocks in gup.c
        mm: consolidate the get_user_pages* implementations
        mm: validate get_user_pages_fast flags
        mm: move the powerpc hugepd code to mm/gup.c
        mm: switch gup_hugepte to use try_get_compound_head
        mm: mark the page referenced in gup_hugepte
      mm/gup: speed up check_and_migrate_cma_pages() on huge page
      mm/gup.c: remove some BUG_ONs from get_gate_page()
      mm/gup.c: mark undo_dev_pagemap as __maybe_unused

  mm:pagemap:
      asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel]
      alpha: switch to generic version of pte allocation
      arm: switch to generic version of pte allocation
      arm64: switch to generic version of pte allocation
      csky: switch to generic version of pte allocation
      m68k: sun3: switch to generic version of pte allocation
      mips: switch to generic version of pte allocation
      nds32: switch to generic version of pte allocation
      nios2: switch to generic version of pte allocation
      parisc: switch to generic version of pte allocation
      riscv: switch to generic version of pte allocation
      um: switch to generic version of pte allocation
      unicore32: switch to generic version of pte allocation
      mm/pgtable: drop pgtable_t variable from pte_fn_t functions
      mm/memory.c: fail when offset == num in first check of __vm_map_pages()

  mm:infrastructure:
      mm/mmu_notifier: use hlist_add_head_rcu()

  mm:vmalloc:
      Patch series "Some cleanups for the KVA/vmalloc", v5:
        mm/vmalloc.c: remove "node" argument
        mm/vmalloc.c: preload a CPU with one object for split purpose
        mm/vmalloc.c: get rid of one single unlink_va() when merge
        mm/vmalloc.c: switch to WARN_ON() and move it under unlink_va()
      mm/vmalloc.c: spelling> s/informaion/information/

  mm:initialization:
      mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist
      mm/large system hash: clear hashdist when only one node with memory is booted

  mm:pagealloc:
      arm64: move jump_label_init() before parse_early_param()
      Patch series "add init_on_alloc/init_on_free boot options", v10:
        mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options
        mm: init: report memory auto-initialization features at boot time

  mm:vmscan:
      mm: vmscan: remove double slab pressure by inc'ing sc->nr_scanned
      mm: vmscan: correct some vmscan counters for THP swapout

  mm:tools:
      tools/vm/slabinfo: order command line options
      tools/vm/slabinfo: add partial slab listing to -X
      tools/vm/slabinfo: add option to sort by partial slabs
      tools/vm/slabinfo: add sorting info to help menu

  mm:proc:
      proc: use down_read_killable mmap_sem for /proc/pid/maps
      proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup
      proc: use down_read_killable mmap_sem for /proc/pid/pagemap
      proc: use down_read_killable mmap_sem for /proc/pid/clear_refs
      proc: use down_read_killable mmap_sem for /proc/pid/map_files
      mm: use down_read_killable for locking mmap_sem in access_remote_vm
      mm: smaps: split PSS into components
      mm: vmalloc: show number of vmalloc pages in /proc/meminfo

  mm:ras:
      mm/memory-failure.c: clarify error message

  mm:oom-kill:
      mm: memcontrol: use CSS_TASK_ITER_PROCS at mem_cgroup_scan_tasks()
      mm, oom: refactor dump_tasks for memcg OOMs
      mm, oom: remove redundant task_in_mem_cgroup() check
      oom: decouple mems_allowed from oom_unkillable_task
      mm/oom_kill.c: remove redundant OOM score normalization in select_bad_process()"

* akpm: (147 commits)
  mm/oom_kill.c: remove redundant OOM score normalization in select_bad_process()
  oom: decouple mems_allowed from oom_unkillable_task
  mm, oom: remove redundant task_in_mem_cgroup() check
  mm, oom: refactor dump_tasks for memcg OOMs
  mm: memcontrol: use CSS_TASK_ITER_PROCS at mem_cgroup_scan_tasks()
  mm/memory-failure.c: clarify error message
  mm: vmalloc: show number of vmalloc pages in /proc/meminfo
  mm: smaps: split PSS into components
  mm: use down_read_killable for locking mmap_sem in access_remote_vm
  proc: use down_read_killable mmap_sem for /proc/pid/map_files
  proc: use down_read_killable mmap_sem for /proc/pid/clear_refs
  proc: use down_read_killable mmap_sem for /proc/pid/pagemap
  proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup
  proc: use down_read_killable mmap_sem for /proc/pid/maps
  tools/vm/slabinfo: add sorting info to help menu
  tools/vm/slabinfo: add option to sort by partial slabs
  tools/vm/slabinfo: add partial slab listing to -X
  tools/vm/slabinfo: order command line options
  mm: vmscan: correct some vmscan counters for THP swapout
  mm: vmscan: remove double slab pressure by inc'ing sc->nr_scanned
  ...
2019-07-12 11:40:28 -07:00
Paul Walmsley cc0e5f1ce0 scripts/spelling.txt: drop "sepc" from the misspelling list
The RISC-V architecture has a register named the "Supervisor Exception
Program Counter", or "sepc".  This abbreviation triggers checkpatch.pl's
misspelling detector, resulting in noise in the checkpatch output.  The
risk that this noise could cause more useful warnings to be missed seems
to outweigh the harm of an occasional misspelling of "spec".  Thus drop
the "sepc" entry from the misspelling list.

[akpm@linux-foundation.org: fix existing "sepc" instances, per Joe]
Link: http://lkml.kernel.org/r/20190518210037.13674-1-paul.walmsley@sifive.com
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-12 11:05:41 -07:00
Colin Ian King 5b2736ce36 staging: rtl8723bs: hal: remove redundant assignment to packetType
Local variable packetType is being assigned a value that is never
read just before a return statement. The assignment is redundant
and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190703081434.17489-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:35:04 +02:00
Nishka Dasgupta 14c77a1837 staging: rtl8723bs: Change return type of hal_btcoex_IsBtDisabled()
Change return type of hal_btcoex_IsBtDisabled from u8 to bool as the
only possible return values are true and false.
Where needed, modify accordingly the type of the variables used to store
this return value.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190702070132.6997-9-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:35:04 +02:00
Nishka Dasgupta aa0963a116 staging: rtl8723bs: Remove rtw_btcoex_BtInfoNotify()
Remove function rtw_btcoex_BtInfoNotify as it does nothing except call
hal_btcoex_BtInfoNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190702070132.6997-4-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:35:03 +02:00
Nishka Dasgupta a47a70c257 staging: rtl8723bs: Remove rtw_btcoex_ScanNotify()
Remove function rtw_btcoex_ScanNotify as all it does is call
hal_btcoex_ScanNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190702070132.6997-3-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:35:03 +02:00
Nishka Dasgupta b3a74e04f1 staging: rtl8723bs: Remove rtw_btcoex_SetSingleAntPath()
Remove function rtw_btcoex_SetSingleAntPath as all it does is call
hal_btcoex_SetSingleAntPath.
Modify call site.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190702070132.6997-2-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:35:03 +02:00
Nishka Dasgupta db3592d985 staging: rtl8723bs: Remove rtw_btcoex_SetPGAntNum()
Remove function rtw_btcoex_SetPGAntNum as it does nothing except call
hal_btcoex_SetPgAntNum.
Modify call site accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190702070132.6997-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:35:03 +02:00
Nishka Dasgupta 69fa65f92d staging: rtl8723bs: Remove rtw_btcoex_GetRaMask()
Remove function rtw_btcoex_GetRaMask as all it does is call
hal_btcoex_GetRaMask.
Modify call site accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-10-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:09 +02:00
Nishka Dasgupta efa6b6c9c4 staging: rtl8723bs: Remove rtw_btcoex_SetChipType()
Remove function rtw_btcoex_SetChipType as it does nothing but call
hal_btcoex_SetChipType.
Modify call site accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-9-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:09 +02:00
Nishka Dasgupta 8739e064de staging: rtl8723bs: Remove rtw_btcoex_ConnectNotify()
Remove function rtw_btcoex_ConnectNotify as all it does is call
hal_btcoex_ConnectNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-8-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:08 +02:00
Nishka Dasgupta 5355735196 staging: rtl8723bs: Remove rtw_btcoex_SetBTCoexist()
Remove function rtw_btcoex_SetBTCoexist as it does nothing except call
hal_btcoex_SetBTCoexist.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-7-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:08 +02:00
Nishka Dasgupta d1f4b78027 staging: rtl8723bs: Remove rtw_btcoex_IsBtDisabled()
Remove function rtw_btcoex_IsBtDisabled as it does nothing except call
hal_btcoex_IsBtDisabled.
Modify call sites accordingly.
Issue found wth Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-6-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:08 +02:00
Nishka Dasgupta 606e33cead staging: rtl8723bs: Remove rtw_btcoex_IsBtControlLps()
Remove function rtw_btcoex_IsBtControlLps as it does nothing except call
hal_btcoex_IsBtControlLps.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-5-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:08 +02:00
Nishka Dasgupta ee8e2ce55d staging: rtl8723bs: Remove rtw_btcoex_LpsVal()
Remove function rtw_btcoex_LpsVal as all it does is call
hal_btcoex_LpsVal.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-3-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:08 +02:00
Nishka Dasgupta f0ef8d3e20 staging: rtl8723bs: Remove rtw_btcoex_RecordPwrMode()
Remove function rtw_btcoex_RecordPwrMode as all it does is call
hal_btcoex_RecordPwrMode.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-2-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:08 +02:00
Nishka Dasgupta 78c5f096d7 staging: rtl8723bs: Remove rtw_btcoex_RpwmVal()
Remove function rtw_btcoex_RpwmVal as all it does is call
hal_btcoex_RpwmVal.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091817.12759-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:34:07 +02:00
Nishka Dasgupta 6fc61d9f06 staging: rtl8723bs: Remove rtw_btcoex_IQKNotify()
Remove function rtw_btcoex_IQKNotify as all it does is call
hal_btcoex_IQKNotify.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:50:22 +02:00
Nishka Dasgupta bd9dfe93c2 staging: rtl8723bs: Remove rtw_btcoex_HAL_Initialize()
Remove function rtw_btcoex_HAL_Initialize as it does nothing except call
hal_btcoex_InitHwConfig.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:50:22 +02:00
Nishka Dasgupta b13aaa5f83 staging: rtl8723bs: Remove rtw_btcoex_PowerOnSetting()
Remove function rtw_btcoex_PowerOnSetting as all it does is call
hal_btcoex_PowerOnSetting.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:50:22 +02:00
Nishka Dasgupta 9b1fd9b00d staging: rtl8723bs: Remove function rtw_modular64()
Remove function rtw_modular64 as all it does is call do_div.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:50:21 +02:00
Nishka Dasgupta 7cda1f884d staging: rtl8723bs: Replace function odm_SignalScaleMapping()
Remove function odm_SignalScaleMapping as all it does is call
odm_SignalScaleMapping_92CSeries.
Rename odm_SignalScaleMapping_92CSeries to odm_SignalScaleMapping and
change its type from static to non-static to maintain compatibility with
call sites of odm_SignalScaleMapping.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:44 +02:00
Nishka Dasgupta 777a43348a staging: rtl8723bs: Remove rtw_hal_networktype_to_raid()
Change call sites of rtw_hal_networktype_to_raid to instead call
networktype_to_raid_ex as rtw_hal_networktype_to_raid does nothing
except call networktype_to_raid_ex.
Remove now-unused function rtw_hal_networktype_to_raid.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:44 +02:00
Nishka Dasgupta 414faeb181 staging: rtl8723bs: Remove rtw_hal_c2h_evt_read()
Modify call sites of rtw_hal_c2h_evt_read to call c2h_evt_read_88xx
instead, as rtw_hal_c2h_evt_read does nothing except call
c2h_evt_read_88xx.
Remove function rtw_hal_c2h_evt_read as it is now not necessary.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:44 +02:00
Nishka Dasgupta 7ebc875198 staging: rtl8723bs: hal: Remove function clearinterrupt8723bsdio()
Remove unused function clearinterrupt8723bsdio and associated ifdef.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:43 +02:00
Nishka Dasgupta 3a1555da57 staging: rtl8723bs: hal: Remove function PHY_CalculateBitShift()
Remove unused function PHY_CalculateBitShift.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:43 +02:00
Nishka Dasgupta 98be8b33c1 staging: rtl8723bs: hal: Remove PHY_RFShadowRecorverFlagSetAll()
Remove unused function PHY_RFShadowRecorverFlagSetAll.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:43 +02:00
Nishka Dasgupta c23beb6dc0 staging: rtl8723bs: hal: Remove PHY_RFShadowRefresh()
Remove unused function PHY_RFShadowRefresh.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:43 +02:00
Nishka Dasgupta 8fce9e2825 staging: rtl8723bs: hal: Replace function rtl8723b_set_rssi_cmd()
Remove function rtl8723b_set_rssi_cmd as all it does is call
rtl8723b_set_FwRssiSetting_cmd.
Rename rtl8723b_set_FwRssiSetting_cmd to rtl8723b_set_rssi_cmd and
change its type from static to non-static to maintain compatibility
with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:49:43 +02:00
Hariprasad Kelam 3c21e62798 staging: rtl8723bs: hal: sdio_halinit: Remove set but unused varilable pHalData
Remove set but unsed variable pHalData in below functions
_InitOperationMode, SetHwReg8723BS.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:48:58 +02:00
Hariprasad Kelam 4d6d738091 staging: rtl8723bs: hal: rtl8723b_rf6052: collect return status directly
Remove variable rtStatus and return phy_RF6052_Config_ParaFile function
directly

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:48:58 +02:00
Hariprasad Kelam 526160d0db staging: rtl8723bs: hal: rtl8723b_hal_init: remove set but unused variable pHalData
Remove set but unsed variable pHalData in hw_var_set_mlme_join
function

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:48:58 +02:00
Hariprasad Kelam 77504cf392 staging: rtl8723bs: hal: rtl8723b_cmd: remove set but unused variable
Remove set but unsed variable pHalData in rtl8723b_set_FwRsvdPagePkt
function

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:48:57 +02:00
Hariprasad Kelam c0b8646c73 staging: rtl8723bs: hal: hal_btcoex: Remove unneeded variable PHalData
pHalData is not being used in halbtcoutsrc_LeaveLowPower. So remove the
same.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:11:23 +02:00
Hariprasad Kelam 9f269b37ee staging: rtl8723bs: hal: hal_btcoex: Using comparison to true is error prone
fix below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:11:23 +02:00
Nishka Dasgupta 670a44c163 staging: rtl8723bs: Delete file odm_AntDiv.c
Delete file odm_AntDiv.c and corresponding header file odm_AntDiv.h as
its functions and definitions are not used anywhere.
Remove reference to odm_AntDiv.h.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:46:17 +02:00
Hariprasad Kelam a7a22bc46c staging: rtl8723bs: hal: hal_btcoex: Remove variables pHalData and pU1Tmp
Remove pHalData variable as it is set but unused in function.
Remove pU1Tmp and replace this with pu8

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:02 +02:00
Hariprasad Kelam d189a7c2f8 staging: rtl8723bs: hal: odm_RegConfig8723B: fix Lines should not end with a '('
this patch fixes below issue reported by checkpatch.pl

CHECK: Lines should not end with a '('
CHECK: Lines should not end with a '('

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:02 +02:00
Shobhit Kukreti 3565963967 staging: rtl8723bs: hal: Fix Brace Style Issues in if/else statements
Cleaned Up code to fix brace style issues reported by checkpatch:

-space required before the open brace '{'
-Unbalanced braces around if/else statements

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Shobhit Kukreti d47f4db767 staging: rtl8723bs: hal: Remove True/False Comparisons
Removing comparisons to True/False in if statements.

Checkpatch reported:
CHECK: Using comparison to true is error prone

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Hariprasad Kelam f2e741cbba staging: rtl8723bs: hal: rtl8723b_cmd: fix comparison to true is error prone
this patch fixes below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Hariprasad Kelam a029e22345 staging: rtl8723bs: hal: rtl8723b_cmd: fix Comparison to NULL
This patch fixes below issues reported by checkpatch

CHECK: Comparison to NULL could be written "psta"
CHECK: Comparison to NULL could be written
"pmlmepriv->wps_probe_resp_ie"
CHECK: Comparison to NULL could be written "psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Hariprasad Kelam 6195988510 staging: rtl8723bs: hal: odm_HWConfig: Unneeded variable: "result". Return "HAL_STATUS_SUCCESS"
Remove function ODM_ConfigMACWithHeaderFile as trace is not necessary
and as it is getting called only once and call direct function
"ODM_ReadAndConfig_MP_8723B_MAC_REG"

Issue identified by coccicheck

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
----
changes v2: fixed typo in commit message
changes v3: Remove function ODM_ConfigMACWithHeaderFile and replace
            with ODM_ReadAndConfig_MP_8723B_MAC_REG

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam f3a9e41368 staging: rtl8723bs: hal: rtl8723b_rf6052: fix spaces preferred around unary operator
ERROR: spaces required around that '<<' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam f60cb23f0f staging: rtl8723bs: hal: rtl8723b_hal_init: Remove set but unused variable
Remove variable pHalData as it is not being used in function.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam 7036126aa2 staging: rtl8723bs: hal: rtl8723b_hal_init: fix Using comparison to true is error prone
This patch tries to fix below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to true is false prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam 02ca9aa025 staging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL
This patch tries to fix below issues reported by checkpatch

CHECK: Comparison to NULL could be written "!efuseTbl"
CHECK: Comparison to NULL could be written "!psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam 7930f8e589 staging: rtl8723bs: hal: Add null check after memory allocation
Add NULL check post call to rtw_zmalloc.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam 247c2ad278 staging: rtl8723bs: hal: fix Using comparison to false is error prone
fix below issue reported by checkpatch

CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam 289fb19ef7 staging: rtl8723bs: hal: Remove return type of initrecvbuf
change return of initrecvbuf from s32 to void. As this function always
returns SUCCESS .

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00