]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/sched/sch_sfb.c
net: replace macros net_random and net_srandom with direct calls to prandom
[mirror_ubuntu-jammy-kernel.git] / net / sched / sch_sfb.c
index 30ea4674cabd2a735c47af22239ab006b1c2e826..9b0f7093d970da5fa37130a5df926d5c428191ec 100644 (file)
@@ -220,7 +220,7 @@ static u32 sfb_compute_qlen(u32 *prob_r, u32 *avgpm_r, const struct sfb_sched_da
 
 static void sfb_init_perturbation(u32 slot, struct sfb_sched_data *q)
 {
-       q->bins[slot].perturbation = net_random();
+       q->bins[slot].perturbation = prandom_u32();
 }
 
 static void sfb_swap_slot(struct sfb_sched_data *q)
@@ -381,7 +381,7 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
                goto enqueue;
        }
 
-       r = net_random() & SFB_MAX_PROB;
+       r = prandom_u32() & SFB_MAX_PROB;
 
        if (unlikely(r < p_min)) {
                if (unlikely(p_min > SFB_MAX_PROB / 2)) {