Splice both the fan and the light hot wires together with the common wire from the SW2. The traveler wires are spliced together in the ceiling fixture box. To control the fan and light separately, a builtin switch such as a pull chain or remote control is required on the fan/light.
This wiring diagram illustrates the connections for dual controls, a speed controller for the fan and a dimmer for the lights. The source is at the controllers and the input of each is spliced to the black source wire with a pigtail. From the controllers, 3-wire cable runs to the ceiling outlet box.
Here the source is at the fan/light and a switch loop runs to the wall switch. The source is wired directly to the fan and spliced through to the switch. With this arrangement the light is controlled with the switch and the fan is hardwired for pull-chain control.
Here GFCI’s are wired to a double-pole circuit breaker with the source split to provide 120 volts to two sets of receptacles. The neutral from the source is shared by both sets. Single-location protection is provided by each receptacle.