kernel: Build warning about unused variable

Bug #1958143 reported by M. Vefa Bicakci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
M. Vefa Bicakci

Bug Description

Brief Description
-----------------

After commit cfe452afa565 was merged to the starlingx/kernel repository, the kernel build has started to emit a warning about an unused variable:

      kernel/workqueue.c: In function 'workqueue_init_early':
      kernel/workqueue.c:5944:6: warning: unused variable 'hk_flags' [-Wunused-variable]
        int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
            ^~~~~~~~

Here is a link to the commit:
  https://review.opendev.org/plugins/gitiles/starlingx/kernel/+/cfe452afa565

Severity
--------
Minor: This is a build warning about an unused variable.

Steps to Reproduce
------------------
Building the kernel packages with "build-pkgs kernel" reproduces this issue in the kernel build logs.

Expected Behavior
------------------
No unexpected/unaccounted-for warnings should be observed.

Actual Behavior
----------------
An unused variable warning is observed.

Reproducibility
---------------
Reliably reproducible.

System Configuration
--------------------
Not applicable.

Branch/Pull Time/Commit
-----------------------
All builds after Nov 7th, 2021 ought to reproduce this issue.

Last Pass
---------
The day before the following commit was merged: https://review.opendev.org/plugins/gitiles/starlingx/kernel/+/cfe452afa565

Timestamp/Logs
--------------
Please see above.

Test Activity
-------------
Developer testing

Workaround
----------
No workaround is necessary.

Changed in starlingx:
assignee: nobody → M. Vefa Bicakci (vbicakci)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kernel (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/kernel/+/824970

Changed in starlingx:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kernel (master)

Reviewed: https://review.opendev.org/c/starlingx/kernel/+/824970
Committed: https://opendev.org/starlingx/kernel/commit/a10b746f324ca5d8997de1ee6743855af74eb1ad
Submitter: "Zuul (22348)"
Branch: master

commit a10b746f324ca5d8997de1ee6743855af74eb1ad
Author: M. Vefa Bicakci <email address hidden>
Date: Tue Jan 11 17:14:40 2022 -0500

    workqueue affinity: Remove unused variable

    After commit cfe452afa565 ("workqueue: Affine rescuer threads and
    unbound wqs", 2021-10-25) was merged, the kernel build process started
    to emit the following compilation warning:

      kernel/workqueue.c: In function 'workqueue_init_early':
      kernel/workqueue.c:5944:6: warning: unused variable 'hk_flags' \
          [-Wunused-variable]
        int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
            ^~~~~~~~

    This occurs because the aforementioned commit removes all users of the
    hk_flags variable from the affected function, but does not remove the
    (now) unused variable.

    This commit removes the unused variable to avoid the compilation
    warning.

    Testing:
    * An ISO image was built successfully using a monolithic build
      procedure, and the kernel build logs were inspected to verify that the
      warning is no longer emitted.

    Change-Id: I622bf66716fb7bdf673a9e868b48b6979e71a3e5
    Fixes: cfe452afa565 ("workqueue: Affine rescuer threads ...")
    Closes-Bug: 1958143
    Signed-off-by: M. Vefa Bicakci <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.7.0 stx.distro.other
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.