When the parent's stake changes
If the parent buys or sells shares of the subsidiary, or the subsidiary issues or buys back shares, and the parent keeps control of a subsidiary that is a business (or a nonprofit activity), the change is a transaction among owners. No gain or loss is recognized. The NCI's carrying amount is adjusted to its new percentage, and any difference from the cash paid or received goes to the parent's additional paid-in capital. If the subsidiary has accumulated other comprehensive income (AOCI), its carrying amount is reallocated between the parent and the NCI through the parent's equity.
Losing control is different. The parent deconsolidates the subsidiary and, unless it passes the subsidiary to its own owners in a spinoff (ASC 845), recognizes a gain or loss in net income: the fair value of what it received, plus the fair value of any stake it keeps, plus the carrying amount of the NCI, minus the carrying amount of the subsidiary's net assets. A retained stake is therefore remeasured to fair value through earnings.