Take the appropriate action and verify that the warning light turns off.
Mazda 6 Owners Manual: Coil removal/installation
Note
Do not remove the coil unless you are replacing it.
When only the coil is replaced, the immobilizer system reprogram
procedure is not necessary.
1. Disconnect the negative battery cable.
2. Remove the column cover.
3. Remove in the order indicated in the table.
4. Install in ...
Mazda 6 Owners Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...