ci_hdrc_pci_remove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ci_hdrc_pci_remove(9) πŸ’…

okay bestie, so this is a page straight out of the Kernel API Manual β€” yes, that's the whole manual name, we're fancy here β€” and it's about one very specific little function. buckle up, it's short but it's iconic πŸŽ€


✨ NAME ✨

ci_hdrc_pci_remove β€” literally just "PCI remove". that's the whole name section, no notes, slay 🫢


✨ SYNOPSIS ✨

void ci_hdrc_pci_remove (struct pci_dev *pdev );

that's it. that's the vibe check. it returns void, meaning it gives you nothing back β€” no cap, zero return value, it just does the thing and dips πŸ’…


✨ ARGUMENTS ✨

  • pdev β€” the USB Device Controller that's getting removed. yes, it's a struct pci_dev * and yes, it's the star of the show. main character energy fr fr πŸ‘‘

✨ DESCRIPTION ✨

so the way this works: this function is the undo button for ci_hdrc_pci_probe β€” it reverses whatever that probe got up to. lowkey the cleanup queen 🌸

how does it undo things, you ask? in two very specific steps, in this exact order (the order matters, bestie, don't come for me):

  1. first it invokes udc_remove β€” yeah, that one, exactly that name, iykyk
  2. then it releases all the PCI resources that got allocated for this USB device controller

so it's first the udc_remove, then the PCI resources get freed. that sequence is the whole point. no shortcuts, no reordering, we respect the sequence here ✨

no undefined behaviour warnings on this one, she's a clean, well-behaved little teardown function. but still β€” it's a remove function, so it's doing destructive-ish cleanup by nature. treat her with respect 🧚

✨ SEE ALSO ✨

  • the kernel file itself: ./drivers/usb/chipidea/ci_hdrc_pci.c β€” go read it, it's right there
  • ci_hdrc_pci_probe(9) β€” the one this function is un-doing. the prequel. the origin story. go check it out πŸ”₯

and that's the whole page, bestie β€” short, sweet, and to the point πŸ¦‹

cute little sign-off: this one lives under ./drivers/usb/chipidea, it's dated October 2026, and the page itself answers to the name ci_hdrc_pci_remove(9). periodt πŸ’–πŸŽ€β­

πŸ“¦ where this page comes from