* structure corresponding to the current CPU, and must have irqs disabled.
  * Returns true if the grace-period kthread needs to be awakened.
  */
-static bool __note_gp_changes(struct rcu_state *rsp, struct rcu_node *rnp,
-                             struct rcu_data *rdp)
+static bool __note_gp_changes(struct rcu_node *rnp, struct rcu_data *rdp)
 {
        bool ret;
        bool need_gp;
+       struct rcu_state __maybe_unused *rsp = &rcu_state;
 
        raw_lockdep_assert_held_rcu_node(rnp);
 
                local_irq_restore(flags);
                return;
        }
-       needwake = __note_gp_changes(rsp, rnp, rdp);
+       needwake = __note_gp_changes(rnp, rdp);
        raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
        if (needwake)
                rcu_gp_kthread_wake();
                rnp->qsmask = rnp->qsmaskinit;
                WRITE_ONCE(rnp->gp_seq, rsp->gp_seq);
                if (rnp == rdp->mynode)
-                       (void)__note_gp_changes(rsp, rnp, rdp);
+                       (void)__note_gp_changes(rnp, rdp);
                rcu_preempt_boost_start_gp(rnp);
                trace_rcu_grace_period_init(rsp->name, rnp->gp_seq,
                                            rnp->level, rnp->grplo,
                WRITE_ONCE(rnp->gp_seq, new_gp_seq);
                rdp = this_cpu_ptr(&rcu_data);
                if (rnp == rdp->mynode)
-                       needgp = __note_gp_changes(rsp, rnp, rdp) || needgp;
+                       needgp = __note_gp_changes(rnp, rdp) || needgp;
                /* smp_mb() provided by prior unlock-lock pair. */
                needgp = rcu_future_gp_cleanup(rnp) || needgp;
                sq = rcu_nocb_gp_get(rnp);