summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorAllen Pais <apais@linux.microsoft.com>2024-02-27 22:10:37 +0300
committerTejun Heo <tj@kernel.org>2024-02-27 22:38:26 +0300
commit60b2ebf48526567b53e0188dbd1a4df8e646bcc1 (patch)
tree3a2ab1d6fa6c0465bfd5b7d26a850641559f59b0 /drivers/staging/rtl8192e
parentccdec92198df0c91f45a68f971771b6b0c1ba02d (diff)
downloadlinux-60b2ebf48526567b53e0188dbd1a4df8e646bcc1.tar.xz
workqueue: Introduce from_work() helper for cleaner callback declarations
To streamline the transition from tasklets to worqueues, a new helper function, from_work(), is introduced. This helper, inspired by existing from_() patterns, utilizes container_of() and eliminates the redundancy of declaring variable types, leading to more concise and readable code. The modified code snippet demonstrates the enhanced clarity achieved with from_wq(): void callback(struct work_struct *w) { - struct some_data_structure *local = container_of(w, struct some_data_structure, work); + struct some_data_structure *local = from_work(local, w, work); This change aims to facilitate a smoother transition and uphold code quality standards. Based on: git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git disable_work-v3 Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
0 files changed, 0 insertions, 0 deletions